API Reference
Events
Every state change your integration cares about, delivered by webhook and queryable for 90 days.
Events are delivered by webhook and are also queryable at GET /events (90-day retention) — the same envelope on both, so dedupe by id. The data object is a thin id + minimal-state projection; fetch full detail back through the authenticated read API.
{
"data": {
"currency": "USD",
"invoice_id": "inv_8fq2Lm",
"number": "INV-1042",
"status": "paid",
"total_cents": 150000
},
"id": "evt_2aQ9xL",
"occurred_at": "2026-01-15T09:30:00Z",
"type": "invoice.paid",
"version": 1
}invoice.overdue
A sent invoice passed its due date without being paid.
{
"invoice_id": "inv_8fq2Lm",
"number": "INV-1042",
"status": "overdue",
"total_cents": 150000,
"currency": "USD"
}invoice.paid
An invoice was paid in full (terminal — after any provisional clearing window).
{
"invoice_id": "inv_8fq2Lm",
"number": "INV-1042",
"status": "paid",
"total_cents": 150000,
"currency": "USD"
}invoice.sent
An invoice was sent to its recipient.
{
"invoice_id": "inv_8fq2Lm",
"number": "INV-1042",
"status": "sent",
"total_cents": 150000,
"currency": "USD"
}invoice.voided
An invoice was voided and is no longer payable.
{
"invoice_id": "inv_8fq2Lm",
"number": "INV-1042",
"status": "voided",
"total_cents": 150000,
"currency": "USD"
}payment.canceled
A payment was canceled and will not proceed.
{
"payment_intent_id": "pi_3Nk2Ht7Qz",
"amount_cents": 42000,
"currency": "USD"
}payment.completed
A payment completed (settled).
{
"payment_intent_id": "pi_3Nk2Ht7Qz",
"amount_cents": 42000,
"currency": "USD"
}payment.failed
A payment failed and did not move money.
{
"payment_intent_id": "pi_3Nk2Ht7Qz",
"amount_cents": 42000,
"currency": "USD"
}payment.held
A payment is held awaiting approval or step-up before it can proceed.
{
"payment_intent_id": "pi_3Nk2Ht7Qz",
"amount_cents": 42000,
"currency": "USD"
}test.event
A test event sent on demand to verify an endpoint's delivery and signature handling.
{
"message": "This is a test event."
}List events
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| types | query | string | Comma-separated public event types to include (default: all). |
| limit | query | integer | Page size (default 50, max 100). |
| starting_after | query | string | Event id cursor — returns events older than it. |
Responses
200Your organization's events, newest first, queryable for 90 days — the same envelopes webhooks deliver (dedupe by id).
| Field | Type | Description |
|---|---|---|
| datarequired | PublicEnvelope[] | The page of events, newest first. |
| has_morerequired | boolean | Whether another page exists; page with starting_after=<last id>. |
{
"data": [
{
"data": {
"currency": "USD",
"invoice_id": "inv_8fq2Lm",
"number": "INV-1042",
"status": "paid",
"total_cents": 150000
},
"id": "evt_2aQ9xL",
"occurred_at": "2026-01-15T09:30:00Z",
"type": "invoice.paid",
"version": 1
}
],
"has_more": false
}Errors
All errors return { "error": string }.
Example request
curl https://api.bankofbots.ai/api/ext/v1/events \
-H "Authorization: Bearer $BOB_API_TOKEN"Get an event
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| eventIdrequired | path | string | The event's id (from a webhook delivery or the events list). |
Responses
200The event envelope.
| Field | Type | Description |
|---|---|---|
| datarequired | object | Thin id + minimal-state payload for the event. Shape varies per event type — see the event catalog. |
| idrequired | string | Unique event id — dedupe on this across webhook + API delivery. |
| occurred_atrequired | string · date-time | When the event occurred (RFC 3339). |
| typerequired | string | The public event type, e.g. invoice.paid. See the event catalog for the full list. |
| versionrequired | integer | Payload projection version. |
{
"data": {
"currency": "USD",
"invoice_id": "inv_8fq2Lm",
"number": "INV-1042",
"status": "paid",
"total_cents": 150000
},
"id": "evt_2aQ9xL",
"occurred_at": "2026-01-15T09:30:00Z",
"type": "invoice.paid",
"version": 1
}Errors
All errors return { "error": string }.
Example request
curl https://api.bankofbots.ai/api/ext/v1/events/{eventId} \
-H "Authorization: Bearer $BOB_API_TOKEN"