Webhooks

Create hook

Creates a new webhook subscription

Request Body

The request must include:

  • data - parent object which includes the children/nested attributes:
  • target_url - The URL where webhook events will be sent
  • event - The type of event to subscribe to (see available events below), for example "tag_added"
  • resource_id (optional) - Specific resource ID to filter events for, for example the id of the Contact Tag. When the property is omitted, the webhook will be triggered for all events of the specified type, as a wildcard webhook.

Available Event Types

EventDescriptionRequired API Scopes
purchaseCustomer makes a purchaseview:purchases
payment_succeededPayment transaction completes successfullyview:transactions
order_createdNew order is createdview:transactions, view:orders
form_submissionSomeone submits a formview:form_submissions
tag_addedTag is added to a contactview:contacts
tag_removedTag is removed from a contactview:contacts

Note: You can only create webhooks for events you have permission to access based on your API key scopes. For example to use tags you need the view:contacts scope, which is included in the account owner api key scope.

Sample Payloads

You can view sample webhook payloads for each event type:

  • GET /v1/hooks/purchase_sample
  • GET /v1/hooks/payment_succeeded_sample
  • GET /v1/hooks/order_created_sample
  • GET /v1/hooks/form_submission_sample
  • GET /v1/hooks/tag_added_sample
  • GET /v1/hooks/tag_removed_sample

Example request targeting a specific tag:

post/v1/hooks

Request

Changes

No recorded changes to this operation across all 1 revision of this API.