Webhooks

Webhooks allow you to listen to triggers from Schematic to create alerts or keep external services up to date when data changes.

The following guide walks through setting up Slack alerts from Schematic data. We’ll be listening to company create and delete webhooks in a new Slack channel.

Supported webhook events

We currently support the following webhooks in Schematic (with more on the way!):

ObjectEvent
flagcreated
flagupdated
flagdeleted
flag rulecreated
flag ruleupdated
flag ruledeleted
featurecreated
featureupdated
featuredeleted
plan entitlementcreated
plan entitlementupdated
plan entitlementdeleted
company overridecreated
company overrideupdated
company overridedeleted
plancreated
planupdated
plandeleted
companycreated
companyupdated
companydeleted
usercreated
userupdated
userdeleted

Webhook structure

Each webhook from Schematic will be structured with the following data:

{
"action": "webhook.name",
"account_id": "acct_xxxxxxx",
"environment_id": "env_xxxxxxxx",
"body": {
},
"object_type": "object"
}

Webhook trigger parameters

FieldDescription
actionThe trigger action e.g. customer.created
account_idThe account the trigger occurred in
environment_idThe environment within the account the trigger occurred in
bodyPayload containing object metadata
object_typeThe type of object

The contents of the body will vary depending on the trigger you listen to. You can test individual triggers easily by using free services like Webhook-Test.

Developer Tooling

On the webhooks page in Schematic, you can find a log of all webhooks Schematic has sent for your account. We will only show events that have an associated webhook configured.

webhook-log