Updates a webhook
const url = 'https://web.exactly.app/api/webhook/example';const options = { method: 'PATCH', headers: { cookie: '__Secure-better-auth.session_token=<__Secure-better-auth.session_token>', 'Content-Type': 'application/json' }, body: '{"url":"https://example.com","transaction":{"created":"https://example.com","updated":"https://example.com","completed":"https://example.com"},"card":{"updated":"https://example.com"},"user":{"updated":"https://example.com"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://web.exactly.app/api/webhook/example \ --header 'Content-Type: application/json' \ --cookie __Secure-better-auth.session_token=<__Secure-better-auth.session_token> \ --data '{ "url": "https://example.com", "transaction": { "created": "https://example.com", "updated": "https://example.com", "completed": "https://example.com" }, "card": { "updated": "https://example.com" }, "user": { "updated": "https://example.com" } }'Partially updates an existing webhook by name. Only fields included in the request body are modified; omitted fields (including the top-level url and any nested per-event URLs) keep their stored value. Passing null for a per-event URL clears it; the parent group is dropped when it has no per-event URLs left. Returns 400 when the path name fails the slug pattern, the body fails validation, or any URL uses a non-https scheme, fails to resolve, or resolves to a private/loopback address. Returns 404 when the organization has no source configured or no webhook with that name exists. The signing secret is preserved and is not returned in the response. Only owner and admin roles can update a webhook.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Body
Section titled “Request Body”object
Examplegenerated
{ "url": "https://example.com", "transaction": { "created": "https://example.com", "updated": "https://example.com", "completed": "https://example.com" }, "card": { "updated": "https://example.com" }, "user": { "updated": "https://example.com" }}Responses
Section titled “Responses”Webhook updated
object
object
object
object
Examplegenerated
{ "url": "https://example.com", "transaction": { "created": "https://example.com", "updated": "https://example.com", "completed": "https://example.com" }, "card": { "updated": "https://example.com" }, "user": { "updated": "https://example.com" }, "name": "example"}Invalid webhook name, body, or URL
object
Example
{ "code": "invalid name"}Unauthorized
object
Example
{ "code": "unauthorized"}User doesn't belong to the organization
Webhook not found
object
Example
{ "code": "not found"}