# Soft-delete a record

## `DELETE /v1/records/{id}`

For events, also retracts facts and field claims that depended on the event. Requires the `write` scope.

```json
{
  "tags": [
    "Records"
  ],
  "operationId": "delete-record",
  "summary": "Soft-delete a record",
  "description": "For events, also retracts facts and field claims that depended on the event. Requires the `write` scope.",
  "x-retainer-scope": "write",
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "description": "Retainer identifier.",
      "example": "d2c0648c-2994-4f16-bdf1-a0136be6037d",
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    }
  ],
  "requestBody": {
    "required": false,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "bindings": {
              "type": "object",
              "properties": {
                "bindings_revision": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "objectId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "fieldIds": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "additionalProperties": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                }
              },
              "required": [
                "bindings_revision",
                "objectId",
                "fieldIds"
              ],
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Successful response.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/DeleteRecord"
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "default": {
      "$ref": "#/components/responses/ApiError"
    }
  }
}
```

[Full OpenAPI contract](/openapi.json)
