Developers

Create a webhook endpoint

POST/webhooks

Creates a webhook endpoint that receives events for the subscribed event types.

The destination URL must use HTTPS and point to a public host on port 443, 80, or 8443. Private IP addresses and other non-public destinations are rejected before the endpoint is created, in sandbox accounts too.

The response includes the signing secret. It is returned only once and cannot be retrieved again.

Setting payload_detail to full requires the personal data permissions described in that field. Without them, the request fails with 403 and the error code personal_data_permission_required, and the endpoint is not created.

AuthorizationBearer <token>

Credential: the API credential secret, sent as a bearer token. Credential secrets are identified by a fixed prefix.

In: header

Header Parameters

Idempotency-Key*string

Client-generated key that makes the request safe to retry. Must be 1 to 128 characters from [A-Za-z0-9._:-]. Required by this operation: a missing key returns idempotency_key_required, and a malformed key returns idempotency_key_invalid. Repeating the request with the same key and the same body returns the stored result with Idempotent-Replayed: true.

X-Client-Request-Id?string

Optional client-generated identifier of the request, up to 64 characters from [A-Za-z0-9._-]. Echoed back in the response and recorded in the request log; it never replaces the server-generated X-Request-Id.

Lengthlength <= 64

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/webhooks" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "event_types": [      "string"    ],    "url": "http://example.com"  }'
{  "data": {    "created_at": "2019-08-24T14:15:22Z",    "description": "string",    "event_filters": {      "property1": {        "added_tag_id": [          0        ],        "custom_field_id": [          0        ],        "delivery_id": [          0        ],        "exam_id": [          0        ],        "filled": true,        "legal_term_id": [          "string"        ],        "lesson_id": [          0        ],        "milestones": [          50        ],        "min_percent": 0,        "origin": [          "lesson_completed"        ],        "passed": true,        "product_id": [          0        ],        "signup_origin": "paid"      },      "property2": {        "added_tag_id": [          0        ],        "custom_field_id": [          0        ],        "delivery_id": [          0        ],        "exam_id": [          0        ],        "filled": true,        "legal_term_id": [          "string"        ],        "lesson_id": [          0        ],        "milestones": [          50        ],        "min_percent": 0,        "origin": [          "lesson_completed"        ],        "passed": true,        "product_id": [          0        ],        "signup_origin": "paid"      }    },    "event_types": [      "string"    ],    "health": {      "circuit_state": "closed",      "consecutive_failures": 0,      "dead_24h": 0,      "delivered_24h": 0,      "effective_payload_detail": "ids",      "failed_24h": 0,      "last_failure_at": "2019-08-24T14:15:22Z",      "last_success_at": "2019-08-24T14:15:22Z",      "pending": 0    },    "id": "string",    "max_per_second": 0,    "object": "webhook",    "payload_detail": "ids",    "payload_version": 0,    "resource_filters": {      "property1": [        0      ],      "property2": [        0      ]    },    "revision": 0,    "secret": "string",    "status": "active",    "timeout_ms": 0,    "updated_at": "2019-08-24T14:15:22Z",    "url": "http://example.com"  }}