Eliminar webhook
curl --request POST \
--url https://api.brelio.app/v1/webhooks/{id}/delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"id": "0b9a4a1e-6a4c-4d43-9a39-4c1f3a0d2b11",
"expectedVersion": 1
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({id: '0b9a4a1e-6a4c-4d43-9a39-4c1f3a0d2b11', expectedVersion: 1})
};
fetch('https://api.brelio.app/v1/webhooks/{id}/delete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.brelio.app/v1/webhooks/{id}/delete"
payload = {
"id": "0b9a4a1e-6a4c-4d43-9a39-4c1f3a0d2b11",
"expectedVersion": 1
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deleted": true
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}Webhooks
Eliminar webhook
Elimina un webhook y su registro de entregas; deja de recibir avisos al momento.
POST
/
webhooks
/
{id}
/
delete
Eliminar webhook
curl --request POST \
--url https://api.brelio.app/v1/webhooks/{id}/delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"id": "0b9a4a1e-6a4c-4d43-9a39-4c1f3a0d2b11",
"expectedVersion": 1
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({id: '0b9a4a1e-6a4c-4d43-9a39-4c1f3a0d2b11', expectedVersion: 1})
};
fetch('https://api.brelio.app/v1/webhooks/{id}/delete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.brelio.app/v1/webhooks/{id}/delete"
payload = {
"id": "0b9a4a1e-6a4c-4d43-9a39-4c1f3a0d2b11",
"expectedVersion": 1
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deleted": true
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}Cuándo usarla: Cuando un sistema ya no deba recibir los avisos de la clínica.
Autorizaciones
Clave de API de Brelio (de organización o personal) o un token de acceso de WorkOS.
Encabezados
Único por comando; reutilízala solo para reintentar la misma llamada.
Required string length:
8 - 255Parámetros de ruta
Id del endpoint del webhook.
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Cuerpo
application/json
La version que leíste. La llamada falla con 409 si el endpoint cambió desde entonces, y nunca sobrescribe.
Rango requerido:
1 <= x <= 9007199254740991