Update a webhook endpoint
curl --request PATCH \
--url https://my.server.express/api/v1/user/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"description": "<string>",
"events": [],
"active": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', description: '<string>', events: [], active: true})
};
fetch('https://my.server.express/api/v1/user/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/user/webhooks/{id}"
payload = {
"url": "<string>",
"description": "<string>",
"events": [],
"active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"url": "<string>",
"description": "<string>",
"events": [
"invoice.paid"
],
"active": true,
"disabledAt": "2023-11-07T05:31:56Z",
"consecutiveFails": 1,
"lastDeliveryAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Webhooks
Update a webhook endpoint
Change the URL, description, events, or switch it on/off. At least one field is required. Re-enabling clears the failure
counter and disabledAt; disabling stamps disabledAt. The secret can’t be changed here. Another user’s id is 404.
Writes a WEBHOOK_ENDPOINT_UPDATED audit entry.
PATCH
/
v1
/
user
/
webhooks
/
{id}
Update a webhook endpoint
curl --request PATCH \
--url https://my.server.express/api/v1/user/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"description": "<string>",
"events": [],
"active": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', description: '<string>', events: [], active: true})
};
fetch('https://my.server.express/api/v1/user/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/user/webhooks/{id}"
payload = {
"url": "<string>",
"description": "<string>",
"events": [],
"active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"url": "<string>",
"description": "<string>",
"events": [
"invoice.paid"
],
"active": true,
"disabledAt": "2023-11-07T05:31:56Z",
"consecutiveFails": 1,
"lastDeliveryAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Authorizations
Session access token (JWT) from POST /v1/auth/login or /v1/auth/refresh. A session satisfies every API scope.
Path Parameters
Body
application/json
Same rules as on create.
Maximum string length:
2048Maximum string length:
200Empty or null means every event.
Available options:
invoice.paid, invoice.refunded, team.member_joined, team.member_removed, team.service_shared, service.provisioned, service.suspended, service.unsuspended, service.terminated, ticket.replied