Atualizar webhook
curl --request PATCH \
--url https://api.aideskbr.com/api/public/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event_types": []
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({event_types: []})
};
fetch('https://api.aideskbr.com/api/public/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.aideskbr.com/api/public/v1/webhooks/{id}"
payload = { "event_types": [] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"status": "healthy",
"event_types": [
"message.sent"
],
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "api_key_required",
"message": "<string>"
}
}{
"error": {
"code": "api_key_required",
"message": "API key ausente"
}
}{
"error": {
"code": "missing_scope",
"message": "Scope insuficiente"
}
}{
"error": {
"code": "message_not_found",
"message": "Mensagem não encontrada"
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded"
}
}Webhooks
Atualizar webhook
Atualiza url e/ou event_types. event_types é obrigatório no PATCH
(substitui a lista inteira). Não regenera o secret.
PATCH
https://api.aideskbr.com
/
api
/
public
/
v1
/
webhooks
/
{id}
Atualizar webhook
curl --request PATCH \
--url https://api.aideskbr.com/api/public/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event_types": []
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({event_types: []})
};
fetch('https://api.aideskbr.com/api/public/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.aideskbr.com/api/public/v1/webhooks/{id}"
payload = { "event_types": [] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"status": "healthy",
"event_types": [
"message.sent"
],
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "api_key_required",
"message": "<string>"
}
}{
"error": {
"code": "api_key_required",
"message": "API key ausente"
}
}{
"error": {
"code": "missing_scope",
"message": "Scope insuficiente"
}
}{
"error": {
"code": "message_not_found",
"message": "Mensagem não encontrada"
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded"
}
}Authorizations
bearerAuthapiKeyAuth
Authorization: Bearer ak_live_
Path Parameters
Body
application/json