{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/xcatcher-top/json-schema/xcatcher-top-key-create-schema.json",
  "title": "KeyCreate",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/xcatcher-top-openapi.yml#/components/schemas/KeyCreate",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "default": "agent-key"
    },
    "scopes": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "account:read",
          "tasks:read",
          "tasks:write",
          "results:read",
          "payments:write",
          "keys:manage"
        ]
      }
    },
    "expires_in_days": {
      "type": "integer",
      "minimum": 1,
      "maximum": 365,
      "default": 90
    }
  }
}