Update many webhook endpoints
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{
id: 'whk_06d8k3m7q2v9x4b1n5c0e8f2ja',
url: '<string>',
description: '<string>',
events: [],
enabled: true
}
]
})
};
fetch('https://vms.dev/api/v1/webhooks/update-many', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://vms.dev/api/v1/webhooks/update-many \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"id": "whk_06d8k3m7q2v9x4b1n5c0e8f2ja",
"url": "<string>",
"description": "<string>",
"events": [],
"enabled": true
}
]
}
'import requests
url = "https://vms.dev/api/v1/webhooks/update-many"
payload = { "items": [
{
"id": "whk_06d8k3m7q2v9x4b1n5c0e8f2ja",
"url": "<string>",
"description": "<string>",
"events": [],
"enabled": True
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"succeeded": 0,
"failed": 0,
"message": "<string>",
"data": [
{
"index": 0,
"id": "<string>",
"error": "<string>"
}
]
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}Webhooks
Update many webhook endpoints
Changes up to 500 endpoints in one request. Each item has the id of an endpoint and the fields of an update. The API returns a result for each item, in the sequence of the items. Needs the webhooks:write scope.
POST
/
v1
/
webhooks
/
update-many
Update many webhook endpoints
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{
id: 'whk_06d8k3m7q2v9x4b1n5c0e8f2ja',
url: '<string>',
description: '<string>',
events: [],
enabled: true
}
]
})
};
fetch('https://vms.dev/api/v1/webhooks/update-many', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://vms.dev/api/v1/webhooks/update-many \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"id": "whk_06d8k3m7q2v9x4b1n5c0e8f2ja",
"url": "<string>",
"description": "<string>",
"events": [],
"enabled": true
}
]
}
'import requests
url = "https://vms.dev/api/v1/webhooks/update-many"
payload = { "items": [
{
"id": "whk_06d8k3m7q2v9x4b1n5c0e8f2ja",
"url": "<string>",
"description": "<string>",
"events": [],
"enabled": True
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"succeeded": 0,
"failed": 0,
"message": "<string>",
"data": [
{
"index": 0,
"id": "<string>",
"error": "<string>"
}
]
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}Authorizations
Body
application/json