Managing Webhooks
This page explains how to add webhooks to your organization. Webhooks allow external services to be notified when certain events happen. When the specified events happen, we'll send a POST request to each of the URLs you provide.
The steps included on this page can only be completed by ACTIVATE platform administrators and users with the org:admin
role. For more information, please see About Group Roles.
Adding a Webhook
Navigate to your Organization settings.
Click the Webhooks tab.
Click + Add Webhook.
On the next page, select a Type. Currently, you can choose from these webhook types:
USER_CREATED
flags when a new user logs in for the first time.USER_DISABLED
flags when a user has been disabled.USER_REMOVED_FROM_GROUP
flags when a user has been removed from a group in your organization.
Add a Webhook name and paste the URL that your webhook will be sent to. Description is an optional field.
Choose whether to Enable this webhook.
Click Create webhook.
You'll be taken back to the Webhooks tab. A dialog box with the message Webhook created successfully will appear in the bottom right corner of your screen.
Deleting a Webhook
Navigate to Organization > Webhooks. Select the webhook you'd like to delete, then click Delete webhooks.
A pop-up module will appear. Click Delete.
You'll be taken back to the Webhooks tab. A dialog box with the message Webhook(s) deleted successfully will appear in the bottom right corner of your screen.
Responding to Events
When your application receives webhook events, they'll take the shapes below. All webhook
shapes are identical, while the payload
shape changes according to the type of event.
Please also note that organization
has a different meaning, depending on its location:
organization
inside thewebhook
object indicates the organization that owns the webhook.organization
inside thepayload
object indicates the organization that the user is in.
USER_CREATED
{
"type": "USER_CREATED",
"webhook": {
"id": "66ec434e84b4103f670cb617",
"organization": "parallelworks",
"name": "demo"
},
"payload": {
"username": "demo",
"email": "demo@parallelworks.com",
"userId": "66ec445884b4103f670d0c86",
"organization": "parallelworks",
"remainingSeats": 5
}
}
USER_DISABLED
{
"type": "USER_DISABLED",
"webhook": {
"id": "66ec41b884b4103f670c5ee5",
"organization": "parallelworks",
"name": "test"
},
"payload": {
"username": "demo",
"email": "demo@parallelworks.com",
"userId": "653c787c8e048caa7cb4e554",
"organization": "parallelworks"
}
}
USER_REMOVED_FROM_GROUP
{
"type": "USER_REMOVED_FROM_GROUP",
"webhook": {
"id": "66ec439584b4103f670cd3ae",
"organization": "parallelworks",
"name": "test"
},
"payload": {
"username": "demo",
"email": "demo@parallelworks.com",
"userId": "653c787c8e048caa7cb4e554",
"organization": "parallelworks",
"groupName": "Demo-Group"
}
}