Skip to Content

Forward a message

Forward a message. Request: POST /v1/mailboxes/{id}/messages/{messageId}/forward. Scope: mailboxes:send.

POST
/v1/mailboxes/{id}/messages/{messageId}/forward

Forwards an email to new recipients as a new conversation from the thread's endpoint, with the original quoted below the caller's text and its attachments attached ahead of any the caller adds. The combined attachments must fit the email attachment limits.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^mbx_[0-9a-hjkmnp-tv-z]{16,24}$
messageId*string
Match^msg_[0-9a-hjkmnp-tv-z]{16,24}$

Header Parameters

idempotency-key?string

Optional key that makes a mailbox send idempotent for the calling key or member. Repeating the request with the same key and body returns the original action in its current state. Keep the key after a lost response. Reusing it with different content returns 409. Active actions retain their key; terminal receipts remain replayable for 24 hours.

Match^[\s\S]{1,255}$

Request Body

application/json
  1. body
to*array<string>
Items1 <= items
cc?array<string>|null
bcc?array<string>|null
text?string|null
html?string|null
attachments?array<>|null

Response Body

MailboxSendReceipt

application/json
  1. response
actionId*MailboxActionId
Match^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$
draftId*|null
messageId*|null
threadId*|null
state*string
Value in"approvalRequired""queued""accepted""completed""notSent""uncertain"
acceptedAt*string|null
waitReason*|null
reviewExpectedAt*string|null
skippedRecipients*array<>
executeUntil*string|null
retryAt*string|null
problem*|null
retryEligible*boolean
decision*|null
createdAt*string
updatedAt*string
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.mailboxes.forward({
  "id": "example",
  "messageId": "example",
  "to": [
    "example"
  ]
});
Example Response
{
  "actionId": "string",
  "draftId": "string",
  "messageId": "string",
  "threadId": "string",
  "state": "approvalRequired",
  "acceptedAt": "string",
  "waitReason": "rate",
  "reviewExpectedAt": "string",
  "skippedRecipients": [
    {
      "address": "string",
      "reason": "bounce",
      "topicId": "string"
    }
  ],
  "executeUntil": "string",
  "retryAt": "string",
  "problem": {
    "code": "string",
    "message": "string",
    "error": {
      "_tag": "SenderNotReadyError",
      "message": "string",
      "sender": "string",
      "retryAfterSeconds": 0
    }
  },
  "retryEligible": true,
  "decision": {
    "id": "string",
    "reviewRound": 1,
    "requirement": "run",
    "decider": "rule",
    "outcome": "allow",
    "reason": "string",
    "scopes": [
      {
        "kind": "organization",
        "id": "string"
      }
    ],
    "rule": {
      "scope": {
        "kind": "organization",
        "id": "string"
      },
      "index": 0
    },
    "guard": "string",
    "guardReason": "string",
    "resolution": {
      "by": "string",
      "at": "string",
      "as": "approved",
      "diff": {
        "text": {
          "before": "string",
          "after": "string"
        },
        "html": {
          "before": "string",
          "after": "string"
        }
      }
    }
  },
  "createdAt": "string",
  "updatedAt": "string"
}

Related documentation