Change a webhook endpoint
PATCH /v1/webhooks/{id}
Changes the fields you send and keeps the others.
Needs webhooks:write.
Path parameters
Section titled “Path parameters”id string · uuid
The webhook endpoint’s ID.
url string
A new https:// URL, with the same rules as when you create an endpoint.
description string
Up to 500 characters.
events array of strings
Any of message.received message.sent message.status contact.created contact.updated contact.deleted template.status chat.assigned chat.closed chat.reopened broadcast.status. At least 1 item.
headers object
Replaces all custom headers, with the same rules as when you create an endpoint. Send ******** as a value to keep the saved value.
A map; each value is a string. Up to 10 keys.
enabled boolean
false turns the endpoint off; true turns it back on.
The rules of POST /v1/webhooks apply to the endpoint as it will be. An event it already has stays, even if its feature has since left your plan. You need the read scope of every event it will send, including those.
Custom headers and a new URL
Section titled “Custom headers and a new URL”A url on another server (a different scheme, host or port) needs every header’s value sent again. A saved or ******** value is then 422 invalid_field on headers.<name>, so a saved value only goes to the server it was set for.
Pauses and ownership
Section titled “Pauses and ownership”A new url or new headers end a pause, and Soosh tries the endpoint again.
enabled: true turns a stopped endpoint back on, whoever stopped it. The key you use then owns the endpoint, and it stops when that key is revoked or expires.
Returns
Section titled “Returns”200 The webhook endpoint object. The webhook endpoint as it is now.
Errors
Section titled “Errors”Besides the ones every request can get:
invalid_fieldA field breaks a rule, or a saved header value is sent with a url on another server. error.field is then headers.<name>.