{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/anthid-com/json-schema/anthid-com-deleted-response-schema.json",
  "title": "DeletedResponse",
  "description": "The body every successful delete returns.\n\nDeletes are idempotent, so a caller that retries one it is unsure landed\ngets the same 200 as the caller that deleted it. That leaves the caller\nunable to tell the two apart from the status alone, which is what\n`deleted_at` is for: it is the moment the resource was *first* deleted and\ndoes not move on a repeat call.",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/controls.openapi.json#/components/schemas/DeletedResponse",
  "type": "object",
  "required": [
    "deleted",
    "resource",
    "deleted_at"
  ],
  "properties": {
    "deleted": {
      "type": "boolean",
      "description": "Always true. A caller checking one field to confirm the outcome does not\nhave to special-case which endpoint it called."
    },
    "deleted_at": {
      "type": "string",
      "format": "date-time",
      "description": "When the resource was first deleted, not when this call was made."
    },
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Absent for resources keyed by a natural composite key rather than a\nsingle identifier, which today is every control in the controls service.\nThe path already identifies those, so nothing is lost by omitting it."
    },
    "resource": {
      "$ref": "#/$defs/DeletedResourceKind"
    }
  },
  "$defs": {
    "DeletedResourceKind": {
      "type": "string",
      "description": "The resource a delete acted on.\n\nNamed rather than free text so a caller can branch on it, and so the same\nvocabulary is available when these deletes start emitting events.",
      "enum": [
        "trading_account",
        "test_trading_account",
        "broker_credential",
        "oauth_client",
        "organization",
        "user",
        "organization_control",
        "account_control",
        "account_risk_control",
        "account_time_control",
        "symbol_control",
        "symbol_risk_control",
        "symbol_time_control"
      ]
    }
  }
}