{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/arena-predictions-com/json-schema/arena-predictions-com-key-create-request-schema.json",
  "title": "KeyCreateRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/arena-predictions-com-api-keys-api-openapi.yml#/components/schemas/KeyCreateRequest",
  "type": "object",
  "properties": {
    "label": {
      "type": "string",
      "maxLength": 64,
      "description": "Trimmed; an empty label becomes \"Untitled key\"."
    },
    "scopes": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string",
        "enum": [
          "records:read",
          "portfolio:read",
          "markets:read",
          "trade:write",
          "trade:write:kalshi",
          "trade:write:poly-intl",
          "trade:write:prophetx"
        ]
      },
      "description": "Defaults to records:read, portfolio:read and markets:read. trade:write is never a default: name it to place and cancel paper orders. While trading with keys is switched off it is refused (403 scope_not_available). trade:write:kalshi and trade:write:poly-intl are never defaults either: name one to send orders to your own venue account with the venue credentials saved in Settings (each is refused with 403 scope_not_available while its venue's orders are switched off). trade:write:prophetx is not issued: ProphetX orders are switched off."
    },
    "expiresInDays": {
      "type": "integer",
      "minimum": 1,
      "maximum": 365,
      "description": "Omit for a key that never expires."
    }
  }
}