Create a new webhook endpoint
Register a new webhook endpoint to receive event notifications
Authentication
AuthorizationBearer
Bearer token authentication for Mercury API.
Use your API token in the Authorization header:
Authorization: Bearer TOKEN
Example:
Authorization: Bearer secret-token:mercury_production_wma_24SCp4G81X3yHL4Wq8FgzuaP9ye3VKf2mgTDctXyRg5HY_yrucrem
Your Mercury API token should include the ‘secret-token:’ prefix. Tokens can be generated from your Mercury dashboard settings.
Request
This endpoint expects an object.
url
The URL to which webhook events will be delivered
eventTypes
Optional array of event types to subscribe to. Nothing means subscribe to all event types.
filterPaths
Optional array of resource field paths to filter events by. When specified, webhook events will only be sent when one of these fields changes. Nothing means no filtering (all events are sent).
Response
createdAt
id
status
The operational status of a webhook endpoint.
Allowed values:
updatedAt
url
The URL that will receive webhook POST requests
eventTypes
Optional array of event types this webhook is subscribed to. Nothing means all events.
filterPaths
Optional array of resource field paths to filter events by. Nothing means no filtering.
secret
Webhook signing secret. Only returned on creation (POST), not on GET or UPDATE operations.
Errors
400
Bad Request Error

