Create a webhook endpoint
POST/v1/webhook_endpoints
Registers a URL and returns its signing secret. Store the secret right away: it isn't shown again. You can have up to 10 endpoints per environment.
Permissions: Secret key with webhooks:manage.
Guide
WebhooksRequest headers#
Idempotency-KeystringAny string up to 255 characters; use a UUID v4. Kept 24 hours per key (or member) and endpoint. Same key and body replays the first response withIdempotent-Replayed: true.Max Length 255
Request body#
urlstring (uri)RequiredHTTPS URL on a public hostname. IP addresses,localhostand private networks are refused.event_typesarray of stringRequiredEvent types to send, or["*"]for all.Min Items 1descriptionstringYour label, up to 255 characters.Max Length 255
Response fields#
Returns 201 with WebhookEndpoint
idstring (uuid)The endpoint's id.urlstring (uri)Where events are sent. HTTPS on a public hostname.descriptionstringNullableYour label, up to 255 characters.Max Length 255event_typesarray of stringTypes this endpoint gets, or["*"]for all types, including types added later. See Webhook event types.statusstringenabledordisabled. unPLUG setsdisabledafter 3 days of failed deliveries.One ofenabled,disabledsecretstringThe signing secret,whsec_followed by base64. Returned only when you create the endpoint or rotate the secret.created_atstring (date-time)When the endpoint was created.updated_atstring (date-time)When the endpoint last changed.
Error descriptions#
400Bad request
missing_param
url or event_types is missing.
400Bad request
invalid_param
The URL isn't HTTPS on a public hostname, or an event type doesn't exist. param names the field.
400Bad request
invalid_request
You already have 10 endpoints in this environment.
Any endpoint can also return the common errors.