{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/clarifymedical/json-schema/clarifymedical-create-api-keys-request-dto-schema.json",
  "title": "CreateApiKeysRequestDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clarifymedical-api-keys-api-openapi.yml#/components/schemas/CreateApiKeysRequestDto",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "api-key"
          ],
          "description": "The resource type, always `api-key`."
        },
        "attributes": {
          "description": "Field values keyed by field name; available fields depend on the object’s schema. System fields (prefixed with a single `_`) cannot be set.",
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The display name of the API key."
            },
            "scopes": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "The access scopes to record on the key, such as `manage:entities`. Defaults to an empty list."
            },
            "actor_type": {
              "type": "string",
              "enum": [
                "workspace",
                "user"
              ],
              "description": "Who the key acts as: `user` for a personal key bound to you, or `workspace` for an admin-only key not tied to a person. Defaults to `user`."
            }
          },
          "required": [
            "name"
          ],
          "additionalProperties": true
        }
      },
      "required": [
        "type",
        "attributes"
      ],
      "additionalProperties": false,
      "description": "The resource to create."
    }
  },
  "required": [
    "data"
  ]
}