Send an email to up to 100 recipients in a single request. Emails are
delivered with your configured sender name, reply-to address, footer, physical
address, and an unsubscribe link — the same conventions as newsletters sent
from the dashboard — and each send is recorded in your account as a sent post
(marked source: api) with delivery events and usage tracking.
Sender verification required. You must verify your sender email in
Newsletters → Settings before using this endpoint. Unverified senders
receive a 403 with error code EMAIL_SENDER_NOT_VERIFIED.
Endpoint
POST https://api.pocketsflow.com/newsletters/send
Authenticate with your API key as a Bearer token (pk_live_… or pk_test_…).
See API reference for how to create a key.
Request body
| Field | Type | Required | Description |
|---|
to | string or string[] | Yes | A recipient email address, or an array of 1–100 addresses. |
subject | string | Yes | Email subject line. |
html | string | Yes* | HTML body of the email. *Required unless text is provided. |
text | string | No | Plain-text body. If html is omitted, a simple HTML body is generated from it. |
fromName | string | No | Sender display name. Defaults to your newsletter settings’ default from name. |
replyTo | string | No | Reply-to address. Defaults to your configured reply-to (or sender) email. |
preview | string | No | Inbox preview text. |
Example request
curl https://api.pocketsflow.com/newsletters/send \
-H "Authorization: Bearer pk_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"to": ["customer@example.com"],
"subject": "Your weekly update",
"html": "<p>Hi there — here is what is new this week.</p>",
"fromName": "Acme Studio",
"replyTo": "hello@acme.com"
}'
Example response
{
"id": "665f1c2e8b3735856be339aa",
"accepted": ["customer@example.com"],
"status": "sent"
}
| Field | Description |
|---|
id | ID of the email post recorded for this send. |
accepted | The recipients the email was successfully sent to. |
status | Always "sent" on success. |
Errors
| Status | Error | Meaning |
|---|
400 | message in error | Validation failed — invalid recipient, more than 100 recipients, missing subject, or missing both html and text. |
401 | — | Missing or invalid API key. |
403 | EMAIL_SENDER_NOT_VERIFIED | Your sender email is not verified yet. |
502 | EMAIL_SEND_FAILED | No emails could be delivered. Retry later. |
Notes
- Recipient addresses are normalized to lowercase and de-duplicated.
- Every email automatically includes your footer, physical address, and a
per-recipient unsubscribe link (required for compliance).
- Sends count toward your email usage (
totalEmailsSent).
- The full OpenAPI definition is available in the
interactive API reference.