Skip to navigation

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.
urlstringRequired
The URL to which webhook events will be delivered
eventTypeslist of enums or nullOptional
Optional array of event types to subscribe to. Nothing means subscribe to all event types.
filterPathslist of enums or nullOptional

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

createdAtstringformat: "yyyy-mm-ddThh:MM:ssZ"
idstringformat: "uuid"
statusenum
The operational status of a webhook endpoint.
Allowed values:
updatedAtstringformat: "yyyy-mm-ddThh:MM:ssZ"
urlstring
The URL that will receive webhook POST requests
eventTypeslist of enums or nullOptional
Optional array of event types this webhook is subscribed to. Nothing means all events.
filterPathslist of enums or nullOptional
Optional array of resource field paths to filter events by. Nothing means no filtering.
secretstring or nullOptional

Webhook signing secret. Only returned on creation (POST), not on GET or UPDATE operations.

Errors

400
Bad Request Error