Reenviar
curl --request POST \
--url https://api.brelio.app/v1/webhooks/{id}/redeliver \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"id": "0b9a4a1e-6a4c-4d43-9a39-4c1f3a0d2b11",
"deliveryId": "5c2f8b7e-1d3a-4e6f-8a9b-0c1d2e3f4a5b"
}
'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',
deliveryId: '5c2f8b7e-1d3a-4e6f-8a9b-0c1d2e3f4a5b'
})
};
fetch('https://api.brelio.app/v1/webhooks/{id}/redeliver', 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}/redeliver"
payload = {
"id": "0b9a4a1e-6a4c-4d43-9a39-4c1f3a0d2b11",
"deliveryId": "5c2f8b7e-1d3a-4e6f-8a9b-0c1d2e3f4a5b"
}
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",
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventType": "<string>",
"status": "pending",
"attempts": 0,
"nextAttemptAt": "2023-11-07T05:31:56Z",
"lastAttemptAt": "2023-11-07T05:31:56Z",
"lastStatusCode": 0,
"lastError": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"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
Reenviar
Vuelve a enviar una entrega ahora, con el mismo webhook-id para que el receptor no la procese dos veces.
Cuándo usarla: Después de arreglar el servidor que fallaba, en lugar de esperar al siguiente reintento.
POST
/
webhooks
/
{id}
/
redeliver
Reenviar
curl --request POST \
--url https://api.brelio.app/v1/webhooks/{id}/redeliver \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"id": "0b9a4a1e-6a4c-4d43-9a39-4c1f3a0d2b11",
"deliveryId": "5c2f8b7e-1d3a-4e6f-8a9b-0c1d2e3f4a5b"
}
'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',
deliveryId: '5c2f8b7e-1d3a-4e6f-8a9b-0c1d2e3f4a5b'
})
};
fetch('https://api.brelio.app/v1/webhooks/{id}/redeliver', 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}/redeliver"
payload = {
"id": "0b9a4a1e-6a4c-4d43-9a39-4c1f3a0d2b11",
"deliveryId": "5c2f8b7e-1d3a-4e6f-8a9b-0c1d2e3f4a5b"
}
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",
"eventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventType": "<string>",
"status": "pending",
"attempts": 0,
"nextAttemptAt": "2023-11-07T05:31:56Z",
"lastAttemptAt": "2023-11-07T05:31:56Z",
"lastStatusCode": 0,
"lastError": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"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
}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
Una entrega de recentDeliveries.
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)$Respuesta
Correcto
Se envía en la cabecera webhook-id; es el mismo en cada reintento y reenvío.
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)$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)$Opciones disponibles:
pending, succeeded, failed, skipped Rango requerido:
-9007199254740991 <= x <= 9007199254740991ISO 8601, en UTC.
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ISO 8601, en UTC.
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$Estado HTTP con el que respondió tu endpoint; null si no respondió.
Rango requerido:
-9007199254740991 <= x <= 9007199254740991ISO 8601, en UTC.
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$