Skip to main content
PATCH
/
mailbox
/
messages
/
{message_id}
Update mailbox message flags
curl --request PATCH \
  --url https://app.sendmux.ai/api/v1/mailbox/messages/{message_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "seen": true,
  "flagged": true,
  "keywords": {
    "$answered": true,
    "agent_triaged": true,
    "needs_reply": false
  }
}
'
{
  "meta": {
    "request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
  },
  "data": {
    "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
    },
    "text_body": "<string>",
    "html_body": "<string>",
    "attachments": [
      {
        "id": "<string>",
        "filename": "<string>",
        "content_type": "application/pdf",
        "size_bytes": 123,
        "disposition": "<string>",
        "content_id": "<string>",
        "download_url": "<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

If-Match
string

Path Parameters

message_id
string
required

Body

application/json
seen
boolean
flagged
boolean
keywords
object

Map of message keyword names to booleans. true sets the keyword; false clears it. Keyword names are normalised to lowercase. Lifecycle keywords such as $draft are read-only.

Example:
{
"$answered": true,
"agent_triaged": true,
"needs_reply": false
}

Response

Updated message

ok
enum<boolean>
required
Available options:
true
meta
object
required
data
object
required