Events

AgentInbox emits an event whenever something meaningful happens to an inbox — an email arrives, a code is extracted, a wait resolves, or an inbox expires. Events power your dashboard timeline and are delivered to your webhook endpoints in real time.

Two ways to consume events

Subscribe to events with webhooks for push-based delivery, or review them on the Events page in your dashboard for an audit trail of recent activity.

Event types

EventDescription
email.receivedA new email arrived in one of your inboxes.
otp.extractedA one-time passcode was detected and extracted from an email.
magic_link.extractedA magic sign-in link was detected and extracted from an email.
password_reset.extractedA password-reset link or code was detected and extracted.
wait.completedA pending wait resolved because the email or extraction it was waiting for arrived.
inbox.expiredAn inbox reached the end of its TTL and stopped receiving mail.

Payload shape

Every event shares the same envelope: a unique id, the event type, an ISO-8601 timestamp, and a data object whose fields depend on the event type.

email.received
{
"id": "evt_123",
"event": "email.received",
"timestamp": "2026-06-26T10:30:00Z",
"data": {
"inboxId": "inb_123",
"messageId": "msg_456",
"subject": "Your verification code",
"from": "noreply@example.com"
}
}

Extraction events

Extraction events include the detected type and the extracted value so your agent can use the code or link without parsing the email body.

otp.extracted
{
"id": "evt_124",
"event": "otp.extracted",
"timestamp": "2026-06-26T10:30:02Z",
"data": {
"inboxId": "inb_123",
"messageId": "msg_456",
"type": "otp",
"value": "284913"
}
}

Next Steps