{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/medianfi-com/json-schema/medianfi-com-create-service-api-key-input-schema.json",
  "title": "CreateServiceApiKeyInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/medianfi-com-admin-api-openapi.yml#/components/schemas/CreateServiceApiKeyInput",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "expiresInDays": {
      "type": "integer",
      "minimum": 1,
      "maximum": 7,
      "description": "Requested lifetime in days, at most 7 (#1147). The server also caps it at its configured service-key default.\n"
    },
    "principal": {
      "type": "string",
      "enum": [
        "bookkeeping",
        "agent"
      ],
      "default": "bookkeeping",
      "description": "Which machine principal owns the key. `agent` returns 503 unless the deployment enables the bookkeeping agent.\n"
    }
  }
}