{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/call2me-app/json-schema/call2me-app-create-apikey-request-schema.json",
  "title": "CreateAPIKeyRequest",
  "description": "Request to create a new API key.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/call2me-app-api-keys-api-openapi.yml#/components/schemas/CreateAPIKeyRequest",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1,
      "title": "Name",
      "description": "Name for the API key"
    },
    "permissions": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Permissions",
      "description": "Permissions for the key",
      "default": []
    },
    "rate_limit": {
      "type": "integer",
      "maximum": 10000.0,
      "minimum": 1.0,
      "title": "Rate Limit",
      "description": "Rate limit per minute (max 10000)",
      "default": 1000
    },
    "read_only": {
      "type": "boolean",
      "title": "Read Only",
      "description": "If true, the key may only make GET/HEAD/OPTIONS (read) requests.",
      "default": false
    },
    "expires_in_days": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Expires In Days",
      "description": "Expiration in days"
    }
  },
  "type": "object",
  "required": [
    "name"
  ]
}