Skip to main content

Webhook Lifecycle Events

Mapped publishes an event when anyone in your org creates or deletes a webhook. Subscribe to them to audit who is receiving your org's events, or to alert when a webhook you depend on is removed.

Events​

typeSent when
webhooks.subscriptions.createdA webhook was created, in the Console or with createWebhookTarget.
webhooks.subscriptions.deletedA webhook was deleted, in the Console or with deleteWebhookTarget.

Editing, enabling, or disabling a webhook sends no event.

AttributeValue
source//com.mapped/org/{orgId}/webhooks-subscriptions (note org, singular)
idUnique per event.

Payloads​

webhooks.subscriptions.created carries the new webhook, without its endpoint: the URL, credentials, and signing keys are never included.

{
"id": "WHSUBMgoLD3fHY329pKANvdAb12",
"name": "Connector changes",
"eventFilters": {
"jsonExpressionFilter": {
"jsonPathExpression": "@.type == 'connectorEntitiesChangelog'"
}
},
"maxRetry": "10",
"enabled": true,
"eventExtensions": { "team": "facilities" }
}
FieldDescription
idThe webhook's ID.
nameIts name.
eventFiltersIts filter.
maxRetryIts retry count, as a string.
enabledWhether it was created enabled.
contentModeIts content mode, when set.
eventExtensionsIts custom extensions, when set.

The payload can also have other fields; ignore those you don't use.

webhooks.subscriptions.deleted carries the ID of the deleted webhook:

{
"target_id": "WHSUBMgoLD3fHY329pKANvdAb12"
}

Using Them​

@.type == 'webhooks.subscriptions.created' || @.type == 'webhooks.subscriptions.deleted'

Don't count on a webhook receiving its own creation event: a new webhook can take up to a minute to start receiving events. To see every webhook in your org at any time, use the webhookTargets query.