api-docs-icon

Create Webhook

POST
/ api/ v1/ webhooks

Create a new webhook for the specified campaign. A webhook allows Postalytics to post out campaign events to the specified endpoint. This lets external applications consume our events in a light integration way. The webhook needs a valid endpoint and needs to be enabled via is_subscribed. To set which events would you like to be notified about, you will need to edit the webhook in the application. This will be exposed in a future release of this endpoint.

object
campaign_id
integer (int32)

Id of the webhook. Will be returned in a GET but is not required in a POST

Example:
10142067
campaign_name
string
nullable

Name of the webhook

Example:
Keymaker
created_date
string
nullable

created_date of Webhook

Example:
1999-02-19T12:00:00.00:00
endpoint_id
string
nullable

The endpoint associated with the campaign.

Example:
https://app.postalytics.com/1234567890
is_subscribed
integer (int32)

Indicates whether a webhook is active and sending out or not. 1 = active, 0 = not active

Example:
1
url
string
nullable

The URL of the receiving third party endpoint that will consume this webhook

Example:
https://some.url.com/action

Response

application/json
object
created_date
string (date-time)

The date and time when the webhook was created.

Example:
1999-02-19T12:00:00.00:00

Code Examples

Response