Events
The account's event log: page back through it, or poll it forward.
List or poll events
GET/v1/events
Access any: any API key, or a console session.
The account's event log. Without after: newest first as a page, with nextCursor to continue (events with a smaller seq). With after: the events with a larger seq, oldest first, with latestSeq to poll from next; start from the newest seq you have, or 0. after and cursor cannot be combined. Filters apply before paging or polling, across all stored history. Inbox-scoped keys see their inbox's events only.
OAuth: allowed with all of events:read, mail:read. App permissions apply in addition to account and resource checks.
Also available as client.events.list in TypeScript, client.events.list in Python, the events_list tool and doorman events list on the command line.
Organizations: a member's console session needs mail:read. API keys and app tokens are not held to member permissions. See Roles and permissions.
Parameters
inboxIdstring, in queryoptionalOnly this inbox. Example:
inb_01jc4q7w9k2m5n8p3r6t1v4x7z.threadIdstring, in queryoptionalOnly events whose stored payload names this thread. Can be combined with inboxId and type. A valid id with no visible matching events returns an empty result, including ids from another account or inbox. Trashing a thread does not remove its stored events. Example:
thr_01jc5a1b2c3d4e5f6g7h8j9k0m.type"message.received" | "message.sent" | "thread.updated" | "inbox.created" | "inbox.deleted" | "delivery.failed" | "message.held" | "send.held" | "send.discarded" | "sign_in.requested" | "sign_in.completed", in queryoptionalOnly this event type.
limitinteger, in queryoptionalPage size, 1 to 100. Defaults to 50.
cursorstring, in queryoptionalPage from here: events with a smaller
seq. Example:1041.afterstring, in queryoptionalPoll from here: events with a larger
seq, oldest first. Example:1042.
Answers 200: A page, or a poll.
Response 200: EventList
One of:
EventPage
Events newest first, the answer to a cursor (or no cursor) request.
dataEvent[]requirednextCursorstring | nullrequiredThe
seqto pass ascursorfor the next page, as a string; null on the last page. Example:1041
EventPoll
Events oldest first, the answer to an after request.
dataEvent[]requiredlatestSeqintegerrequiredThe
seqto poll from next: the last event of a full page, otherwise the account's newest.
Errors
| Status | Error | Meaning |
|---|---|---|
| 400 | validation_error | A field is missing or invalid; the message names it. |
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | permission_denied | The signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role. |
| 403 | member_deactivated | The signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 409 | account_mismatch | The request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again. |
| 500 | internal_error | Something went wrong on the server. |
curl -s "https://api.doorman.fyi/v1/events" \
-H "authorization: Bearer $DOORMAN_API_KEY"const response = await fetch("https://api.doorman.fyi/v1/events", {
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
},
redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const result = await response.json();import os
import requests
response = requests.get(
"https://api.doorman.fyi/v1/events",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
result = response.json()Read an event
GET/v1/events/{eventId}
Access any: any API key, or a console session.
The event, the payload exactly as it was signed and sent, and every delivery it produced with its status, attempts and last error. Inbox-scoped keys see the inbox webhook's delivery only.
OAuth: allowed with all of events:read, mail:read. App permissions apply in addition to account and resource checks.
Also available as client.events.get in TypeScript, client.events.get in Python, the events_get tool and doorman events get on the command line.
Organizations: a member's console session needs mail:read. API keys and app tokens are not held to member permissions. See Roles and permissions.
Parameters
eventIdstring, in pathrequiredThe event. Example:
evt_01jc5e5f6g7h8j9k0m1n2p3q4r.
Answers 200: The event, its payload and its deliveries.
Response 200: EventDetail
An event, the payload exactly as it was signed and sent, and the deliveries it produced.
eventEventrequiredpayloadWebhookEvent | objectrequiredThe typed event payload, or an unknown future event object.
deliveriesDelivery[]requiredInbox-scoped keys see the inbox webhook's delivery only.
Errors
| Status | Error | Meaning |
|---|---|---|
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | permission_denied | The signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role. |
| 403 | member_deactivated | The signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 409 | account_mismatch | The request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again. |
| 500 | internal_error | Something went wrong on the server. |
curl -s "https://api.doorman.fyi/v1/events/evt_01jc5e5f6g7h8j9k0m1n2p3q4r" \
-H "authorization: Bearer $DOORMAN_API_KEY"const response = await fetch("https://api.doorman.fyi/v1/events/evt_01jc5e5f6g7h8j9k0m1n2p3q4r", {
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
},
redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const result = await response.json();import os
import requests
response = requests.get(
"https://api.doorman.fyi/v1/events/evt_01jc5e5f6g7h8j9k0m1n2p3q4r",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
result = response.json()
