WorkOS · Schema

EventSchema

An event emitted by WorkOS.

AuthenticationIdentity ProviderSSOSAMLOpenID ConnectSCIMDirectory SyncAuthorizationFGAAudit LogsMFAB2B SaaSAgentsMCPIdentity Federation

Properties

Name Type Description
object string Distinguishes the Event object.
id string Unique identifier for the Event.
event string The type of event that occurred.
data object The event payload.
created_at string An ISO 8601 timestamp.
context object Additional context about the event.
View JSON Schema on GitHub

JSON Schema

workos-eventschema-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/EventSchema",
  "title": "EventSchema",
  "allOf": [
    {
      "type": "object",
      "properties": {
        "object": {
          "type": "string",
          "description": "Distinguishes the Event object.",
          "const": "event"
        },
        "id": {
          "type": "string",
          "description": "Unique identifier for the Event.",
          "example": "event_01EHZNVPK3SFK441A1RGBFSHRT"
        },
        "event": {
          "type": "string",
          "description": "The type of event that occurred.",
          "example": "dsync.user.created"
        },
        "data": {
          "type": "object",
          "additionalProperties": {},
          "description": "The event payload.",
          "example": {
            "id": "directory_user_01E1JG7J09H96KYP8HM9B0G5SJ",
            "directory_id": "directory_01ECAZ4NV9QMV47GW873HDCX74",
            "organization_id": "org_01EZTR6WYX1A0DSE2CYMGXQ24Y",
            "state": "active",
            "email": "veda@foo-corp.com",
            "emails": [
              {
                "primary": true,
                "type": "work",
                "value": "veda@foo-corp.com"
              }
            ],
            "idp_id": "2836",
            "object": "directory_user",
            "username": "veda@foo-corp.com",
            "last_name": "Torp",
            "first_name": "Veda",
            "raw_attributes": {},
            "custom_attributes": {},
            "created_at": "2021-06-25T19:07:33.155Z",
            "updated_at": "2021-06-25T19:07:33.155Z"
          }
        },
        "created_at": {
          "format": "date-time",
          "type": "string",
          "description": "An ISO 8601 timestamp.",
          "example": "2026-01-15T12:00:00.000Z"
        },
        "context": {
          "type": "object",
          "additionalProperties": {},
          "description": "Additional context about the event."
        }
      },
      "required": [
        "object",
        "id",
        "event",
        "data",
        "created_at"
      ],
      "description": "An event emitted by WorkOS.",
      "example": {
        "object": "event",
        "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
        "event": "dsync.user.created",
        "data": {
          "id": "directory_user_01E1JG7J09H96KYP8HM9B0G5SJ",
          "directory_id": "directory_01ECAZ4NV9QMV47GW873HDCX74",
          "organization_id": "org_01EZTR6WYX1A0DSE2CYMGXQ24Y",
          "state": "active",
          "email": "veda@foo-corp.com",
          "emails": [
            {
              "primary": true,
              "type": "work",
              "value": "veda@foo-corp.com"
            }
          ],
          "idp_id": "2836",
          "object": "directory_user",
          "username": "veda@foo-corp.com",
          "last_name": "Torp",
          "first_name": "Veda",
          "raw_attributes": {},
          "custom_attributes": {},
          "created_at": "2021-06-25T19:07:33.155Z",
          "updated_at": "2021-06-25T19:07:33.155Z"
        },
        "created_at": "2021-06-25T19:07:33.155Z",
        "context": {}
      }
    },
    {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Unique identifier for the event.",
              "example": "event_01EHZNVPK3SFK441A1RGBFSHRT"
            },
            "event": {
              "type": "string",
              "const": "action.authentication.denied"
            },
            "data": {
              "type": "object",
              "properties": {
                "action_endpoint_id": {
                  "type": "string",
                  "description": "The ID of the action endpoint.",
                  "example": "action_endpoint_01EHWNCE74X7JSDV0X3SZ3KJNY"
                },
                "action_execution_id": {
                  "type": "string",
                  "description": "The ID of the action execution.",
                  "example": "action_execution_01EHWNCE74X7JSDV0X3SZ3KJNY"
                },
                "type": {
                  "type": "string",
                  "description": "The type of action that was denied.",
                  "const": "authentication"
                },
                "verdict": {
                  "type": "string",
                  "description": "The verdict of the action.",
                  "const": "Deny"
                },
                "user_id": {
                  "type": "string",
                  "description": "The ID of the user.",
                  "example": "user_01EHWNCE74X7JSDV0X3SZ3KJNY"
                },
                "organization_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The ID of the organization.",
                  "example": "org_01EHWNCE74X7JSDV0X3SZ3KJNY"
                },
                "email": {
                  "type": "string",
                  "description": "The email address of the user.",
                  "example": "user@example.com"
                },
                "ip_address": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The IP address of the request.",
                  "example": "203.0.113.1"
                },
                "user_agent": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The user agent of the request.",
                  "example": "Mozilla/5.0"
                }
              },
              "required": [
                "action_endpoint_id",
                "action_execution_id",
                "type",
                "verdict",
                "user_id",
                "organization_id",
                "email",
                "ip_address",
                "user_agent"
              ],
              "description": "The event payload."
            },
            "context": {
              "$ref": "#/components/schemas/EventContextDto"
            },
            "created_at": {
              "format": "date-time",
              "type": "string",
              "description": "An ISO 8601 timestamp.",
              "example": "2026-01-15T12:00:00.000Z"
            },
            "object": {
              "type": "string",
              "description": "Distinguishes the Event object.",
              "const": "event"
            }
          },
          "required": [
            "id",
            "event",
            "data",
            "created_at",
            "object"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Unique identifier for the event.",
              "example": "event_01EHZNVPK3SFK441A1RGBFSHRT"
            },
            "event": {
              "type": "string",
              "const": "action.user_registration.denied"
            },
            "data": {
              "type": "object",
              "properties": {
                "action_endpoint_id": {
                  "type": "string",
                  "description": "The ID of the action endpoint.",
                  "example": "action_endpoint_01EHWNCE74X7JSDV0X3SZ3KJNY"
                },
                "action_execution_id": {
                  "type": "string",
                  "description": "The ID of the action execution.",
                  "example": "action_execution_01EHWNCE74X7JSDV0X3SZ3KJNY"
                },
                "type": {
                  "type": "string",
                  "description": "The type of action that was denied.",
                  "const": "user_registration"
                },
                "verdict": {
                  "type": "string",
                  "description": "The verdict of the action.",
                  "const": "Deny"
                },
                "organization_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The ID of the organization.",
                  "example": "org_01EHWNCE74X7JSDV0X3SZ3KJNY"
                },
                "email": {
                  "type": "string",
                  "description": "The email address of the user.",
                  "example": "user@example.com"
                },
                "ip_address": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The IP address of the request.",
                  "example": "203.0.113.1"
                },
                "user_agent": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The user agent of the request.",
                  "example": "Mozilla/5.0"
                }
              },
              "required": [
                "action_endpoint_id",
                "action_execution_id",
                "type",
                "verdict",
                "organization_id",
                "email",
                "ip_address",
                "user_agent"
              ],
              "description": "The event payload."
            },
            "context": {
              "$ref": "#/components/schemas/EventContextDto"
            },
            "created_at": {
              "format": "date-time",
              "type": "string",
              "description": "An ISO 8601 timestamp.",
              "example": "2026-01-15T12:00:00.000Z"
            },
            "object": {
              "type": "string",
              "description": "Distinguishes the Event object.",
              "const": "event"
            }
          },
          "required": [
            "id",
            "event",
            "data",
            "created_at",
            "object"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Unique identifier for the event.",
              "example": "event_01EHZNVPK3SFK441A1RGBFSHRT"
            },
            "event": {
              "type": "string",
              "const": "api_key.created"
            },
            "data": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "description": "Distinguishes the API key object.",
                  "const": "api_key"
                },
                "id": {
                  "type": "string",
                  "description": "Unique identifier of the API key.",
                  "example": "api_key_01EHWNCE74X7JSDV0X3SZ3KJNY"
                },
                "owner": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "The type of the API key owner.",
                          "const": "organization"
                        },
                        "id": {
                          "type": "string",
                          "description": "The unique identifier of the API key owner.",
                          "example": "org_01EHWNCE74X7JSDV0X3SZ3KJNY"
                        }
                      },
                      "required": [
                        "type",
                        "id"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "The type of the API key owner.",
                          "const": "user"
                        },
                        "id": {
                          "type": "string",
                          "description": "The unique identifier of the user who owns the API key.",
                          "example": "user_01EHWNCE74X7JSDV0X3SZ3KJNY"
                        },
                        "organization_id": {
                          "type": "string",
                          "description": "The unique identifier of the organization the API key belongs to.",
                          "example": "org_01EHWNCE74X7JSDV0X3SZ3KJNY"
                        }
                      },
                      "required": [
                        "type",
                        "id",
                        "organization_id"
                      ]
                    }
                  ],
                  "description": "The owner of the API key."
                },
                "name": {
                  "type": "string",
                  "description": "The name of the API key.",
                  "example": "My API Key"
                },
                "obfuscated_value": {
                  "type": "string",
                  "description": "The obfuscated value of the API key.",
                  "example": "sk_test_...1234"
                },
                "last_used_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The timestamp when the API key was last used.",
                  "example": "2026-01-15T12:00:00.000Z"
                },
                "permissions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The permissions granted to the API key.",
                  "example": [
                    "users:read",
                    "users:write"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "description": "The timestamp when the API key was created.",
                  "example": "2026-01-15T12:00:00.000Z"
                },
                "updated_at": {
                  "type": "string",
                  "description": "The timestamp when the API key was last updated.",
                  "example": "2026-01-15T12:00:00.000Z"
                }
              },
              "required": [
                "object",
                "id",
                "owner",
                "name",
                "obfuscated_value",
                "last_used_at",
                "permissions",
                "created_at",
                "updated_at"
              ],
              "description": "The event payload."
            },
            "created_at": {
              "format": "date-time",
              "type": "string",
              "description": "An ISO 8601 timestamp.",
              "example": "2026-01-15T12:00:00.000Z"
            },
            "context": {
              "$ref": "#/components/schemas/EventContextDto"
            },
            "object": {
              "type": "string",
              "description": "Distinguishes the Event object.",
              "const": "event"
            }
          },
          "required": [
            "id",
            "event",
            "data",
            "created_at",
            "object"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Unique identifier for the event.",
              "example": "event_01EHZNVPK3SFK441A1RGBFSHRT"
            },
            "event": {
              "type": "string",
              "const": "api_key.revoked"
            },
            "data": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "description": "Distinguishes the API key object.",
                  "const": "api_key"
                },
                "id": {
                  "type": "string",
                  "description": "Unique identifier of the API key.",
                  "example": "api_key_01EHWNCE74X7JSDV0X3SZ3KJNY"
                },
                "owner": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "The type of the API key owner.",
                          "const": "organization"
                        },
                        "id": {
                          "type": "string",
                          "description": "The unique identifier of the API key owner.",
                          "example": "org_01EHWNCE74X7JSDV0X3SZ3KJNY"
                        }
                      },
                      "required": [
                        "type",
                        "id"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "The type of the API key owner.",
                          "const": "user"
                        },
                        "id": {
                          "type": "string",
                          "description": "The unique identifier of the user who owns the API key.",
                          "example": "user_01EHWNCE74X7JSDV0X3SZ3KJNY"
                        },
                        "organization_id": {
                          "type": "string",
                          "description": "The unique identifier of the organization the API key belongs to.",
                          "example": "org_01EHWNCE74X7JSDV0X3SZ3KJNY"
                        }
                      },
                      "required": [
                        "type",
                        "id",
                        "organization_id"
                      ]
                    }
                  ],
                  "description": "The owner of the API key."
                },
                "name": {
                  "type": "string",
                  "description": "The name of the API key.",
                  "example": "My API Key"
                },
                "obfuscated_value": {
                  "type": "string",
                  "description": "The obfuscated value of the API key.",
                  "example": "sk_test_...1234"
                },
                "last_used_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The timestamp when the API key was last used.",
                  "example": "2026-01-15T12:00:00.000Z"
                },
                "permissions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The permissions granted to the API key.",
                  "example": [
                    "users:read",
                    "users:write"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "description": "The timestamp when the API key was created.",
                  "example": "2026-01-15T12:00:00.000Z"
                },
                "updated_at": {
                  "type": "string",
                  "description": "The timestamp when the API key was last updated.",
                  "example": "2026-01-15T12:00:00.000Z"
                }
              },
              "required": [
                "object",
                "id",
                "owner",
                "name",
                "obfuscated_value",
                "last_used_at",
                "permissions",
                "created_at",
                "updated_at"
              ],
              "description": "The event payload."
            },
            "created_at": {
              "format": "date-time",
              "type": "string",
              "description": "An ISO 8601 timestamp.",
              "example": "2026-01-15T12:00:00.000Z"
            },
            "context": {
              "$ref": "#/components/schemas/EventContextDto"
            },
            "object": {
              "type": "string",
              "description": "Distinguishes the Event object.",
              "const": "event"
            }
          },
          "required": [
            "id",
            "event",
            "data",
            "created_at",
            "object"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Unique identifier for the event.",
              "example": "event_01EHZNVPK3SFK441A1RGBFSHRT"
            },
            "event": {
              "type": "string",
              "const": "authentication.email_verification_failed"
            },
            "data": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "email_verification"
                },
                "status": {
                  "type": "string",
                  "const": "failed"
                },
                "ip_address": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The IP address of the request.",
                  "example": "203.0.113.42"
                },
                "user_agent": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The user agent of the request.",
                  "example": "Mozilla/5.0"
                },
                "user_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The ID of the user.",
                  "example": "user_01E4ZCR3C56J083X43JQXF3JK5"
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The email address of the user.",
                  "example": "user@example.com"
                },
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "description": "The error code.",
                      "example": "mfa_challenge_failed"
                    },
                    "message": {
                      "type": "string",
                      "description": "A human-readable error message.",
                      "example": "The MFA challenge has failed."
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "description": "Details about the authentication error."
                }
              },
              "required": [
                "type",
                "status",
                "ip_address",
                "user_agent",
                "user_id",
                "email",
                "error"
              ],
              "description": "The event payload."
            },
            "created_at": {
              "format": "date-time",
              "type": "string",
              "description": "An ISO 8601 timestamp.",
              "example": "2026-01-15T12:00:00.000Z"
            },
            "context": {
              "$ref": "#/components/schemas/EventContextDto"
            },
            "object": {
              "type": "string",
              "description": "Distinguishes the Event object.",
              "const": "event"
            }
          },
          "required": [
            "id",
            "event",
            "data",
            "created_at",
            "object"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Unique identifier for the event.",
              "example": "event_01EHZNVPK3SFK441A1RGBFSHRT"
            },
            "event": {
              "type": "string",
              "const": "authentication.email_verification_succeeded"
            },
            "data": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "email_verification"
                },
                "status": {
                  "type": "string",
                  "const": "succeeded"
                },
                "ip_address": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The IP address of the request.",
                  "example": "203.0.113.42"
                },
                "user_agent": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The user agent of the request.",
                  "example": "Mozilla/5.0"
                },
                "user_id": {
                  "type": "string",
                  "description": "The ID of the user.",
                  "example": "user_01E4ZCR3C56J083X43JQXF3JK5"
                },
                "email": {
                  "type": "string",
                  "description": "The email address of the user.",
                  "example": "user@example.com"
                }
              },
              "required": [
                "type",
                "status",
                "ip_address",
                "user_agent",
                "user_id",
                "email"
              ],
              "description": "The event payload."
            },
            "created_at": {
              "format": "date-time",
              "type": "string",
              "description": "An ISO 8601 timestamp.",
              "example": "2026-01-15T12:00:00.000Z"
            },
            "context": {
              "$ref": "#/components/schemas/EventContextDto"
            },
            "object": {
              "type": "string",
              "description": "Distinguishes the Event object.",
              "const": "event"
            }
          },
          "required": [
            "id",
            "event",
            "data",
            "created_at",
            "object"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Unique identifier for the event.",
              "example": "event_01EHZNVPK3SFK441A1RGBFSHRT"
            },
            "event": {
              "type": "string",
              "const": "authentication.magic_auth_failed"
            },
            "data": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "magic_auth"
                },
                "status": {
                  "type": "string",
                  "const": "failed"
                },
                "ip_address": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The IP address of the request.",
                  "example": "203.0.113.42"
                },
                "user_agent": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The user agent of the request.",
                  "example": "Mozilla/5.0"
                },
                "user_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The ID of the user.",
                  "example": "user_01E4ZCR3C56J083X43JQXF3JK5"
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The email address of the user.",
                  "example": "user@example.com"
                },
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "description": "The error code.",
                      "example": "mfa_challenge_failed"
                    },
                    "message": {
                      "type": "string",
                      "description": "A human-readable error message.",
                      "example": "The MFA challenge has failed."
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "description": "Details about the authentication error."
                }
              },
              "required": [
                "type",
                "status",
                "ip_address",
                "user_agent",
                "user_id",
                "email",
                "error"
              ],
              "description": "The event payload."
            },
            "created_at": {
              "format": "date-time",
              "type": "string",
              "description": "An ISO 8601 timestamp.",
              "example": "2026-01-15T12:00:00.000Z"
            },
            "context": {
              "$ref": "#/components/schemas/EventContextDto"
            },
            "object": {
              "type": "string",
              "description": "Distinguishes the Event object.",
              "const": "event"
            }
          },
          "required": [
            "id",
            "event",
            "data",
            "created_at",
            "object"
          ]
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Unique identifier for the event.",
              "example": "event_01EHZNVPK3SFK441A1RGBFSHRT"
            },
            "event": {
              "type": "string",
              "const": "authentication.magic_auth_succeeded"
            },
            "data": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "magic_auth"
                },
                "status": {
                  "type": "string",
                  "const": "succeeded"
                },
                "ip_address": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The IP address of the request.",
                  "example": "203.0.113.42"
                },
                "user_agent": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The user agent of the request.",
                  "example": "Mozilla/5.0"
                },
                "user_id": {
                  "type": "string",
                  "description": "The ID of the user.",
                  "example": "user_01E4ZCR3C56J083X43JQXF3JK5"
                },
                "email": {
                  "type": "string",
                  "description": "The email address of the user.",
                  "example": "user@example.com"
                }
              },
              "required": [
                "type",
                "status",
                "ip_address",
                "user_agent",
                "user_id",
                "email"
              ],
              "description": "The event payload."
            },
            "created_at": {
              "format": "date-time",
              "type": "string",
              "description": "An ISO 8601 timestamp.",
              "

# --- truncated at 32 KB (338 KB total) ---
# Full source: https://artifacts.apis.io/workos/json-schema/workos-eventschema-schema.json

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/workos-eventschema"
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. See our Privacy Policy and Terms.

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