{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/knoxcall/json-schema/knoxcall-vault-token-created-schema.json",
  "title": "VaultTokenCreated",
  "description": "The result of tokenizing a value.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/knoxcall-vaults-api-openapi.yml#/components/schemas/VaultTokenCreated",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "token": {
      "type": "string",
      "description": "The token string — store this in place of the original value."
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "card_expires_on": {
      "type": [
        "string",
        "null"
      ],
      "format": "date",
      "description": "The LAST DAY of the payment card's expiry month (`2029-07-31`), for a token in a `pan` vault whose tokenize call supplied one; `null` otherwise. NOT the token's lifetime — that is `expires_at`. Tokens created before 2026-09-17 carry `null` and cannot be backfilled: the expiry was never captured, so they receive no `vault.token.expiring` event until they are tokenized again."
    },
    "card_funding_type": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "credit",
        "debit",
        "prepaid",
        null
      ],
      "description": "How the issuing bank funds the card, looked up from its first six digits at tokenize time for a token in a `pan` vault. Advisory metadata for your own routing and fraud rules — KnoxCall makes no decision on it. **Ships `null` on every token**: BIN data comes from a licensed table and KnoxCall has not licensed one, so treat both BIN fields as optional indefinitely. Also `null` for every non-`pan` vault, and for any BIN a future table does not carry."
    },
    "card_issuing_country": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 2,
      "maxLength": 2,
      "pattern": "^[A-Z]{2}$",
      "description": "The issuing bank's country as ISO 3166-1 alpha-2, upper case, looked up from the card's first six digits at tokenize time. Same availability as `card_funding_type`: **`null` on every token today**, and `null` for any card whose issuer is not in the table."
    }
  }
}