Skip to main content
OpenMail sends webhooks when inbound email is received, and when the reputation engine suspends or reactivates one of your inboxes or pods. Emails that are blocked by sender rules or filtered out by allowlist mode do not trigger events.

Events

EventDescription
message.receivedA new inbound email was delivered to an inbox
inbox.suspendedAn inbox was suspended (sending blocked) by the reputation engine or an admin
inbox.reactivatedA previously suspended inbox was reactivated
pod.suspendedA pod was suspended — every inbox in it is blocked from sending
pod.reactivatedA previously suspended pod was reactivated
inbox.* and pod.* are reputation lifecycle events: they let you react when one of your end-users is cut off (for example, pause that agent) without your whole account being affected. We handle suspension automatically; these events tell you when it happens. They are delivered to your HTTP webhook only (not over WebSockets).

Use cases

  • Agent routing - Use inbox_id to route inbound email to the right user or container.
  • Real-time replies - Trigger your agent to process and reply within seconds of receipt.
  • Multi-tenant - Each inbox maps to an agent; inbox_id in the payload tells you which one.

Payload structure

{
  "event": "message.received",
  "event_id": "evt_abc123",
  "occurred_at": "2024-03-21T10:05:00.000Z",
  "delivered_at": "2024-03-21T10:05:01.000Z",
  "attempt": 1,
  "inbox_id": "inb_92ma...",
  "thread_id": "thr_xyz...",
  "message": {
    "id": "msg_...",
    "rfc_message_id": "<original@message.id>",
    "from": "sender@example.com",
    "to": "inbox@openmail.sh",
    "cc": [],
    "subject": "Email subject",
    "body_text": "Plain text body",
    "attachments": [
      {
        "filename": "document.pdf",
        "contentType": "application/pdf",
        "sizeBytes": 12345,
        "url": "https://api.openmail.sh/v1/attachments/msg_.../document.pdf",
        "parsedText": "Invoice #2847\nDate: March 15, 2026\nAmount: $1,250.00",
        "extractionMethod": "pdf"
      }
    ],
    "received_at": "2024-03-21T10:05:00.000Z"
  }
}

Field descriptions

FieldDescription
eventEvent type — e.g. message.received (see Events)
event_idUnique ID for this delivery. Use for deduplication - we may retry.
occurred_atWhen the event happened. Use to sort if events arrive out of order.
inbox_idThe inbox that received the message
thread_idConversation thread. Use with the API to fetch or send messages.
message.idUnique message ID
message.fromSender email address
message.subjectEmail subject line
message.body_textPlain-text body
message.attachmentsArray of attachments with url, parsedText (extracted content), and extractionMethod. See Attachments.

Reputation lifecycle payload

inbox.suspended, inbox.reactivated, pod.suspended, and pod.reactivated share the structure below. They carry a reason instead of a message. For pod.* events, inbox_id and inbox_address are null.
{
  "event": "inbox.suspended",
  "event_id": "evt_def456",
  "occurred_at": "2024-03-21T10:05:00.000Z",
  "inbox_id": "inb_92ma...",
  "inbox_address": "agent@yourdomain.com",
  "pod_id": "pod_abc...",
  "reason": "high_bounce_rate"
}
FieldDescription
inbox_idThe affected inbox, or null for pod.* events
inbox_addressThe affected inbox’s email address, or null for pod.* events
pod_idThe affected pod (or the suspended inbox’s pod), if any
reasonWhy it was suspended (see below); null on *.reactivated events

Reason codes

CodeMeaning
high_bounce_rateToo many of the inbox’s recipients bounced
high_complaint_rateToo many recipients marked messages as spam
abusePhishing or abusive sending was detected
pod_degradedThe pod’s overall sending health fell too far
manual_reviewSuspended by OpenMail staff pending review
otherSuspended for another reason
A suspended inbox or pod is blocked from sending until reactivated. The reputation engine never auto-recovers a suspension — reactivation is an explicit action, which is when the *.reactivated event fires.

Headers

HeaderDescription
Content-Typeapplication/json
X-TimestampUnix timestamp (seconds) used in signature
X-SignatureHMAC-SHA256 signature
X-Event-IdUnique event ID for deduplication

Verification

HMAC signature verification.

Setup

Full implementation guide.