Skip to main content
GET
/
mailbox
/
events
Stream mailbox events
curl --request GET \
  --url https://app.sendmux.ai/api/v1/mailbox/events \
  --header 'Authorization: Bearer <token>'
{
  "team_public_id": "<string>",
  "mailbox_id": "<string>",
  "message_id": "<string>",
  "sender": "<string>",
  "recipients": [
    "<string>"
  ],
  "is_spam": true,
  "message": {
    "id": "<string>",
    "thread_id": "<string>",
    "folder_ids": [
      "<string>"
    ],
    "subject": "<string>",
    "preview": "<string>",
    "from": {
      "email": "agent@example.com",
      "name": "Support"
    },
    "to": [
      {
        "email": "agent@example.com",
        "name": "Support"
      }
    ],
    "cc": [
      {
        "email": "agent@example.com",
        "name": "Support"
      }
    ],
    "bcc": [
      {
        "email": "agent@example.com",
        "name": "Support"
      }
    ],
    "received_at": "<string>",
    "sent_at": "<string>",
    "size_bytes": 123,
    "has_attachments": true,
    "keywords": [
      "$seen",
      "$flagged",
      "agent_triaged"
    ],
    "flags": {
      "seen": true,
      "flagged": true,
      "draft": true,
      "answered": true
    },
    "rfc5322_message_id": "<string>",
    "attachments": [
      {
        "id": "<string>",
        "filename": "<string>",
        "content_type": "application/pdf",
        "size_bytes": 123,
        "disposition": "<string>",
        "content_id": "<string>",
        "download_url": "<string>"
      }
    ],
    "body": {
      "text": "<string>",
      "html": "<string>",
      "is_truncated": true,
      "max_bytes": 123
    }
  },
  "occurred_at": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.sendmux.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Sendmux API key. Use a root API key for Management API routes, or a mailbox credential for Mailbox API routes. Obtain keys from the dashboard under API Keys.

Headers

Last-Event-ID
string

Query Parameters

event_types
string

Comma-separated list: message.received, message.received.spam.

last_event_id
string
ping
integer
Required range: 10 <= x <= 300
close_after
integer
Required range: 30 <= x <= 3600

Response

Server-sent event stream. Event data uses the MailboxRealtimeEvent shape.

event_type
enum<string>
required
Available options:
message.received,
message.received.spam,
sync_required
team_public_id
string
required
mailbox_id
string
required
message_id
string | null
required
message_id_kind
enum<string> | null
required
Available options:
provider,
rfc5322
sender
string | null
required
recipients
string[]
required
is_spam
boolean | null
required
message
object
required
occurred_at
string
required