{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/beel-es/json-schema/beel-es-create-claim-token-request-schema.json",
  "title": "CreateClaimTokenRequest",
  "description": "Optional body for issuing a claim token. Send `email` when the account has **no holder yet** (it was provisioned without one): the person is created at that point. Omit the body entirely to re-issue the token for the holder the account already has.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/beel-es-accounts-api-openapi.yml#/components/schemas/CreateClaimTokenRequest",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "format": "email",
      "description": "The holder's email address, used as their login. **Required when the account has no holder** (else `422`). If the account already has one, it must match theirs — a different address returns `409 CLAIM_TOKEN_HOLDER_MISMATCH` rather than silently replacing the holder."
    },
    "language": {
      "allOf": [
        {
          "$ref": "#/$defs/Language"
        }
      ],
      "description": "Preferred language for a holder created by this call. Defaults to `es`. Ignored when the account already has a holder."
    }
  },
  "$defs": {
    "Language": {
      "type": "string",
      "description": "Supported languages: `es` Spanish, `en` English, `ca` Catalan.\n",
      "enum": [
        "es",
        "en",
        "ca"
      ]
    }
  }
}