Skycloak · Schema

Event

A Keycloak event recorded for a cluster. Fields present depend on `category`: user-event fields are absent for admin events and vice versa.

IdentityIdentity and Access ManagementAuthenticationSoftware-as-a-ServiceSecurity

Properties

Name Type Description
id string
timestamp string
category object
realm_id string
realm_name string
client_id string OAuth2 client ID.
ip_address string Source IP address of the request.
geo object GeoIP data resolved from `ip_address`.
type object User event type code. Present when `category` is `user`.
user_id string Keycloak user UUID. Present when `category` is `user`.
username string On a user event, the user the event is about. On an admin event, the administrator who performed the action, when the audit pipeline resolved a name for them.
session_id string OAuth2 session identifier. Present when `category` is `user`.
auth_method string Authentication method. Present when `category` is `user`.
identity_provider string Federated identity provider alias, when an external login was used. Present when `category` is `user`.
grant_type string OAuth2 grant type. Present when `category` is `user`.
is_m2m boolean Whether this was a machine-to-machine (client credentials grant) authentication. Present when `category` is `user`.
error string Error code for failed events (e.g. `invalid_user_credentials`). Present when `category` is `user` and the event represents a failure.
operation_type object Admin operation type (e.g. `CREATE`, `UPDATE`, `DELETE`). Present when `category` is `admin`.
resource_type string Type of resource affected (e.g. `USER`, `REALM`, `CLIENT`, `GROUP`). Present when `category` is `admin`.
resource_path string Full resource path. Present when `category` is `admin`.
auth_user_id string Keycloak UUID of the administrator who performed the action. Present when `category` is `admin` and Keycloak recorded an authenticated actor. Distinct from `user_id`, which on a user event is the subj
View JSON Schema on GitHub

JSON Schema

skycloak-io-event-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/skycloak-io/json-schema/skycloak-io-event-schema.json",
  "title": "Event",
  "description": "A Keycloak event recorded for a cluster. Fields present depend on `category`: user-event fields are absent for admin events and vice versa.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/skycloak-io-openapi.yaml#/components/schemas/Event",
  "type": "object",
  "required": [
    "id",
    "timestamp",
    "category",
    "realm_id",
    "realm_name"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "category": {
      "$ref": "#/$defs/EventCategory"
    },
    "realm_id": {
      "type": "string"
    },
    "realm_name": {
      "type": "string"
    },
    "client_id": {
      "type": "string",
      "description": "OAuth2 client ID."
    },
    "ip_address": {
      "type": "string",
      "description": "Source IP address of the request."
    },
    "geo": {
      "allOf": [
        {
          "$ref": "#/$defs/EventGeoLocation"
        }
      ],
      "description": "GeoIP data resolved from `ip_address`."
    },
    "type": {
      "allOf": [
        {
          "$ref": "#/$defs/UserEventType"
        }
      ],
      "description": "User event type code. Present when `category` is `user`."
    },
    "user_id": {
      "type": "string",
      "format": "uuid",
      "description": "Keycloak user UUID. Present when `category` is `user`."
    },
    "username": {
      "type": "string",
      "description": "On a user event, the user the event is about. On an admin event, the\nadministrator who performed the action, when the audit pipeline resolved a\nname for them."
    },
    "session_id": {
      "type": "string",
      "description": "OAuth2 session identifier. Present when `category` is `user`."
    },
    "auth_method": {
      "type": "string",
      "description": "Authentication method. Present when `category` is `user`."
    },
    "identity_provider": {
      "type": "string",
      "description": "Federated identity provider alias, when an external login was used. Present when `category` is `user`."
    },
    "grant_type": {
      "type": "string",
      "description": "OAuth2 grant type. Present when `category` is `user`."
    },
    "is_m2m": {
      "type": "boolean",
      "description": "Whether this was a machine-to-machine (client credentials grant) authentication. Present when `category` is `user`."
    },
    "error": {
      "type": "string",
      "description": "Error code for failed events (e.g. `invalid_user_credentials`). Present when `category` is `user` and the event represents a failure."
    },
    "operation_type": {
      "allOf": [
        {
          "$ref": "#/$defs/AdminOperationType"
        }
      ],
      "description": "Admin operation type (e.g. `CREATE`, `UPDATE`, `DELETE`). Present when `category` is `admin`."
    },
    "resource_type": {
      "type": "string",
      "description": "Type of resource affected (e.g. `USER`, `REALM`, `CLIENT`, `GROUP`). Present when `category` is `admin`."
    },
    "resource_path": {
      "type": "string",
      "description": "Full resource path. Present when `category` is `admin`."
    },
    "auth_user_id": {
      "type": "string",
      "format": "uuid",
      "description": "Keycloak UUID of the administrator who performed the action. Present when\n`category` is `admin` and Keycloak recorded an authenticated actor.\n\nDistinct from `user_id`, which on a user event is the subject of the event.\nOn an admin event the subject is identified by `resource_path` instead, so\nthe actor needs a field of its own.\n\nA UUID. The actor's name, when the audit pipeline resolved one, is on\n`username`; a federated administrator has no UUID id, so `username` may be\npresent while this is absent."
    }
  },
  "$defs": {
    "AdminOperationType": {
      "type": "string",
      "enum": [
        "CREATE",
        "UPDATE",
        "DELETE",
        "ACTION"
      ]
    },
    "EventCategory": {
      "type": "string",
      "enum": [
        "user",
        "admin"
      ],
      "description": "Keycloak event category."
    },
    "EventGeoLocation": {
      "type": "object",
      "required": [
        "country_code",
        "country",
        "city",
        "latitude",
        "longitude"
      ],
      "properties": {
        "country_code": {
          "type": "string",
          "description": "ISO 3166-1 alpha-2 country code."
        },
        "country": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "latitude": {
          "type": "number",
          "format": "double"
        },
        "longitude": {
          "type": "number",
          "format": "double"
        }
      },
      "description": "GeoIP location derived from the source IP address. Present only when GeoIP data is available."
    },
    "UserEventType": {
      "type": "string",
      "enum": [
        "LOGIN",
        "LOGIN_ERROR",
        "LOGOUT",
        "REGISTER",
        "REGISTER_ERROR",
        "CODE_TO_TOKEN",
        "CODE_TO_TOKEN_ERROR",
        "REFRESH_TOKEN",
        "INTROSPECT_TOKEN",
        "CLIENT_LOGIN",
        "CLIENT_LOGIN_ERROR",
        "UPDATE_PROFILE",
        "UPDATE_EMAIL",
        "UPDATE_PASSWORD",
        "UPDATE_TOTP",
        "REMOVE_TOTP",
        "VERIFY_EMAIL",
        "SEND_RESET_PASSWORD",
        "RESET_PASSWORD",
        "FEDERATED_IDENTITY_LINK",
        "REMOVE_FEDERATED_IDENTITY",
        "IDENTITY_PROVIDER_LOGIN",
        "IDENTITY_PROVIDER_FIRST_LOGIN"
      ]
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/skycloak-io-event"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.