{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vertesiahq/json-schema/vertesiahq-update-api-key-payload-schema.json",
  "title": "UpdateApiKeyPayload",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vertesiahq-api-keys-api-openapi.yml#/components/schemas/UpdateApiKeyPayload",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "role": {
      "$ref": "#/$defs/SystemRoles"
    },
    "enabled": {
      "type": "boolean"
    },
    "scim_provisioning": {
      "type": "boolean",
      "description": "Organization-wide SCIM provisioning credential. Only account administrators may create or manage these keys. May be enabled by account administrators on existing keys; disable or delete to revoke access."
    },
    "properties": {
      "type": "object",
      "additionalProperties": true,
      "description": "Custom properties for dynamic permission matching (PrincipalSet / $principal. conditions)"
    },
    "clearance": {
      "type": "number",
      "description": "BLP clearance level — the maximum document sensitivity the key can access"
    },
    "compartments": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Compartments the key belongs to — restricts access to matching documents"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "SystemRoles": {
      "type": "string",
      "enum": [
        "owner",
        "admin",
        "app_admin",
        "manager",
        "developer",
        "application",
        "automation",
        "content_processor",
        "consumer",
        "executor",
        "reader",
        "auditor",
        "support",
        "billing",
        "member",
        "app_member",
        "content_superadmin"
      ]
    }
  }
}