Webhooks

Create or update webhook

PUT
/webhooks

Set the webhook URL for the current user. Creates a new webhook if none exists, or updates the URL and rotates the secret if one already exists. A 'ping' event is dispatched immediately after saving.

The secret in the response is only provided on create/update, the client must store it securely. Use X-Webhook-Signature header to verify subsequent deliveries.

Authorization

token_auth
headerAuthorizationBearer <token>

Token-based authentication using access tokens.

Request Body

application/json
  1. body
url*Url

The webhook endpoint URL. Must be a valid HTTP/HTTPS URL.

Formaturi
Length1 <= length <= 2083

Response Body

Successful Response

application/json
  1. response
id*Id

Webhook configuration ID.

url*Url

Webhook endpoint URL.

secret?|

HMAC-SHA256 secret used to sign payloads. Only returned on create/update.

Defaultnull
is_active*Is Active

Whether the webhook is currently active.

created_at*Created At

ISO 8601 creation timestamp.

updated_at*Updated At

ISO 8601 last update timestamp.

last_response_status?|

HTTP status code from the most recent delivery attempt.

Defaultnull
last_response_at?|

ISO 8601 timestamp of the most recent delivery attempt.

Defaultnull
curl -X PUT "https://example.com/webhooks" \  -H "Content-Type: application/json" \  -d '{    "url": "http://example.com"  }'
{  "id": 0,  "url": "string",  "secret": null,  "is_active": true,  "created_at": "string",  "updated_at": "string",  "last_response_status": null,  "last_response_at": null}