Fluxmail

Forward a message

Forward a message to one or more recipients.

POST /api/v1/accounts/{accountId}/messages/{messageId}/forward

Forward a message to one or more recipients.

Authentication

Pass a Fluxmail API key as a bearer token. The key determines the member, mailbox scope, and permissions for the request.

Request

curl 'http://localhost:8977/api/v1/accounts/acct_123/messages/msg_123/forward' \
  -X POST \
  -H "Authorization: Bearer $FLUXMAIL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  --data '{
  "to": [
    {
      "email": "person@example.com"
    }
  ]
}'

Parameters

NameLocationRequiredTypeDetails
accountIdpathYesstringMinimum length: 1.
messageIdpathYesstringMinimum length: 1.
Idempotency-KeyheaderYesstringA unique key for one intended delivery. Reuse it when retrying the same request. Minimum length: 1. Maximum length: 255. Pattern: ^[\x21-\x7e]+$.

Request body

Content type: application/json

{
  "type": "object",
  "properties": {
    "to": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "name": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "email"
        ],
        "additionalProperties": false
      },
      "minItems": 1
    },
    "cc": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "name": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "email"
        ],
        "additionalProperties": false
      }
    },
    "comment": {
      "type": "string"
    },
    "includeAttachments": {
      "type": "boolean",
      "default": true,
      "description": "Include attachments from the original message. Defaults to true."
    }
  },
  "required": [
    "to"
  ],
  "additionalProperties": false
}

Safe retries

Fluxmail keeps each idempotency result for 24 hours and scopes it to the authenticated API key.

  • Repeating a completed request with the same key returns the stored response and sets Idempotency-Replayed: true.
  • Reusing the key with different request data returns 409 idempotency_conflict.
  • A request that is still running, or whose outcome became uncertain during a restart, returns 409 idempotency_in_progress with Retry-After: 1.

Reuse the original key when retrying the same request. If the outcome is uncertain, do not create a new key. Check the Sent folder before deciding whether to start a new delivery.

Responses

StatusDescriptionContent type
200Forward sentapplication/json
400Invalid requestapplication/json
401Authentication requiredapplication/json
403Permission or plan deniedapplication/json
404Resource not foundapplication/json
409Request conflictapplication/json
422Unsupported capabilityapplication/json
429Provider rate limitapplication/json
500Internal errorapplication/json
503Provider unavailableapplication/json

200 response

{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "threadId": {
          "type": "string"
        },
        "warnings": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "id",
        "threadId"
      ],
      "additionalProperties": false
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

Last updated