{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/two/json-schema/two-create-merchant-apikey-response-schema-schema.json",
  "title": "CreateMerchantAPIKeyResponseSchema",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/two-api-key-api-openapi.yml#/components/schemas/CreateMerchantAPIKeyResponseSchema",
  "properties": {
    "id": {
      "description": "Unique identifier of the API key",
      "format": "uuid",
      "title": "Id",
      "type": "string"
    },
    "hint": {
      "description": "Hint for the API key (last 4 characters)",
      "title": "Hint",
      "type": "string"
    },
    "label": {
      "description": "Label for the API key (e.g. how it was created)",
      "title": "Label",
      "type": "string"
    },
    "issued_by": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Immutable record of how the API key was created (read-only)",
      "title": "Issued By"
    },
    "date_created": {
      "description": "Date that the API key was created (UTC)",
      "format": "date-time",
      "title": "Date Created",
      "type": "string"
    },
    "date_last_used": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Date that the API key was last used (UTC)",
      "title": "Date Last Used"
    },
    "date_expiry": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Date that the API key expires (UTC)",
      "title": "Date Expiry"
    },
    "usage_count": {
      "description": "Number of times the API key has been used",
      "title": "Usage Count",
      "type": "integer"
    },
    "merchant_id": {
      "description": "Unique identifier of the merchant",
      "format": "uuid",
      "title": "Merchant Id",
      "type": "string"
    },
    "api_key": {
      "description": "Newly created API key to pass with X-Api-Key header",
      "title": "Api Key",
      "type": "string"
    }
  },
  "required": [
    "id",
    "hint",
    "label",
    "date_created",
    "usage_count",
    "merchant_id",
    "api_key"
  ],
  "type": "object"
}