{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vistalink-com/json-schema/vistalink-com-create-key-request-schema.json",
  "title": "CreateKeyRequest",
  "description": "POST /v1/keys request body.\n\nOmitting ``scopes`` and both expiry fields keeps the previous behaviour\nwhen the calling key itself holds every scope and does not expire: the new\nkey gets every scope and no expiry. A narrower or expiring caller cannot\ngrant more than it has.",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vistalink-com-openapi.json#/components/schemas/CreateKeyRequest",
  "properties": {
    "environment": {
      "type": "string",
      "pattern": "^(live|test)$",
      "title": "Environment",
      "default": "test"
    },
    "label": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ],
      "title": "Label"
    },
    "scopes": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Scopes",
      "description": "Non-empty subset of search, content, rates, reconcile, booking, chat, quotes. Duplicates are ignored. Omit to grant the calling key's scopes (every scope, when it holds them all)."
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expires At",
      "description": "RFC 3339 instant, in the future and at most 366 days ahead. Not with expires_in_days."
    },
    "expires_in_days": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expires In Days",
      "description": "Whole days from now, 1–366. Not with expires_at."
    }
  },
  "type": "object"
}