Mailbox API

Update mailbox message flags

Changed on

Updates mutable message flags and keywords unconditionally unless If-Match is supplied. Send If-Match with a prior ETag to reject stale edits.

patch/mailbox/messages/{message_id}

Request

  • Base URL: https://app.sendmux.ai/api/v1
  • URL: https://app.sendmux.ai/api/v1/mailbox/messages/{message_id}
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.sendmux.ai/oauth/authorize, token URL https://app.sendmux.ai/oauth/token, scopes: mailbox.settings.update)

Path parameters

message_idstring required

Query parameters

mailbox_idstring

Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.

Headers

If-Matchstring

Request body

flaggedboolean
keywordsobject

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.

seenboolean

Example request

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

Response

Updated message

oktrue required

Example response

{
  "meta": {
    "request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
  },
  "data": {
    "attachments": [
      {
        "content_type": "application/pdf",
        "disposition": "attachment",
        "download_url": "https://app.sendmux.ai/api/v1/mailbox/messages/msg_123/attachment-downloads/attref_abc123?download_token=...",
        "filename": "invoice.pdf",
        "size_bytes": 12345
      }
    ],
    "bcc": [
      {
        "email": "agent@example.com",
        "name": "Support"
      }
    ],
    "cc": [
      {
        "email": "agent@example.com",
        "name": "Support"
      }
    ],
    "from": {
      "email": "agent@example.com",
      "name": "Support"
    },
    "in_reply_to": [
      "20260918.0009@example.com"
    ],
    "keywords": [
      "$seen",
      "$flagged",
      "agent_triaged"
    ],
    "message_id": [
      "20260919.0001@example.com"
    ],
    "references": [
      "20260917.0001@example.com",
      "20260918.0009@example.com"
    ],
    "reply_to": [
      {
        "email": "agent@example.com",
        "name": "Support"
      }
    ],
    "to": [
      {
        "email": "agent@example.com",
        "name": "Support"
      }
    ]
  }
}

Changes

    • info

      removed subschema #2 from the // response property allOf list for the response status

    • info

      added subschema #2 to the // response property anyOf list for the response status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • breaking

      the / response's property type changed from no type to object for status

    • info

      added the optional property // to the response with the status

    • info

      removed subschema #2 from the / response property allOf list for the response status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status