{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amigo/main/json-schema/amigo-create-api-key-response-schema.json",
  "title": "CreateApiKeyResponse",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amigo-api-keys-api-openapi.yml#/components/schemas/CreateApiKeyResponse",
  "properties": {
    "key_id": {
      "type": "string",
      "title": "Key Id"
    },
    "api_key": {
      "type": "string",
      "title": "Api Key"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Name"
    },
    "role": {
      "type": "string",
      "title": "Role"
    },
    "permissions": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Permissions"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "title": "Expires At"
    },
    "created_by_entity_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created By Entity Id"
    },
    "created_by_credential_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created By Credential Id"
    }
  },
  "type": "object",
  "required": [
    "key_id",
    "api_key",
    "name",
    "role",
    "permissions",
    "expires_at",
    "created_by_entity_id",
    "created_by_credential_id"
  ]
}