Webhook Event Types
Every event you can subscribe a webhook to, grouped by scope.
Overview
When something changes in Canopy (a role is assigned, an identity is created, a node moves), an event fires. A webhook subscription lists the event types it wants, and Canopy delivers a signed HTTP POST to your endpoint for each matching change. Subscribe to a specific set, or use the wildcard "*" to receive every event in the subscription's scope (including ones added later).
Events come in two scopes
Canopy's data model is two-tiered, so events are too. Environment-scoped events carry an environment_id and cover authorization config (assignments, roles, permissions, and hierarchy nodes), delivered to env-scoped subscriptions. Account-scoped events span environments (identity lifecycle, membership, and sessions), delivered to account-scoped subscriptions. The identity events that concern an Environment are delivered in both: to the account, and to each Environment the identity belongs to. Every other event reaches only its own scope.
Environment events
Fired by changes to an Environment's authorization configuration, however they were made: by hand, by API, by an accepted invitation, by a first sign-in through SSO, or by a customer's directory. Delivered to environment-scoped subscriptions. The four identity events at the top are shared with the account scope: an environment subscription receives the ones about its own Environment, so one subscription follows the fate of the identities in it. The scim.* events are the directory's own activity, for mirroring the directory rather than its results.
Membership events describe admission; assignment events describe the roles. Adding a member with a role fires organization.member.added and assignment.created, and without one organization.member.added alone; changing or removing a role held in the organization fires assignment.updated or assignment.removed; removing a member fires organization.member.removed, counting the assignments that went with the membership, and no assignment events for them. organization.member.role_changed is directory sync's: a mapped group moving a member between roles, or the role people arrive with changing. Subscribe to whichever family you reason in, not both, unless you deduplicate. A membership created by a just-in-time SSO sign-in through a bound connection fires organization.member.added only, and its data.metadata carries source: "sso_jit" and the connection_id, so a consumer can tell a provisioned membership from one an administrator added. An invitation into an organization, accepted by the invitee, fires organization.member.added with source: "invite", the invite_id and the membership_id, beside assignment.created when it carries a role; accepted by someone who is already a member, it fires assignment.created alone, or assignment.updated when it opens again a role they held there that had ended. identity.env_membership.added carries the same marker when that sign-in also created the identity's Environment membership. Directory sync announces the same events. A person an organization's identity provider pushes fires organization.member.added; a group mapped or unmapped, or the provider moving somebody between groups, fires organization.member.role_changed for each member whose role moved; a person the provider removes fires organization.member.removed. Each carries source: "scim" and the directory_id, and none is paired with an assignment.* event, as a just-in-time membership is not. A group mapped to a node beneath the organization grants and withdraws roles there, announced as assignment.bulk_created and assignment.bulk_removed with the same marker.
Account events
Account-scoped events span environments, because identities live at the Account level. They are delivered to account-scoped subscriptions, created from the Console's Account-level Webhooks page or with POST /portal/v1/accounts/:accountSlug/webhooks and a Console token. The identity events that concern an Environment (identity.status_set, identity.erased, and the two identity.env_membership events) also reach that Environment's subscriptions, so an integration holding only an environment API key still hears about its own members. The rest (identity.created, identity.updated, the account member events, and session.all_revoked) are account-only: GET /api/v1/webhooks/event-types lists them with scope: "account", and naming one on an environment subscription answers 400 webhook.invalid_event_type.
What each event carries
Every delivery's data is the audit entry's envelope (see below); what differs per event is resource_type, resource_id, and the keys inside metadata. Ids are Canopy ids; external_id on organization events is the id you supplied when you created the organization, so a receiver can correlate without a follow-up read.
Payloads & the audit log
Every event mirrors an audit-log entry
Webhook event types are the same actions Canopy records in its audit log: every delivery corresponds to an audit entry, so you can reconcile what you received against the authoritative trail and use the audit log to replay anything an endpoint missed. The live list of subscribable event types for a scope is also available from the API at GET …/webhooks/event-types, so your integration can validate against it programmatically.
Tell us how we can improve this guide.