API reference
The base URL is https://emailstoforward.com. Requests and responses are JSON. Authenticate every request
with your API key:
Authorization: Bearer etf_...
Send a message
POST /v1/messages
| Field | Required | Notes |
|---|---|---|
from | Yes | Object with email and optional name. The address must be on an authenticated domain. |
to | Yes | An email address, or an object with email and name. One recipient per message. |
subject | Yes | Up to 300 characters. |
html, text | One of them | Send both for the best rendering across mail apps. |
reply_to | No | Where replies should go. |
headers | No | Extra headers. Routing, identity and unsubscribe headers cannot be set. |
metadata | No | Your own string keys and values, returned with the message. |
delay_seconds | No | Send this many seconds from now. The suppression list is checked again at send time. |
idempotency_key | No | Repeating a request with the same key returns the first message and does not send again. |
{
"from": {"email": "hello@emailstoforward.com", "name": "Hello"},
"to": "owner@example.com",
"subject": "Quick question",
"text": "Hi there...",
"idempotency_key": "lead-1842"
}
The response is 202 Accepted with the message:
{"id": "msg_4f1c2a9b7d3e5f60a1b2c3d4", "status": "sent", "detail": "", ...}
Message statuses
| Status | Meaning |
|---|---|
sent | Handed to the delivery provider. |
delivered | The receiving server accepted it. |
suppressed | Not sent: the recipient is on the suppression list. |
bounced | The receiving server rejected it permanently. The address is now suppressed. |
complained | The recipient marked it as spam. The address is now suppressed. |
failed | The delivery provider refused it. detail says why. |
Look up messages
GET /v1/messages/{id} returns one message with its events in order.
GET /v1/messages?limit=50 returns your most recent messages.
Suppression list
GET /v1/suppressions lists suppressed addresses with the reason and date.
POST /v1/suppressions adds one: {"email": "owner@example.com", "reason": "asked by reply"}.
Use this when someone opts out by replying or by phone.
DELETE /v1/suppressions/{email} removes a manual entry or a bounce. Addresses that unsubscribed or
complained cannot be removed.
Replies and events
PUT /v1/webhook with {"url": "https://..."} sets where events for your messages are posted.
Each event is a JSON object with a type:
| Type | Sent when |
|---|---|
reply | A recipient replied. Includes message_id, from_email, subject, text, rfc_message_id and your metadata. |
delivered | The receiving server accepted the message. |
bounced, complained, unsubscribed | The address has been added to the suppression list. |
unmatched_mail | Mail arrived that does not answer any message. |
To answer a reply in the same thread, send a new message with In-Reply-To and References
headers set to the reply's rfc_message_id in angle brackets. Failed webhook calls are retried for several
hours. GET /v1/replies lists recent replies.
Unsubscribes
Every message carries List-Unsubscribe and List-Unsubscribe-Post headers, which mail apps
show as an unsubscribe button. Using it suppresses the address at once. You do not need to add anything, though a
plain-language opt-out line in the body is still good practice and, for commercial email in the United States, required.
Errors
Errors return a JSON body with an error message. 401 means the key is missing or wrong,
422 means the request is not valid, and 413 means the body is too large (500 KB).