Deliveries
Each webhook EventWolf sends, one per match, and each push to a phone, one per notification and push address, with every attempt: the request, the receiver’s answer or the provider’s ID for the push, or why there was none.
Deliveries explains attempts, retries, and statuses. Fix failed deliveries finds one, reads why it failed, and sends it again.
Paths are relative to https://api.agentpost.tools/v1/events, and every request follows the API basics. Who may call explains each kind of caller.
List deliveries
GET /deliveries
Deliveries, newest first. Use status=failed to list deliveries in the failed status, including those that exhausted retries or got a 410.
- Who may call: Your server, with your project’s secret key.
- Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>. - Pages:
limit, 1 to 200, default 50, withnextandafter. Lists has the rule.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
status |
string |
No | One of "pending", "succeeded", "failed", "skipped", or "canceled". |
kind |
"webhook" or "push" |
No | webhook or push. Without it, both. |
endpointId |
string |
No | |
pushAddressId |
string |
No | Only the pushes to this push address. |
subscriptionId |
string |
No | |
eventSequence |
integer |
No | Only deliveries for this event’s sequence; at least 1. |
from |
string |
No | An ISO 8601 date and time. |
after |
string |
No | |
limit |
integer |
No | 1–200; default 50. |
Response
200 OK, with:
| Name | Type | Present | Description |
|---|---|---|---|
deliveries |
DeliveryRecord array |
Always | |
next |
string |
When set |
Errors
invalid_request(400)
Any operation can also answer with the codes Conventions lists.
Get a delivery
GET /deliveries/:id
One delivery and every attempt, oldest first: why each failed is in its response.status and response.bodyExcerpt, or its error.
- Who may call: Your server, with your project’s secret key.
- Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
Yes | A delivery ID, dlv_…. The id of a DeliveryRecord. |
Response
200 OK, with:
| Name | Type | Present | Description |
|---|---|---|---|
delivery |
DeliveryRecord |
Always | |
attempts |
AttemptRecord array |
Always |
Errors
not_found(404)
Any operation can also answer with the codes Conventions lists.
Retry a delivery
POST /deliveries/:id/retry
Puts a delivery back in the queue to be sent now, with the same webhook-id, so a receiver that saw it before knows it. A failed, skipped, or canceled delivery gets another attempt, and a pending one is attempted at once instead of at its scheduled time. One that succeeded answers conflict: replay its event to send it again.
- Who may call: Your server, with your project’s secret key.
- Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>. - Idempotency-Key: optional. Retrying a write has the rule.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
Yes | A delivery ID, dlv_…. The id of a DeliveryRecord. |
Response
200 OK, with:
| Name | Type | Present | Description |
|---|---|---|---|
delivery |
DeliveryRecord |
Always | |
attempts |
AttemptRecord array |
Always |
Errors
Any operation can also answer with the codes Conventions lists.
Cancel a delivery
POST /deliveries/:id/cancel
Stops a pending delivery before its next attempt; nothing already sent is taken back. One that isn’t pending answers conflict.
- Who may call: Your server, with your project’s secret key.
- Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>. - Idempotency-Key: optional. Retrying a write has the rule.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
Yes | A delivery ID, dlv_…. The id of a DeliveryRecord. |
Response
200 OK, with:
| Name | Type | Present | Description |
|---|---|---|---|
delivery |
DeliveryRecord |
Always | |
attempts |
AttemptRecord array |
Always |
Errors
Any operation can also answer with the codes Conventions lists.
The DeliveryRecord object
| Name | Type | Present | Description |
|---|---|---|---|
id |
string |
Always | Also the webhook-id header on every attempt of a webhook. |
kind |
"webhook" or "push" |
Always | What a delivery sends: a signed webhook to an endpoint, or a push to one of a recipient’s devices. |
eventSequence |
number |
Always | |
matchId |
string |
When set | Absent for an endpoint’s test ping, which has no subscription. |
subscriptionId |
string |
When set | A subscription ID, sub_…. |
endpointId |
string |
When set | A webhook’s endpoint. |
notificationId |
string |
When set | A push’s notification, whose text and url it carries. |
pushAddressId |
string |
When set | A push’s address: one device of the notification’s recipient. |
status |
string |
Always | A push stays pending after it is sent until the provider reports whether it reached the device. One of "pending", "succeeded", "failed", "skipped", or "canceled". |
skipReason |
string |
When set | Why a delivery was skipped: the endpoint was disabled, the event is about that endpoint, the push address was invalid, or the event was erased before the push was sent. One of "endpoint_disabled", "about_endpoint", "address_invalid", or "event_erased". |
attempts |
number |
Always | How many attempts have been made. |
nextAttemptAt |
string |
When set | |
createdAt |
string |
Always | |
finishedAt |
string |
When set |
The AttemptRecord object
| Name | Type | Present | Description |
|---|---|---|---|
id |
string |
Always | An attempt ID, att_…. |
deliveryId |
string |
Always | A delivery ID, dlv_…. |
n |
number |
Always | 1 for the first attempt. |
trigger |
string |
Always | One of "automatic", "manual", "recover", or "replay". |
startedAt |
string |
Always | |
duration |
string |
Always | How long the attempt took, such as "240ms". |
request |
object |
Always | The request as sent, without the signature and the endpoint’s own headers. A push’s target is its provider, such as expo, never the token. |
request. |
string |
Always | |
request. |
object |
Always | Each value is a string. |
response |
object |
When set | |
response. |
number |
Always | |
response. |
object |
Always | Each value is a string. |
response. |
string |
When set | The first 2 KB of the body. |
providerMessageId |
string |
When set | The provider’s ID for a push it accepted, by which it later reports whether the push reached the device. |
error |
object |
When set | |
error. |
string |
Always | One of "timeout", "dns", "connection", "tls", "redirect", "ssrf_blocked", "push_send_failed", "push_delivery_failed", or "device_not_registered". |
error. |
string |
Always | |
outcome |
"succeeded" or "failed" |
Always | For a push, succeeded means the provider accepted it; when the provider then reports it undelivered, or never confirms it, the attempt becomes failed with that error. |