Webhooks
Update a webhook
Change the URL, the events, the description, or switch the endpoint on or off.
Send only the fields to change; the rest stay as they are. Switching an endpoint on ("active": true) also clears its failure count, which is how a disabled endpoint is brought back once the receiver is fixed. While it is off, events that happen are not queued for it.
Authorization
AuthorizationstringheaderrequiredBearer followed by your API key: Bearer sgk_…. The key also works in an X-Api-Key header. See Authentication.Path parameters
uidstringpathrequiredThe webhook's 8-character id. Not case-sensitive.
Body
application/jsonurlstringA new URL, under the same rules as on create.
eventsarray of strings | nullA new subscription.
null or [] means every pact event.descriptionstringA new description;
"" clears it.activebooleanfalse stops deliveries; true resumes them and resets consecutive_failures.Response
200 OKThe webhook as it now is.
uidstringThe endpoint's id: 8 letters and digits.
urlstringWhere events are posted: a public HTTPS URL.
descriptionstring | nullYour note on what it is for (100 characters at most).
eventsarray of strings | nullactivebooleanWhether events are delivered to it. Switched off by you, by a
410 Gone answer, or after 10 failed deliveries in a row; switch it on again with Update a webhook.consecutive_failuresintegerDeliveries given up on since the last success. Resets to 0 on the next success.
last_statusinteger | nullThe HTTP status of the last attempt.
null before the first attempt, and when the last attempt got no response.date_last_successstring (date-time) | nullWhen a delivery last got a
2xx.date_disabledstring (date-time) | nullWhen it was switched off, while it is.
date_createdstring (date-time)When it was added.
date_updatedstring (date-time)When its settings or secret last changed.
Errors
| Status | When |
|---|---|
| 400 Bad Request | The body is not a JSON object, a URL or event is invalid, or active is not a boolean. |
| 401 Unauthorized | The API key is missing, wrong or revoked. |
| 403 Forbidden | The account's plan does not include API access (Pro and Business do). |
| 404 Not Found | No webhook with that id belongs to your account. |
Every error body is { "error": "message" }. See Errors.