Skip to navigation

Create a webhook endpoint

Registers an endpoint and mints its signing secret, which this response returns once. Store it: it cannot be read back, and rotating means deleting and re-creating the endpoint. Duplicate events are collapsed. A URL Pensar would refuse to deliver to is a 400; a URL already registered is a 409.

Requires the settings:write API key scope.

Authentication

AuthorizationBearer

A workspace API key, sent as Authorization: Bearer.

OR
x-api-keystring

A workspace API key, sent as x-api-key.

Request

This endpoint expects an object.
urlstringRequired
HTTPS URL with a hostname that resolves only to public addresses. Unique within the workspace.
eventslist of enumsRequired
Allowed values:
descriptionstring or nullOptional
enabledbooleanOptional

Defaults to true.

Response

The endpoint and its signing secret.
endpointobject
secretstring

Signing secret. Returned only here; it cannot be read back later.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error