POST /received-emails/{email_id}/forward
Forward a received email
Key carrying mail:send AND job:read. Served only when inbound is open to the account (404 not_found otherwise). Forwarding is an ordinary send (job mail.send).
API key (Bearer), on the public API endpoint.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
email_id | path | string · required | |
Idempotency-Key | header | string · required |
Request body
application/json
| Field | Type | Description |
|---|---|---|
to | array<string> · required | |
from | string · required | |
note | string |
Responses
| Status | Description | Body |
|---|---|---|
202 | Forward accepted | object |
404 | Not found | Error |
422 | Invalid body | Error |
401 | Key missing or invalid | Error |
Examples
curl
curl -X POST "$GALON_API_BASE/received-emails/<email_id>/forward" \
-H "Authorization: Bearer $GALON_API_KEY" \
-H "Idempotency-Key: <unique-key>" \
-H "Content-Type: application/json" \
-d '{"to": ["ana@example.com"], "from": "string"}'Node.js (SDK)
import { Galon } from "galon";
const galon = new Galon(process.env.GALON_API_KEY);
const result = await galon.receivedEmails.forward("<id>", {"to": ["ana@example.com"], "from": "string"}, { idempotencyKey: "<unique-key>" });Python (SDK)
from galon import Galon
galon = Galon() # reads GALON_API_KEY
result = galon.received_emails.forward("<id>", {"to": ["ana@example.com"], "from": "string"}, idempotency_key="<unique-key>")