public-logo

36Blocks Docs

Welcome to 36Blocks
Getting Started
Widgets
Sessions & Tokens
Companies & Roles
Security & Access
Webhooks
OAuth 2.0 Module
API Reference
Built with DocStar
  1. /
  2. Webhooks

Webhooks

Webhooks let 36Blocks notify your backend when something happens in your Block, such as a user registering or a role changing.

#

Add a webhook

In your Block, open the Webhook tab and add a webhook. Subscribe it to one, several, or all events from the Event Catalog.

#

Event catalog

Event Sent when
register_company_and_user A company and user are registered
auto_add_user A user is auto-added to companies (for example, through a whitelisted email domain)
create_company A company is created
update_company A company is updated
delete_company A company is deleted, by a user or automatically when no active users remain
add_user A user is added to a company
update_user A user is updated
leave_company A user leaves a company
user_removed_from_company A user is removed from a company by another user
user_role_updated A user's role in a company is updated
reset_password A user's password has been reset successfully
user_created_via_admin A user is created through the admin (server-to-server) API
user_updated_via_admin A user is updated through the admin API
user_deleted_via_admin A user is deleted through the admin API
#

Payload

Each delivery is a JSON object with the event name and the data it relates to, for example the company and user involved:

{
  "event": "create_company",
  "data": {
    "company": { "id": 1, "name": "Acme Corporation" },
    "user": { "id": 1, "name": "John Doe" }
  }
}

The exact fields in data depend on the event. The Event Catalog in your dashboard shows a sample payload for each one.

Was this helpful?
Built with DocStar
On this page
Add a webhook
Event catalog
Payload
Was this helpful?