SendClipper documentation
Introduction
SendClipper is a sending API and a real mailbox on one verified domain. Your application sends transactional email through a JSON endpoint, receives delivery events over signed webhooks, and can read the replies that land in a mailbox. Campaigns, a drag-and-drop template designer and sandboxes for test mail come with it. To let an AI assistant do the setup, the MCP server connects Claude Code, Cursor and others to this API.
| Base URL | https://sendclipper.com/v1 |
| Format | JSON request and response bodies, UTF-8. Timestamps are ISO 8601 in UTC. Ids are UUIDs unless a public id is shown (msg_…, tpl_…, evt_…). |
| Auth | API key in an Authorization: Bearer header for your servers; a session for the dashboard. |
| Versioning | Everything lives under /v1. Fields and event types are added without notice; nothing is removed or retyped inside /v1. Ignore what you do not recognise. |
Quickstart
Four steps from an empty account to a delivered message.
- Sign in at /login. Every account has a workspace, and the person it was created for is its Owner.
- Add and verify a domain on the Domains screen (or through the API). Publish the DNS records it shows (MX, SPF, DKIM and DMARC) and press Check now. A domain must be
verifiedbefore anything can be sent from it. - Create an API key on the API Keys screen with the
sendingpermission. The full key (sc_live_…) is shown once; store it in your secret manager. - Send:
curl -X POST https://sendclipper.com/v1/emails \
-H "Authorization: Bearer sc_live_<your key>" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"from": "hello@send.acme.io",
"to": "ada@lumen.io",
"subject": "Welcome to Acme",
"html": "<h1>Hi Ada</h1><p>Thanks for signing up.</p>",
"text": "Hi Ada, thanks for signing up."
}'// Node.js 18+. No SDK needed: the API is plain JSON over HTTPS.
const res = await fetch("https://sendclipper.com/v1/emails", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SENDCLIPPER_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
from: "hello@send.acme.io",
to: "ada@lumen.io",
subject: "Welcome to Acme",
html: "<h1>Hi Ada</h1><p>Thanks for signing up.</p>",
}),
});
if (!res.ok) throw new Error(await res.text());
const { id, status } = await res.json(); // status: "queued"import os, uuid, requests
r = requests.post(
"https://sendclipper.com/v1/emails",
headers={
"Authorization": f"Bearer {os.environ['SENDCLIPPER_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"from": "hello@send.acme.io",
"to": "ada@lumen.io",
"subject": "Welcome to Acme",
"html": "<h1>Hi Ada</h1><p>Thanks for signing up.</p>",
},
timeout=10,
)
r.raise_for_status()
print(r.json()["id"], r.json()["status"]) # queued// Java 11+, with the official SDK. Maven (pom.xml):
// <dependency>
// <groupId>com.sendclipper</groupId>
// <artifactId>sendclipper-java</artifactId>
// <version>0.1.0</version>
// </dependency>
// Gradle (build.gradle.kts):
// dependencies {
// implementation("com.sendclipper:sendclipper-java:0.1.0")
// }
import com.sendclipper.SendClipper;
import com.sendclipper.model.SendEmailParams;
import com.sendclipper.model.SentEmail;
public class Quickstart {
public static void main(String[] args) {
SendClipper client = new SendClipper(); // reads SENDCLIPPER_API_KEY
// No Idempotency-Key to add: the SDK puts one on every send itself.
SentEmail email = client.emails().send(SendEmailParams.builder()
.from("hello@send.acme.io")
.to("ada@lumen.io")
.subject("Welcome to Acme")
.html("<h1>Hi Ada</h1><p>Thanks for signing up.</p>")
.build());
System.out.println(email.getId() + " " + email.getStatus()); // queued
}
}HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "0b6c2d4e-7f18-4c1a-9e3b-2d5f6a7b8c9d",
"messageId": "msg_9f2b7c10ad",
"sesMessageId": null,
"from": "hello@send.acme.io",
"to": "ada@lumen.io",
"domain": "send.acme.io",
"subject": "Welcome to Acme",
"status": "queued",
"createdAt": "2026-09-10T09:41:02.518Z",
"templateId": null
}The Java sample uses the official SDK, which returns the same fields as typed getters. Install, errors and retries, webhooks and the rest are in the Java SDK section.
The message is accepted as queued and handed to the provider by a background worker within a second or two. Watch it move to sent, delivered and beyond on the Emails screen, with GET /v1/emails/:id, or by subscribing a webhook.
A new workspace can send 100 emails a day (403 sandbox_cap_reached past that; the count resets at midnight UTC). A review lifts the cap, not a setting. Once your domain is verified and you have subscribed to a plan (Settings › Plan & billing), the dashboard banner offers Request review. A person on our side looks at the workspace, and you get an email when it is out of the sandbox, or a note saying what to fix first. Then you can ask again. Sending keeps working up to the cap in the meantime.
Authentication
API keys
An API key is sc_live_ followed by 32 hex characters. Send it as a bearer token on every request:
Authorization: Bearer sc_live_9f2b7c10ad42c3d4e5f60718a1b2c3d4Keys are stored hashed; the dashboard shows only sc_live_9f2b••••••••a17c after creation. A revoked key answers 401 immediately. Every request made with a key is rate-limited per key (below).
| Field | Type | Description |
|---|---|---|
namerequired | string | 1 to 100 characters. Shown in the list and in the key's audit trail. |
permissionrequired | "full" | "sending" | "read" | What the key may do. See the table below. |
domainId | uuid | Restrict the key to one domain. Omit for a workspace-wide key. A domain the workspace does not own is 404. |
mailboxId | uuid | Restrict the key to one address (A key for one inbox). The key's domain becomes that address's domain; a domainId naming another domain is 400 api_key_scope_conflict. An address not in the workspace is 404 mailbox_not_found, an archived one 400 api_key_mailbox_archived. |
The 201 response carries token (the full key, returned once only) plus id, name, masked, permission, domainId, mailbox ({ id, address } for a key limited to one inbox, else null), createdAt and lastUsedAt.
Revokes the key. 204; requests with it fail from the next one.
Gives the key a new secret with the same name, permission and scope, and answers 201 with the create response, token included, once. The old secret fails with 401 from that moment; the key's id changes too. A key that was already revoked or rotated is 404.
Which routes take an API key. A key reaches the send routes, /v1/mailboxes/**, and an explicit list of management routes, each marked API key or session in this reference. Everything else needs a signed-in session. The groups:
- Send:
POST /v1/emails,/batch. - Domains: every route on
/v1/domains. - Templates: every route on
/v1/templatesand the template tags, except the two AI-assistant routes (GET ai/providers,POST ai/assist). - Sandboxes: every route on
/v1/sandboxes, credentials included. - Webhooks:
/v1/webhook-endpoints,/v1/webhook-dispatchesandGET /v1/webhook-deliveries. - Suppressions: every route on
/v1/suppressions. - Contacts:
/v1/contacts(including the CSV/vCard export and the import preview) and/v1/audiences. - Email logs:
GET /v1/emails,/stats/summaryand/:id. - Mailboxes:
/v1/mailboxes/**. - Who am I:
GET /v1/workspaceand the maskedGET /v1/api-keys.
A key never mints or revokes a key, and cannot resend a failed message (POST /v1/emails/:id/resend; retry with POST /v1/emails instead). A route outside the list answers with one of these refusals:
| Status | Code | When |
|---|---|---|
| 401 | api_key_not_accepted | The route needs a signed-in dashboard session. |
| 403 | api_key_mailbox_scoped | The key is limited to one inbox; it only reads and answers that address's mail. |
| 403 | api_key_mailbox_unavailable | The key is limited to one inbox and that address is archived. |
| 403 | api_key_domain_scoped | The key is limited to one domain; management routes need a workspace-wide key. |
| 403 | insufficient_role | The key's permission lacks what the route needs (see below). |
Permissions and roles
| Key permission | Can call |
|---|---|
sending | Send (POST /v1/emails, /batch) plus every read route on the list above: mailboxes and their mail, email logs, domains, templates, sandboxes, webhooks, suppressions, contacts. Cannot change anything else. |
read | Read routes only. Cannot send or change anything. |
full | Everything a workspace Admin can do on the API-key routes: send, and manage domains, templates, sandboxes (credentials included), webhooks, suppressions, contacts, email logs and mailboxes. |
Dashboard users have a role instead: Owner, Admin, Developer or Viewer. Each route below names the capability it needs; Owner and Admin hold all of them, Developer holds the developer ones (manage:keys, manage:webhooks, send:email, manage:mailboxes, manage:sandboxes, manage:templates, use:mailbox), and Viewer holds read only. A missing capability is 403 insufficient_role naming the roles that can.
Domain-scoped keys
A key created with domainId is bounded to that one domain:
- It may send only
froman address on exactly that domain:acme.iodoes not coverbilling.acme.io. Anything else is403 api_key_domain_scope. - It may manage and read only the mailboxes on that domain. Another domain's mailbox answers
404, never403. - It is refused on management routes (domains, templates, sandboxes, webhooks, suppressions, contacts, email logs) with
403 api_key_domain_scoped, because those span the workspace. Use a workspace-wide key for them. - Deleting the domain deletes the key with it.
Give this kind of key to a service that owns a whole domain. A support tool or an AI agent that should read support@acme.io and nothing else wants the narrower key below.
A key for one inbox
A key created with mailboxId reads and answers one address and nothing else: hand it to the agent that runs support@acme.io and it cannot read billing@acme.io, send as anyone, or change any setting. In the dashboard, pick the One inbox scope when you create the key. It reaches exactly ten routes, each only for its own address:
GET /v1/mailboxes(a list of exactly one address),GET /v1/mailboxes/:idandGET /v1/mailboxes/:id/aliases(itsusage, the domain's address count, isnullfor this key);- reading its mail:
GET /v1/mailboxes/:id/messages,…/messages/:messageId(with?format=agenttoo),…/parts/:partIdand…/reply-context; - answering it (Answer it from your app):
POST …/messages/:messageId/reply,POST /v1/mailboxes/:id/messagesandPATCH …/messages/:messageId. These three need Full access; a Read only or Sending only key for one inbox can read its mail and is403 api_key_scope_insufficienthere.
Any other address's id, on the same domain or another, answers the same 404 Mailbox not found a domain-scoped key gets for a domain it may not see, so the key learns nothing about the rest of the workspace; the message list's per-domain domains unread counts are empty for it, too. Every other route a key can reach, including POST /v1/emails, /batch, the management routes and the address's own settings, password and alias changes, answers 403 api_key_mailbox_scoped. That refusal (and the next one) carries error.detail.mailbox: { id, address }, so a client can learn which address its key is for. It is checked before api_key_domain_scoped and, on POST /v1/emails, before the key's permission.
While the address is archived every request with the key, on any route a key can reach, answers 403 api_key_mailbox_unavailable; restoring the address makes it work again. Deleting the address for good deletes the key (an ordinary 401), and moving its domain to another account removes it like any domain-scoped key. Everything the address's own rules say still applies: whom it may write to, its budget, approval, and the timeline that names the key.
Sessions
The dashboard signs in with POST /v1/auth/login and holds a 7-day JWT. An account is created with POST /v1/auth/register, which requires acceptedTermsVersion: the version of the Terms of Service and Acceptable Use Policy the person accepted, currently "2026-09-23" (shown at the top of both pages). Without it the answer is 400 terms_not_accepted, with the value to send in detail.version. Sign-up is by invitation: without the inviteCode from an invite link it answers 403 registration_closed. Session tokens work on every route; API keys work on the send routes, /v1/mailboxes/** and the management routes listed above. Two-factor authentication, password reset and session management (/v1/sessions) live under Settings and are not part of the integration surface.
Conventions
Errors
A deliberate refusal carries a stable machine-readable code in an error envelope. Branch on error.code, show error.message to a person, and read error.detail for specifics (a missing merge tag, a limit, a retry delay).
{
"error": {
"code": "api_key_domain_scope",
"message": "This API key may only send from acme.io.",
"detail": { "domain": "billing.acme.io" }
}
}A request body that fails validation is a 400 in the framework's own shape: a top-level message array, one sentence per failed field.
{
"statusCode": 400,
"message": [
"to must be a valid email address",
"subject should not be empty"
],
"error": "Bad Request"
}| Status | Meaning |
|---|---|
| 400 | Validation failed, or a named refusal such as a missing merge tag. |
| 401 | No credential, an invalid or revoked key, or an expired session. |
| 403 | The credential is valid but may not do this (role, key permission, domain scope, unverified domain). |
| 404 | Not found, including anything that belongs to another workspace. Nothing on this API answers 403 for another tenant's object. |
| 409 | A state conflict: a template that is not published, a resend already in flight, a reused Idempotency-Key with a different body. |
| 429 | Rate limited. Honour Retry-After. |
| 5xx | Our fault. Safe to retry with the same Idempotency-Key. |
The error code reference lists every code by route.
Idempotency
Every non-GET request accepts an Idempotency-Key header: 1 to 255 printable ASCII characters (a UUID works well). Retrying with the same key and the same body returns the original response with Idempotency-Replayed: true, so a timed-out send never becomes two emails.
- Keys are remembered for 24 hours, scoped to the workspace, the route and the credential.
- Same key, different body:
409 idempotency_key_reused. Same key while the first request is still running:409 idempotency_key_in_flightwithRetry-After: 1. Wait and retry with the same key; do not mint a new one. - An empty or malformed key is
400 idempotency_key_invalidrather than silently ignored. - Only successful (2xx) responses are stored; a failed request can be retried under the same key.
- Multipart uploads (
POST /v1/contacts/import) cannot be fingerprinted and answerIdempotency-Status: skipped-unparseable-body.
Rate limits
| Limit | Default | Applies to |
|---|---|---|
| Per key | 10 requests/second, bursts to 50 | Each API key, independently. |
| Per workspace | 100 requests/second | Every key and every signed-in user of the workspace together. |
Over the limit a request answers 429 with a Retry-After header in whole seconds and the precise delay in milliseconds in detail.retryAfterMs. There are no X-RateLimit-* headers on successful responses. GET /v1/rate-limits returns the workspace's current numbers, which the API Keys screen also shows.
HTTP/1.1 429 Too Many Requests
Retry-After: 1
{
"error": {
"code": "rate_limited",
"message": "This API key is limited to 10 requests/second (burst 50). Retry in 1 second.",
"detail": {
"limit": "per_key",
"limitPerSecond": 10,
"burst": 50,
"retryAfterMs": 340,
"workspaceLimitPerSecond": 100
}
}
}Batch sends count as one request however many items they carry. Use the batch endpoint for volume.
Pagination
Two shapes, chosen per list:
- Page and size:
?page=1&pageSize=50answering{ items, total, page, pageSize }. Used byGET /v1/emails(max 100) andGET /v1/contacts(max 200). - Cursor:
?limit=50&cursor=…answering{ data, page: { cursor, hasMore } }. Passpage.cursorback to continue; a tampered cursor is400 invalid_cursor. Used byGET /v1/suppressionsandGET /v1/webhook-dispatches, and by the mailbox lists (GET /v1/mailboxes/:id/messages,/v1/mailbox/messages), which keep theiritemsand addpage.
Every other list returns a plain array, sometimes with a limit query.
Node.js SDK
@sendclipper/node is the official library for this API. It runs on Node.js 20 or newer, has no runtime dependencies and ships both ESM and CommonJS. The package is on npm and its source is on GitHub.
Install
Use whichever package manager your project already uses:
npm install @sendclipper/node
# or
pnpm add @sendclipper/node
# or
yarn add @sendclipper/node
# or
bun add @sendclipper/nodeAt the root of a pnpm or Yarn 1 monorepo a plain add is refused: use pnpm add -w / yarn add -W, or install it into the package that sends mail (pnpm --filter <package> add).
Create an API key under Settings › API keys, then make a client:
import { SendClipper } from '@sendclipper/node';
const sc = new SendClipper('sc_live_xxxxxxxxxxxxxxxx');
// or: new SendClipper() reads SENDCLIPPER_API_KEYSend an email
const { data, error } = await sc.emails.send({
from: 'hello@send.acme.io',
to: 'ada@lumen.io',
subject: 'Your receipt',
html: '<p>Thanks for your order.</p>',
text: 'Thanks for your order.',
});
if (error) {
console.error(error.name, error.message); // e.g. domain_not_verified
} else {
console.log(`Email ${data.id} accepted`);
}from must be a bare address on a domain you verified. Each message has one recipient in to; for several, use batch.send. To send a published template, pass its id or send name with its variables:
await sc.emails.send({
from: 'hello@send.acme.io',
to: 'ada@lumen.io',
templateId: 'tpl_9f2b7c10ad42', // or template: 'welcome'
variables: { first_name: 'Ada' },
});Errors and retries
A call never throws for an API refusal or a network failure. It resolves to { data, error, headers }, and exactly one of data and error is set. error.name is the API's own code (see Error codes) and error.statusCode is null when no answer arrived.
Network errors, 429 and 5xx answers are retried twice with backoff, honouring Retry-After. Every JSON write carries an Idempotency-Key, so a retried send never goes out twice. Pass your own idempotencyKey to make your own retries safe as well. maxRetries and timeoutMs can be set on the client or per call.
Verify webhooks
Verify each delivery against the raw body, before you parse it:
import express from 'express';
import { verifyWebhook, WebhookVerificationError } from '@sendclipper/node';
app.post('/hooks/sendclipper', express.raw({ type: 'application/json' }), (req, res) => {
try {
const event = verifyWebhook({
payload: req.body, // a Buffer, not parsed JSON
headers: req.headers,
secret: process.env.SENDCLIPPER_WEBHOOK_SECRET,
});
console.log(event.event, event.data.to);
res.sendStatus(200);
} catch (err) {
if (err instanceof WebhookVerificationError) return res.status(400).send(err.reason);
throw err;
}
});During a secret rotation either signature is accepted, and a delivery signed more than five minutes away from now is refused (how signing works).
Sandboxes
A sandbox traps mail while you develop, so nothing is delivered. Send to it with its own token, then read the message back in a test:
const { data: box } = await sc.sandboxes.create({ name: 'my-app-dev' });
const { data: token } = await sc.sandboxes.resetCredentials(box.id);
await sc.sandboxes.send(token.apiToken, {
from: 'app@example.com', to: 'test@example.com', subject: 'Hi', html: '<p>Hi</p>',
});
// In a test: wait for the message to arrive
const { data: msg } = await sc.sandboxes.messages.waitFor(box.id, {
match: (m) => m.subject === 'Hi',
});What it covers
| Resource | Methods |
|---|---|
emails | send, get, list, iterate, stats |
batch | send |
domains | list, create, records, verify, enableReceiving, disableReceiving, setRegion, deletionPreview, remove |
templates | list, get, html, create, update, remove, duplicate, publish, unpublish, preview, setTags, projects |
sandboxes | list, get, create, update, remove, credentials, resetCredentials, send |
sandboxes.messages | list, get, raw, remove, clear, markAllRead, waitFor |
webhooks | list, create, update, remove, rotateSecret, deliveries, verify |
webhooks.dispatches | list, iterate, get, replay, replayAll |
contacts | list, iterate, create, import, importPreview, export |
suppressions | list, iterate, create, remove, export |
mailboxes | list, get, create, update, archive |
emails.send and batch.send. The README lists every resource, including templates' tags and assets, audiences, automations and React email.Python SDK
sendclipper is the official Python library for this API. It runs on Python 3.9 or newer, has no runtime dependencies and is fully typed. The package is on PyPI and its source is on GitHub.
Install
Use whichever tool your project already uses:
pip install sendclipper
# or
uv add sendclipper
# or
poetry add sendclipperIn a uv workspace whose root has no [project] table, name the member: uv add --package <member> sendclipper.
Create an API key under Settings › API keys, then make a client:
from sendclipper import SendClipper
sc = SendClipper("sc_live_xxxxxxxxxxxxxxxx")
# or: SendClipper() reads SENDCLIPPER_API_KEYSend an email
data, error = sc.emails.send({
"from": "hello@send.acme.io",
"to": "ada@lumen.io",
"subject": "Your receipt",
"html": "<p>Thanks for your order.</p>",
"text": "Thanks for your order.",
})
if error:
print(error.name, error.message) # e.g. domain_not_verified
else:
print(f"Email {data['id']} accepted")Parameters and responses are plain dicts keyed by the API's own field names (templateId, sendClass), so everything on this page applies as written. from must be a bare address on a domain you verified, with one recipient in to; for several, use batch.send. To send a published template, pass its id or send name with its variables:
sc.emails.send({
"from": "hello@send.acme.io",
"to": "ada@lumen.io",
"templateId": "tpl_9f2b7c10ad42", # or "template": "welcome"
"variables": {"first_name": "Ada"},
})Errors and retries
A call never raises for an API refusal or a network failure. It returns a result with data, error and headers that unpacks to data, error, and exactly one of the two is set. error.name is the API's own code (see Error codes) and error.status_code is None when no answer arrived. .unwrap() returns data or raises SendClipperApiError.
Network errors, 429 and 5xx answers are retried twice with backoff, honouring Retry-After. Every JSON write carries an Idempotency-Key, so a retried send never goes out twice. Pass your own idempotency_key= to make your own retries safe as well. max_retries and timeout (seconds) can be set on the client or per call.
Verify webhooks
Verify each delivery against the raw body, before you parse it. The same call works in Django (request.body) and FastAPI (await request.body()):
import os
from flask import Flask, request
from sendclipper import verify_webhook, WebhookVerificationError
app = Flask(__name__)
@app.post("/hooks/sendclipper")
def sendclipper_hook():
try:
event = verify_webhook(
request.get_data(), # raw bytes, not request.json
request.headers,
os.environ["SENDCLIPPER_WEBHOOK_SECRET"],
)
except WebhookVerificationError as err:
return err.reason, 400
print(event["event"], event["data"]["to"])
return "", 200During a secret rotation either signature is accepted, and a delivery signed more than five minutes away from now is refused (how signing works).
Sandboxes
A sandbox traps mail while you develop, so nothing is delivered. Send to it with its own token, then read the message back in a test:
box = sc.sandboxes.create({"name": "my-app-dev"}).unwrap()
token = sc.sandboxes.reset_credentials(box["id"]).unwrap()
sc.sandboxes.send(token["apiToken"], {
"from": "app@example.com", "to": "test@example.com", "subject": "Hi", "html": "<p>Hi</p>",
})
# In a test: wait for the message to arrive
msg, error = sc.sandboxes.messages.wait_for(box["id"], match=lambda m: m["subject"] == "Hi")What it covers
| Resource | Methods |
|---|---|
emails | send, get, list, iterate, stats |
batch | send |
domains | list, create, records, verify, enable_receiving, disable_receiving, set_region, deletion_preview, remove |
templates | list, get, html, create, update, remove, duplicate, publish, unpublish, preview, set_tags, projects |
sandboxes | list, get, create, update, remove, credentials, reset_credentials, send |
sandboxes.messages | list, get, raw, remove, clear, mark_all_read, wait_for |
webhooks | list, create, update, remove, rotate_secret, deliveries, verify |
webhooks.dispatches | list, iterate, get, replay, replay_all |
contacts | list, iterate, create, import_, import_preview, export |
suppressions | list, iterate, create, remove, export |
mailboxes | list, get, create, update, archive |
emails.send and batch.send. contacts.import_ has a trailing underscore because import is a Python keyword. The README lists every resource, including templates' tags and assets, audiences and automations.PHP SDK
sendclipper/sendclipper-php is the official PHP library for this API. It runs on PHP 8.1 or newer and needs only the curl and json extensions. The package is on Packagist and its source is on GitHub.
Install
composer require sendclipper/sendclipper-phpCreate an API key under Settings › API keys, then make a client:
use SendClipper\SendClipper;
$sc = new SendClipper('sc_live_xxxxxxxxxxxxxxxx');
// or: new SendClipper() reads SENDCLIPPER_API_KEYSend an email
[$data, $error] = $sc->emails->send([
'from' => 'hello@send.acme.io',
'to' => 'ada@lumen.io',
'subject' => 'Your receipt',
'html' => '<p>Thanks for your order.</p>',
'text' => 'Thanks for your order.',
]);
if ($error) {
echo $error->name, ': ', $error->message; // e.g. domain_not_verified
} else {
echo "Email {$data['id']} accepted";
}Parameters and responses are plain arrays keyed by the API's own field names (templateId, sendClass), so everything on this page applies as written. from must be a bare address on a domain you verified, with one recipient in to; for several, use batch->send. To send a published template, pass its id or send name with its variables:
$sc->emails->send([
'from' => 'hello@send.acme.io',
'to' => 'ada@lumen.io',
'templateId' => 'tpl_9f2b7c10ad42', // or 'template' => 'welcome'
'variables' => ['first_name' => 'Ada'],
]);Errors and retries
A call never throws for an API refusal or a network failure. It returns a Result with data, error and headers that destructures to [$data, $error], and exactly one of the two is set. $error->name is the API's own code (see Error codes) and $error->statusCode is null when no answer arrived. ->unwrap() returns the data or throws an ApiException.
Network errors, 429 and 5xx answers are retried twice with backoff, honouring Retry-After. Every JSON write carries an Idempotency-Key, so a retried send never goes out twice. Pass ['idempotencyKey' => ...] as the last argument to make your own retries safe as well; maxRetries and timeout (seconds) can be set on the client or per call.
Verify webhooks
Verify each delivery against the raw body, before you decode it. In Laravel or Symfony pass $request->getContent() and $request->headers; a PSR-7 request works too:
use SendClipper\Exception\WebhookVerificationException;
use SendClipper\Webhook;
try {
$event = Webhook::verify(
file_get_contents('php://input'), // the raw body, not json_decode()d
getallheaders(),
(string) getenv('SENDCLIPPER_WEBHOOK_SECRET'),
);
} catch (WebhookVerificationException $e) {
http_response_code(400);
exit($e->reason);
}
error_log($event['event'] . ' ' . $event['data']['to']);
http_response_code(200);During a secret rotation either signature is accepted, and a delivery signed more than five minutes away from now is refused (how signing works).
Sandboxes
A sandbox traps mail while you develop, so nothing is delivered. Send to it with its own token, then read the message back in a test:
$box = $sc->sandboxes->create(['name' => 'my-app-dev'])->unwrap();
$token = $sc->sandboxes->resetCredentials($box['id'])->unwrap();
$sc->sandboxes->send($token['apiToken'], [
'from' => 'app@example.com', 'to' => 'test@example.com', 'subject' => 'Hi', 'html' => '<p>Hi</p>',
]);
// In a test: wait for the message to arrive
[$msg, $error] = $sc->sandboxes->messages->waitFor($box['id'], fn (array $m) => $m['subject'] === 'Hi');What it covers
| Resource | Methods |
|---|---|
emails | send, get, list, iterate, stats |
batch | send |
domains | list, create, records, verify, enableReceiving, disableReceiving, setRegion, deletionPreview, remove |
templates | list, get, html, create, update, remove, duplicate, publish, unpublish, preview, setTags, projects |
sandboxes | list, get, create, update, remove, credentials, resetCredentials, send |
sandboxes->messages | list, get, raw, remove, clear, markAllRead, waitFor |
webhooks | list, create, update, remove, rotateSecret, deliveries, verify |
webhooks->dispatches | list, iterate, get, replay, replayAll |
contacts | list, iterate, create, import, importPreview, export |
suppressions | list, iterate, create, remove, export |
mailboxes | list, get, create, update, archive |
emails->send and batch->send. The README lists every resource, including templates' tags and assets, audiences and automations.Go SDK
github.com/sendclipper/sendclipper-go is the official Go library for this API. It needs Go 1.23 or newer and nothing outside the standard library. Its reference is on pkg.go.dev and its source is on GitHub.
Install
go get github.com/sendclipper/sendclipper-goAt a go.work root, run it inside the module that sends mail (the directory with its own go.mod).
Create an API key under Settings › API keys, then make a client. One client is safe to share across goroutines:
import "github.com/sendclipper/sendclipper-go"
client := sendclipper.NewClient("sc_live_xxxxxxxxxxxxxxxx")
// or: sendclipper.NewClient("") reads SENDCLIPPER_API_KEYSend an email
email, err := client.Emails.Send(ctx, &sendclipper.SendEmailParams{
From: "hello@send.acme.io",
To: "ada@lumen.io",
Subject: "Your receipt",
HTML: "<p>Thanks for your order.</p>",
Text: "Thanks for your order.",
})
if err != nil {
var apiErr *sendclipper.Error
if errors.As(err, &apiErr) {
log.Println(apiErr.Name, apiErr.Message) // e.g. domain_not_verified
}
return err
}
fmt.Println("Email", email.ID, "accepted")Every method takes a context.Context and typed params. From must be a bare address on a domain you verified, with one recipient in To; for several, use Batch.Send. To send a published template, pass its id or send name with its Variables:
client.Emails.Send(ctx, &sendclipper.SendEmailParams{
From: "hello@send.acme.io",
To: "ada@lumen.io",
TemplateID: "tpl_9f2b7c10ad42", // or Template: "welcome"
Variables: map[string]any{"first_name": "Ada"},
})Errors and retries
Every failure is a *sendclipper.Error. Name is the API's own code (see Error codes) and StatusCode is 0 when no answer arrived; a network_error wraps the transport error, so errors.Is(err, context.DeadlineExceeded) works. Lists that span pages have an All method you can range over.
Network errors, 429 and 5xx answers are retried twice with backoff, honouring Retry-After. Every JSON write carries an Idempotency-Key, so a retried send never goes out twice. Pass sendclipper.WithIdempotencyKey(key) to make your own retries safe as well; the context bounds the whole call, retries included.
Verify webhooks
Verify each delivery against the raw body, before you decode it:
http.HandleFunc("/hooks/sendclipper", func(w http.ResponseWriter, r *http.Request) {
payload, _ := io.ReadAll(r.Body) // the raw body, before any json.Decode
event, err := sendclipper.VerifyWebhook(payload, r.Header, os.Getenv("SENDCLIPPER_WEBHOOK_SECRET"))
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
log.Println(event.Event, event.Data.To)
})During a secret rotation either signature is accepted, and a delivery signed more than five minutes away from now is refused (how signing works).
Sandboxes
A sandbox traps mail while you develop, so nothing is delivered. Send to it with its own token, then read the message back in a test:
box, _ := client.Sandboxes.Create(ctx, &sendclipper.SandboxParams{Name: "my-app-dev"})
token, _ := client.Sandboxes.ResetCredentials(ctx, box.ID)
client.Sandboxes.Send(ctx, token.APIToken, &sendclipper.SendEmailParams{
From: "app@example.com", To: "test@example.com", Subject: "Hi", HTML: "<p>Hi</p>",
})
// In a test: wait for the message to arrive (bound it with the context)
wctx, cancel := context.WithTimeout(ctx, 30*time.Second)
defer cancel()
msg, err := client.Sandboxes.Messages.WaitFor(wctx, box.ID, &sendclipper.WaitForOptions{
Match: func(m sendclipper.SandboxMessageSummary) bool { return m.Subject == "Hi" },
})What it covers
| Service | Methods |
|---|---|
Emails | Send, Get, List, All, Stats |
Batch | Send |
Domains | List, Create, Records, Verify, EnableReceiving, DisableReceiving, SetRegion, DeletionPreview, Remove |
Templates | List, Get, HTML, Create, Update, Remove, Duplicate, Publish, Unpublish, Preview, SetTags, Projects |
Sandboxes | List, Get, Create, Update, Remove, Credentials, ResetCredentials, Send |
Sandboxes.Messages | List, Get, Raw, Remove, Clear, MarkAllRead, WaitFor |
Webhooks | List, Create, Update, Remove, RotateSecret, Deliveries, Verify |
Webhooks.Dispatches | List, All, Get, Replay, ReplayAll |
Contacts | List, All, Create, Import, ImportPreview, Export |
Suppressions | List, All, Create, Remove, Export |
Mailboxes | List, Get, Create, Update, Archive |
Emails.Send and Batch.Send. The README and pkg.go.dev list every service, including templates' tags and assets, audiences and automations.Ruby SDK
sendclipper is the official Ruby library for this API. It runs on Ruby 3.1 or newer and has no runtime dependencies. The gem is on RubyGems and its source is on GitHub.
Install
gem install sendclipper
# or, in a Gemfile
bundle add sendclipperCreate an API key under Settings › API keys, then make a client:
require "sendclipper"
client = SendClipper::Client.new("sc_live_xxxxxxxxxxxxxxxx")
# or: SendClipper::Client.new reads SENDCLIPPER_API_KEYSend an email
data, error = client.emails.send(
from: "hello@send.acme.io",
to: "ada@lumen.io",
subject: "Your receipt",
html: "<p>Thanks for your order.</p>",
text: "Thanks for your order."
)
if error
puts "#{error.name}: #{error.message}" # e.g. domain_not_verified
else
puts "Email #{data["id"]} accepted"
endFields are keyword arguments. snake_case names such as template_id: become the API's templateId; values such as variables are sent as given, and responses are Hashes with the API's keys. from must be a bare address on a domain you verified, with one recipient in to; for several, use batch.send. To send a published template:
client.emails.send(
from: "hello@send.acme.io",
to: "ada@lumen.io",
template_id: "tpl_9f2b7c10ad42", # or template: "welcome"
variables: { first_name: "Ada" }
)Errors and retries
A call never raises for an API refusal or a network failure. It returns a SendClipper::Result with data, error and headers that destructures to data, error and works in case … in; exactly one of the two is set. error.name is the API's own code (see Error codes) and error.status_code is nil when no answer arrived. .unwrap returns the data or raises SendClipper::ApiError.
Network errors, 429 and 5xx answers are retried twice with backoff, honouring Retry-After. Every JSON write carries an Idempotency-Key, so a retried send never goes out twice. Pass idempotency_key: to make your own retries safe as well; max_retries: and timeout: (seconds) can be set on the client or per call.
Verify webhooks
Verify each delivery against the raw body, before you parse it. In Rack or Sinatra pass request.body.read and request.env:
class SendClipperWebhooksController < ActionController::API
def create
event = SendClipper.verify_webhook(
request.raw_post, # the raw body, not params
request.headers,
ENV.fetch("SENDCLIPPER_WEBHOOK_SECRET")
)
Rails.logger.info("#{event["event"]} #{event["data"]["to"]}")
head :ok
rescue SendClipper::WebhookVerificationError => e
render plain: e.reason, status: :bad_request
end
endDuring a secret rotation either signature is accepted, and a delivery signed more than five minutes away from now is refused (how signing works).
Sandboxes
A sandbox traps mail while you develop, so nothing is delivered. Send to it with its own token, then read the message back in a test:
box = client.sandboxes.create(name: "my-app-dev").unwrap
token = client.sandboxes.reset_credentials(box["id"]).unwrap
client.sandboxes.send(token["apiToken"],
from: "app@example.com", to: "test@example.com", subject: "Hi", html: "<p>Hi</p>")
# In a test: wait for the message to arrive
msg, error = client.sandboxes.messages.wait_for(box["id"]) { |m| m["subject"] == "Hi" }What it covers
| Resource | Methods |
|---|---|
emails | send, get, list, each, stats |
batch | send |
domains | list, create, records, verify, enable_receiving, disable_receiving, set_region, deletion_preview, remove |
templates | list, get, html, create, update, remove, duplicate, publish, unpublish, preview, set_tags, projects |
sandboxes | list, get, create, update, remove, credentials, reset_credentials, send |
sandboxes.messages | list, get, raw, remove, clear, mark_all_read, wait_for |
webhooks | list, create, update, remove, rotate_secret, deliveries, verify |
webhooks.dispatches | list, each, get, replay, replay_all |
contacts | list, each, create, import, import_preview, export |
suppressions | list, each, create, remove, export |
mailboxes | list, get, create, update, archive |
emails.send and batch.send. The README lists every resource, including templates' tags and assets, audiences and automations.Rust SDK
sendclipper is the official Rust library for this API. It is async, on tokio and reqwest, with TLS through rustls by default, and needs Rust 1.85 or newer. The crate is on crates.io, its reference on docs.rs and its source on GitHub.
Install
cargo add sendclipper
cargo add tokio --features macros,rt-multi-threadIn a workspace with several crates, add --package <crate> to both commands.
Create an API key under Settings › API keys, then make a client. It is cheap to clone and safe to share across tasks:
let client = sendclipper::Client::new("sc_live_xxxxxxxxxxxxxxxx");
// or: sendclipper::Client::from_env() reads SENDCLIPPER_API_KEYSend an email
use sendclipper::{Client, SendEmailParams};
#[tokio::main]
async fn main() -> Result<(), sendclipper::Error> {
let client = Client::from_env();
let email = client
.emails()
.send(&SendEmailParams {
from: "hello@send.acme.io".into(),
to: "ada@lumen.io".into(),
subject: Some("Your receipt".into()),
html: Some("<p>Thanks for your order.</p>".into()),
..Default::default()
})
.await?;
println!("Email {} accepted", email.id);
Ok(())
}Params and responses are typed structs. from must be a bare address on a domain you verified, with one recipient in to; for several, use batch().send(). To send a published template, pass its id or send name with its variables:
let mut variables = sendclipper::Object::new();
variables.insert("first_name".into(), "Ada".into());
client
.emails()
.send(&SendEmailParams {
from: "hello@send.acme.io".into(),
to: "ada@lumen.io".into(),
template_id: Some("tpl_9f2b7c10ad42".into()), // or template: Some("welcome".into())
variables: Some(variables),
..Default::default()
})
.await?;Errors and retries
Every method returns Result<T, sendclipper::Error>. name is the API's own code (see Error codes) and status_code is None when no answer arrived. Lists that span pages have a list_all method that returns a Stream.
Network errors, 429 and 5xx answers are retried twice with backoff, honouring Retry-After. Every JSON write carries an Idempotency-Key, so a retried send never goes out twice. Call client.with_idempotency_key(key) to make your own retries safe as well; with_timeout and with_max_retries work the same way.
Verify webhooks
Verify each delivery against the raw body, before you parse it. The headers can be an http::HeaderMap (axum, actix-web, hyper):
use axum::{body::Bytes, http::{HeaderMap, StatusCode}};
async fn sendclipper_hook(headers: HeaderMap, body: Bytes) -> StatusCode {
let secret = std::env::var("SENDCLIPPER_WEBHOOK_SECRET").unwrap_or_default();
match sendclipper::verify_webhook(&body, &headers, &secret, Default::default()) {
Ok(event) => {
println!("{} {}", event.event, event.data["to"]);
StatusCode::OK
}
Err(e) => {
eprintln!("refused: {}", e.reason);
StatusCode::BAD_REQUEST
}
}
}During a secret rotation either signature is accepted, and a delivery signed more than five minutes away from now is refused (how signing works).
Sandboxes
A sandbox traps mail while you develop, so nothing is delivered. Send to it with its own token, then read the message back in a test:
let sandbox = client
.sandboxes()
.create(&sendclipper::SandboxParams { name: Some("my-app-dev".into()), ..Default::default() })
.await?;
let token = client.sandboxes().reset_credentials(&sandbox.id).await?;
client.sandboxes().send(&token.api_token, ¶ms).await?;
// In a test: wait for the message to arrive
let msg = client
.sandboxes()
.messages()
.wait_for(&sandbox.id, |m| m.subject == "Hi", Duration::from_secs(30), Duration::from_secs(1))
.await?;What it covers
| Resource | Methods |
|---|---|
emails() | send, get, list, list_all, stats |
batch() | send |
domains() | list, create, records, verify, enable_receiving, disable_receiving, set_region, deletion_preview, remove |
templates() | list, get, html, create, update, remove, duplicate, publish, unpublish, preview, set_tags, projects |
sandboxes() | list, get, create, update, remove, credentials, reset_credentials, send |
sandboxes().messages() | list, get, raw, remove, clear, mark_all_read, wait_for, wait_for_next |
webhooks() | list, create, update, remove, rotate_secret, deliveries, verify |
webhooks().dispatches() | list, list_all, get, replay, replay_all |
contacts() | list, list_all, create, import, import_preview, export |
suppressions() | list, list_all, create, remove, export |
mailboxes() | list, get, create, update, archive |
Java SDK
com.sendclipper:sendclipper-java is the official Java library for this API. It needs Java 11 or newer, sends through the JDK's own java.net.http client and depends on Jackson only. It is on Maven Central, its reference on javadoc.io and its source on GitHub.
Install
Maven, in your pom.xml:
<dependency>
<groupId>com.sendclipper</groupId>
<artifactId>sendclipper-java</artifactId>
<version>0.1.0</version>
</dependency>Gradle, in build.gradle.kts (the same line works in a Groovy build.gradle):
dependencies {
implementation("com.sendclipper:sendclipper-java:0.1.0")
}In a multi-module build, add it to the module that sends mail. Create an API key under Settings › API keys, then make a client. It is thread-safe: make one and share it (a static field, or a Spring bean):
SendClipper client = new SendClipper("sc_live_xxxxxxxxxxxxxxxx");
// or: new SendClipper() reads SENDCLIPPER_API_KEYSend an email
import com.sendclipper.SendClipper;
import com.sendclipper.SendClipperException;
import com.sendclipper.model.SendEmailParams;
import com.sendclipper.model.SentEmail;
try {
SentEmail email = client.emails().send(SendEmailParams.builder()
.from("hello@send.acme.io")
.to("ada@lumen.io")
.subject("Your receipt")
.html("<p>Thanks for your order.</p>")
.build());
System.out.println("Email " + email.getId() + " accepted");
} catch (SendClipperException e) {
System.err.println(e.getName() + ": " + e.getMessage()); // e.g. domain_not_verified
}Params are built with builders and responses are typed models with getters. from must be a bare address on a domain you verified, with one recipient in to; for several, use batch().send(). To send a published template, pass its id or send name with its variables:
client.emails().send(SendEmailParams.builder()
.from("hello@send.acme.io")
.to("ada@lumen.io")
.templateId("tpl_9f2b7c10ad42") // or .template("welcome")
.variable("first_name", "Ada")
.build());Errors and retries
Every method returns the decoded answer or throws a SendClipperException, which is unchecked. getName() is the API's own code (see Error codes), getStatusCode() is 0 when no answer arrived and getDetail() holds code-specific facts. Lists that span pages have an all() method that returns a lazy PageIterable: loop over it, or call stream().
Network errors, 429 and 5xx answers are retried twice with backoff, honouring Retry-After. Every JSON write carries an Idempotency-Key, so a retried send never goes out twice. To make your own retries safe as well, pass a key that names the operation:
client.emails().send(params, RequestOptions.builder()
.idempotencyKey("order-" + order.getId() + "-receipt")
.build());Verify webhooks
Verify each delivery against the raw body, before you parse it. The headers can be any Map of names to values, such as Spring's HttpHeaders or the JDK server's Headers. A servlet that holds only the header's value can call Webhook.verifySignature:
// Spring
@PostMapping("/hooks/sendclipper")
ResponseEntity<Void> hook(@RequestBody byte[] body, @RequestHeader HttpHeaders headers) {
try {
WebhookEvent event = Webhook.verify(body, headers, System.getenv("SENDCLIPPER_WEBHOOK_SECRET"));
log.info("{} {}", event.getEventName(), event.getData().getTo());
return ResponseEntity.ok().build();
} catch (WebhookVerificationException e) {
return ResponseEntity.badRequest().build();
}
}During a secret rotation either signature is accepted, and a delivery signed more than five minutes away from now is refused (how signing works).
Sandboxes
A sandbox traps mail while you develop, so nothing is delivered. Send to it with its own token, then read the message back in a test:
Sandbox box = client.sandboxes().create(SandboxParams.builder().name("my-app-dev").build());
ResetSandboxCredentials token = client.sandboxes().resetCredentials(box.getId());
client.sandboxes().send(token.getApiToken(), params);
// In a test: wait for the message to arrive
SandboxMessage msg = client.sandboxes().messages().waitFor(box.getId(), WaitForOptions.builder()
.match(m -> m.getSubject().equals("Hi"))
.timeout(Duration.ofSeconds(30))
.build());What it covers
| Resource | Methods |
|---|---|
emails() | send, sendBatch, get, list, all, stats |
batch() | send |
domains() | list, create, records, verify, enableReceiving, disableReceiving, setRegion, deletionPreview, remove |
templates() | list, get, html, create, update, remove, duplicate, publish, unpublish, preview, setTags, projects |
sandboxes() | list, get, create, update, remove, credentials, resetCredentials, send |
sandboxes().messages() | list, get, raw, remove, clear, markAllRead, waitFor |
webhooks() | list, create, update, remove, rotateSecret, deliveries, verify |
webhooks().dispatches() | list, all, get, replay, replayAll |
contacts() | list, all, create, importContacts, importPreview, export |
suppressions() | list, all, create, remove, export |
mailboxes() | list, get, create, update, archive |
MCP server
The SendClipper MCP server lets any Model Context Protocol client (Claude Code, Claude Desktop, Cursor, VS Code, Windsurf) set up and run SendClipper for a project: add and verify a domain, design templates and set their merge tags, trap development mail in a sandbox, generate the sending code for your stack, send, and wire webhooks. It is a thin client over this API: every rule, permission and refusal stays in the API, and the server relays its error codes with a hint about what to do next.
You need an API key: create one under Settings › API keys with Full access, workspace-wide. A key limited to one domain is refused on the management tools (which routes take a key); a Sending only or Read only key works for the tools its permission allows. For an agent that should only read and answer one address, create a key for one inbox with Full access: account_whoami then names that address, only the mailbox and inbox tools work, on that address alone, and every other tool is refused with a sentence saying what to use instead.
Connect in one line
SendClipper hosts the server at https://sendclipper.com/mcp, so there is nothing to install. In Claude Code:
claude mcp add --transport http sendclipper https://sendclipper.com/mcp \
--header "Authorization: Bearer sc_live_…"Cursor, Windsurf and other clients that connect to a URL take the same two values:
{
"mcpServers": {
"sendclipper": {
"url": "https://sendclipper.com/mcp",
"headers": { "Authorization": "Bearer sc_live_…" }
}
}
}Your key travels in the Authorization header of each request and is not stored: the hosted server holds no key of its own and passes yours to the API, which applies its permission and rate limit. It runs on SendClipper's machine, so it cannot read files on yours. Give template_upload_image the picture as base64 rather than a path. Claude Desktop cannot send a header to a remote server yet; use the file below.
Use it
Check the connection with claude mcp list (it should read Connected), or /mcp inside Claude Code. Then ask in plain language from your project, for example:
| You say | What happens |
|---|---|
| “Check my SendClipper setup” | Shows your workspace and the next setup step |
| “Add the domain example.com and give me the DNS records” | Adds the domain and lists the records to publish at your DNS provider |
| “Verify example.com” | Checks the DNS (run it again once your records are published) |
| “Create a welcome email template with first_name and a button to {{app_url}}” | Designs the template |
| “Which params does the welcome template take? Set first_name to default to 'there'” | Lists the merge tags and sets the default |
| “Preview it with first_name Ada, then publish it” | Shows the rendered email, then makes it sendable |
| “Create a sandbox for this project and add its settings to my .env” | Development mail gets caught instead of sent |
| “Send a test of the welcome template into the sandbox and show it to me” | Sends it into the sandbox and reads it back |
| “Write the code to send the welcome email from this Next.js app” | Code for your stack |
| “Install the SendClipper SDK in this project” | Adds the official SDK for your language and a shared client |
| “Install the SendClipper SDK in this Maven project and add a class that sends the welcome email” | Adds com.sendclipper:sendclipper-java to pom.xml and writes the sender with the Java SDK |
| “Create a webhook to https://myapp.com/hooks/email” | Delivery events go to your app |
| “What new mail came in to support@? Summarize the unread ones” | Reads the inbox and sums up each message |
| “Answer Ada's question from support@, then archive it” | Replies from the address it arrived at, then files it away |
Your client asks before each action, and during development the server sends into a sandbox. No real mail leaves unless you ask for a real send. Remove it with claude mcp remove sendclipper.
Or run it yourself
The same server is one dependency-free file (Node.js 20+), served by https://sendclipper.com. Run it on your own computer when your client cannot connect to a URL, or when you want it to read local files:
mkdir -p ~/.sendclipper
curl -fsSL https://sendclipper.com/sendclipper-mcp.cjs -o ~/.sendclipper/sendclipper-mcp.cjsConnect
Claude Code, running the downloaded file:
claude mcp add sendclipper \
-e SENDCLIPPER_API_KEY=sc_live_… \
-- node ~/.sendclipper/sendclipper-mcp.cjsClaude Desktop, Cursor and VS Code read an mcpServers block from their settings file:
{
"mcpServers": {
"sendclipper": {
"command": "node",
"args": ["/Users/you/.sendclipper/sendclipper-mcp.cjs"],
"env": { "SENDCLIPPER_API_KEY": "sc_live_…" }
}
}
}Streamable HTTP
To host it yourself for clients that connect over HTTP, run the server with --http. It binds 127.0.0.1 (which also turns on DNS-rebinding protection) and serves a stateless endpoint at POST http://127.0.0.1:3333/mcp.
node ~/.sendclipper/sendclipper-mcp.cjs --http --port 3333 # binds 127.0.0.1A request's own Authorization: Bearer sc_live_… wins over SENDCLIPPER_API_KEY, so one process can serve several workspaces. --host changes the bind address. The six agent_* Agent Studio tools work over stdio only: over --http anything that reaches the port could call them without a credential, so there they answer like the hosted server and touch nothing.
Configuration
| Variable | Default | Meaning |
|---|---|---|
SENDCLIPPER_API_KEY | None | The sc_live_… workspace key (not needed for the local agent_* Agent Studio tools). |
SENDCLIPPER_API_URL | https://sendclipper.com | API origin, without /v1. |
SENDCLIPPER_APP_URL | derived | Dashboard origin used in links. |
SENDCLIPPER_SANDBOX_TOKEN | None | An sc_sbx_… token; lets sandbox_send_test_email use the sandbox JSON door instead of SMTP. |
SENDCLIPPER_PUBLIC_API_URL | the API URL | API origin shown in generated snippets and .env lines, when the server reaches the API another way. |
SENDCLIPPER_MCP_ALLOWED_HOSTS | None | Host names --http accepts besides loopback (same as --allowed-hosts); required to bind anything but loopback. |
SENDCLIPPER_MCP_HOSTED | off | on when serving other people: no local files, and only each request's own key counts. |
SENDCLIPPER_AGENTS_HOME | ~/.sendclipper-agents | Local Agent Studio directory where the stdio server finds control.json. |
SENDCLIPPER_MCP_AGENT_TOOLS | on | off hides the six Agent Studio tools (Agent Studio sets this on every agent run's own MCP child). |
Tools
97 tools, grouped by area. Destructive ones are annotated so a client asks before running them.
| Area | Tool | What it does |
|---|---|---|
| Account | account_whoami | Which workspace the key belongs to and what it may do. |
account_setup_status | The setup checklist: domain, sandbox, template, key. | |
| Domains | domain_list | List sending domains and their status. |
domain_add | Add a sending domain. | |
domain_get_dns_records | The DNS records to publish. | |
domain_verify | Check a domain now. | |
domain_enable_receiving | Turn receiving on for a domain. | |
domain_disable_receiving | Turn receiving off. | |
domain_set_region | Change a domain's region (before it holds mail). | |
domain_deletion_preview | What deleting a domain would remove. | |
domain_delete | Delete a domain. | |
| Templates | template_list | List templates, optionally by project or tag. |
template_projects_list | List the Email development projects (one per domain). | |
template_get | Read one template with its blocks. | |
template_create | Create a template from blocks. | |
template_update | Change a template's blocks, subject or name. | |
template_get_variables | List a template's merge tags. | |
template_set_variable_defaults | Set merge-tag fallbacks. | |
template_rename_variable | Rename a merge tag everywhere it is used. | |
template_preview | Render with variables: subject, text, unsafe links. | |
template_get_html | Export the rendered HTML. | |
template_publish | Make a template sendable. | |
template_unpublish | Take it back to draft. | |
template_duplicate | Copy a template. | |
template_delete | Delete a template. | |
template_tag_list | List template tags. | |
template_tag_create | Create a tag. | |
template_tag_delete | Delete a tag. | |
template_set_tags | Set the tags on a template. | |
template_list_images | List uploaded template images. | |
template_upload_image | Upload an image for an image block. | |
| Sending | email_send | Send one real email, by html or by template. |
email_send_batch | Send up to a batch of real emails. | |
email_list | List sent emails. | |
email_get | One sent email with its event timeline. | |
| Sandboxes | sandbox_list | List sandboxes. |
sandbox_create | Create a sandbox. | |
sandbox_get | One sandbox with its inbox address and counts. | |
sandbox_rename | Rename (credentials do not move). | |
sandbox_delete | Delete a sandbox and its messages. | |
sandbox_get_credentials | SMTP credentials and the inbox address. | |
sandbox_reset_credentials | Replace the SMTP password and API token. | |
sandbox_list_messages | List trapped messages. | |
sandbox_get_message | Read one trapped message. | |
sandbox_get_raw | The raw MIME source. | |
sandbox_delete_message | Delete one trapped message. | |
sandbox_clear | Delete every message in a sandbox. | |
sandbox_mark_read | Mark messages read. | |
sandbox_send_test_email | Send a test email into a sandbox. | |
sandbox_wait_for_message | Wait until a message arrives. | |
| Webhooks | webhook_event_types | The event types an endpoint can subscribe to. |
webhook_list | List endpoints. | |
webhook_create | Create an endpoint. | |
webhook_update | Change an endpoint's URL, events or state. | |
webhook_delete | Delete an endpoint. | |
webhook_rotate_secret | Rotate the signing secret. | |
webhook_verify_examples | Signature-verification snippets. | |
webhook_list_undelivered | Dead-lettered events. | |
webhook_replay | Replay one dead-lettered event. | |
webhook_replay_all | Replay every dead-lettered event in scope. | |
| Inbox | mailbox_list | List receiving addresses with unread counts. |
mailbox_get | One address: can it receive, can it send, counts, whom a key may write to from it, how much, and whether agent sending is paused. | |
mailbox_list_aliases | The aliases that deliver into an address. | |
inbox_list_messages | List an address's mail by folder, search or label. | |
inbox_search | Search mail across every address. | |
inbox_get_message | Read one message: body, attachments, verdicts. | |
inbox_get_thread | Read a whole conversation, oldest first. | |
inbox_get_attachment | Download one attachment. | |
inbox_wait_for_message | Wait until a message arrives at an address. | |
inbox_wait_for_code | Wait for a verification code or sign-in link and get just that, never one hidden from a human reader. | |
inbox_create_ephemeral | A throwaway address on agents.sendclipper.com for a sign-up, receive-only, deleted with its mail after ttlHours. | |
inbox_delete_ephemeral | End a throwaway agent inbox now, mail and all. | |
sandbox_inject_inbound | Put a made-up message into a test address to see what an agent does with it; the agent's answer is trapped in a sandbox. | |
inbox_reply_context | Who a reply should go to, and the quoted original. | |
inbox_reply | Reply to a message from the address it arrived at, to people already in the conversation, within the address's budget, or hold the reply for a person to approve. | |
inbox_send | Send a new message from one of your addresses, if its agent-sending policy and budget allow it, or hold it for a person to approve. | |
inbox_mark_read | Mark a message read, or unread again. | |
inbox_move | File a message in another folder, or star it. | |
| Audience | audience_list | List audiences. |
contact_list | List contacts. | |
contact_create | Add a contact. | |
contact_import | Import contacts from CSV text. | |
suppression_list | List suppressed addresses. | |
suppression_add | Suppress an address by hand. | |
suppression_remove | Lift a removable suppression. | |
| Integration | integration_snippet | Sending code for the project's stack. |
integration_env | A .env block for a sandbox or the live API. | |
| SDKs | sdk_list | The official SDKs (Node.js, Python, PHP, Go, Ruby, Rust, Java), their versions and install commands. |
sdk_detect | Pick the SDK and package manager from the project's files. | |
sdk_install | Install command, .env lines and a client module for the project. | |
sdk_snippet | SDK code to send, send a template or a batch, verify webhooks, or use a sandbox. | |
| Agent Studio | agent_list | List local Agent Studio agents, their state, access summary, last run and pending approvals. |
agent_create | Create a stopped, unconnected agent in the local Agent Studio for a person to connect, review and start. | |
agent_update | Change an agent's name, instructions, inbox accesses, local rules or summary email; widening changes require a person's review. | |
agent_start | Start a connected, reviewed agent (refused when unconnected, awaiting review, or allowed to send new mail or edit a folder). | |
agent_stop | Stop a running agent in the local Agent Studio. | |
agent_runs | Read an agent's run summaries or one run's scrubbed step lines. |
Resources and prompts
Four resources a client can read for context:
| Resource | Contents |
|---|---|
sendclipper://docs/template-blocks | Every template block type and field, limits, link and colour rules, merge-tag syntax and a worked example. Read before writing blocks. |
sendclipper://docs/sending-templates | Sending a template by id or by name, variables rules and refusal codes. |
sendclipper://templates/{id} | One template as JSON; templates are also listed. |
sendclipper://templates/{id}/html | The rendered HTML export of one template. |
Four prompts start a guided workflow from your client's prompt menu (in Claude Code, /mcp__sendclipper__setup_project):
| Prompt | What it walks through |
|---|---|
setup_project | Connect a codebase: domain, DNS, a development sandbox, a first template and the sending code. |
design_template | Design, preview and optionally publish a template from a short brief. |
test_in_sandbox | Point the app at a sandbox, trigger a flow and inspect what it sent. |
debug_delivery | Find why a message did not arrive: status, events, suppressions, domain health. |
Safety
- Management tools need a Full access key; the server adds no permissions of its own, so a narrower key gets the API's
403 insufficient_rolerelayed. - The server never sends real mail unless you ask.
email_send,email_send_batch,inbox_replyandinbox_sendare marked open-world, and the built-in instructions steer assistants tosandbox_send_test_emailwhile developing. - The inbox tools say what SendClipper found in a received message's links and PDF attachments, in plain words:
inbox_get_messagenames a link that shows one site and opens another and a PDF whose page is one big link,inbox_get_threadmarks the message that carries a finding, andinbox_get_attachmentstates a PDF's link check in the text that comes with the file, or says its links were not checked. These are facts for the assistant to weigh, never a verdict, and a message with no note is not thereby harmless. - Reading mail changes nothing:
inbox_get_messagenever marks a message read. Onlyinbox_mark_readandinbox_movedo, and like the two mailbox sends they need a Full access key. Neither send has afromfield — the sender is the address you name, or one of its own aliases, so a key cannot send as an address it was not given. - An address decides whom a key may write to from it. By default (
reply_only)inbox_replymay address only people already in the conversation, and a brand-newinbox_sendis refused. The refusal,403 agent_recipient_not_allowed, names the addresses it would not send to and nothing is sent.mailbox_listandmailbox_getshow each address's policy. No tool changes it, because a key cannot: a person does, from the address's editor in the dashboard. See Who an agent may write to. - An address also budgets a key, and the refusals tell a model what to do. Over the hourly budget,
429 agent_budget_exceededcarriesretryAfterSeconds: wait, then retry once. Over a daily budget the same429pauses the address, and every send after it is409 agent_paused: stop, do not retry, and ask a person to resume it in the dashboard. Too many recipients on one message is400 agent_too_many_recipients. Nothing is sent on any of them.mailbox_listandmailbox_getshow the budget and the pause, and who paused it. Both belong to the address, not to the key: another address has its own, and sending the same work from it to get round a pause is what the pause exists to stop. See A budget, and a pause that names it. - A send can wait for a person.
requireApproval: trueoninbox_sendorinbox_reply, or the address'sagentApprovalsetting (shown bymailbox_get), holds the message after every check has passed. The tool then says it was held, not sent, and tells the model not to send it again. An Owner or Admin approves or discards it in the dashboard; no tool can. See Wait for a person to approve. - The key is audited. Every read of a message, attachment or reply context, every send, reply, schedule, hold, move and mark, and every refusal is a line naming the key on the address's Agent activity timeline, which the workspace's people read in the dashboard for 30 days. The server tells the model so when it connects, and
inbox_get_messageandinbox_reply_contextsay their read is recorded. No tool reads the timeline: an API key cannot. See Your agent is audited. - Destructive tools (deletes,
sandbox_clear, credential resets) carry the MCP destructive annotation, so clients confirm first. - Secrets (signing secrets, SMTP passwords, API tokens) are not printed by default; ask for them explicitly (
sandbox_get_credentials,integration_env).
Agent Studio (preview)
Instead of wiring an MCP client or polling loop yourself, Agent Studio packages the local web UI, scheduler and SendClipper MCP server into one dependency-free JavaScript file. Running it starts a loopback-only server on 127.0.0.1, prints a one-time launch URL http://127.0.0.1:<port>/?t=<token>, and opens the Studio in your default browser.
Download and open
The desktop app is the easiest way: the same Studio in its own window, no terminal. It still uses Node 20+ and Claude Code from your computer, and quitting the app stops the Studio and its agents (unless you chose Keep agents running).
| System | Download | Needs |
|---|---|---|
| macOS | Download for Mac (0.1.0, 5.6 MB) | macOS 12 or later · Apple silicon and Intel. The app is not notarised yet: the first time, macOS says it cannot verify it. Open System Settings › Privacy & Security and press Open Anyway. |
| Windows | Download for Windows (0.1.0, 2.4 MB) | Windows 10 or 11 · 64-bit. The installer is not code-signed yet: if SmartScreen stops it, press More info, then Run anyway. |
Or run it from a terminal — one file, on macOS, Linux and Windows:
curl -fsSL https://sendclipper.com/sendclipper-agents.js -o sendclipper-agents.js
node sendclipper-agents.jsWhat you need
You need: Node 20+, Claude Code signed in on your computer (or Codex — see Run on Codex), and a SendClipper workspace with an address for the agent to answer (new connections default Agent approval to Always, and you can lower it to Risky or Off in the dashboard when you are ready).
- On New agent, press Connect SendClipper to sign in to your dashboard, pick an existing address or create a new one inline, keep Hold every reply for my approval ticked (or adjust approval later in the dashboard), and hand a one-inbox Full access key (named
Agent Studio · <name>) straight back to Agent Studio on your computer without copying a key. Paste a key instead stays available for self-hosted or scripted setups with a one-inbox Full access key. - On Start — and on every poll — the Studio reads the address's live settings from SendClipper. With Agent approval set to Always, every outbound send waits in your approval queue (and if a send ever went out unheld while approval was Always, the Studio stops the agent immediately). With Risky or Off, Start still works and sends that go out directly end the run Reply sent; when approval is
offand the send policy isopen, the Studio shows an amber warning linking straight to the dashboard.
What an agent can do in this preview
An agent answers mail that arrives after you press Start (messages already in the Inbox at Start are left alone, and automatic replies carrying Auto-Submitted: auto-replied are skipped without calling the model). By default, Claude Code is invoked with built-in shell/file/web tools turned off and only Read mail and Reply MCP tools permitted on that inbox (you can widen or narrow this per agent in Access):
- Read the arriving message (
inbox_get_messagewithformat: "agent", the read made for a model: what the sender wrote, apart from the quoted history), its conversation (inbox_get_thread), who a reply would go to (inbox_reply_context), and the address's settings (mailbox_get). - Write one reply (
inbox_reply) — or none — which SendClipper holds for you in Inbox › Awaiting approval — never sent unreviewed. Each step streams live in the Studio's Runs list, with a link to the approval queue.
What an agent may touch
Each agent's Access tab lets you choose which MCP and local tools are offered on the next run (new agents start with Read mail and Reply; any unlisted tool call is refused and recorded on the run):
| Access | Default | What it allows |
|---|---|---|
| Read mail | Always on | Read the arriving message and its conversation (inbox_get_message, inbox_get_thread, inbox_reply_context, mailbox_get). |
| Read attachments | Off | Open files attached to the message (inbox_get_attachment). |
| Reply | On | Answer the person who wrote, in the same conversation (inbox_reply, held for approval). |
| Send new | Off | Write a new message from the agent's address to anyone SendClipper's agentSendPolicy allows (inbox_send, held for approval). |
| Move and mark | Off | Mark messages read or unread and move them between folders (inbox_mark_read, inbox_move). |
| A folder on this computer | Off | Read (and optionally edit) a per-run detached git worktree copy of a local git repository's HEAD, and run named command prefixes there. Protected paths (.env*, *.pem, *.p8, *.key, id_rsa*, .git/, infra/, migrations/) stay denied and any changes to them in the copy are thrown away after the run. New files the agent creates with its edit tool are thrown away too; files an allowed command produces (a build's output, say) are kept unless they are protected — and with no command allowed, every new file is thrown away. |
~/.sendclipper-agents/. Only allow folders and commands you trust.Allowed commands are prefixes made of letters, digits, spaces and . _ - / @ + =. Studio refuses sudo, rm, curl, wget, ssh, scp; any git command except the read-only ones (git status, diff, log, show, ls-files, ls-tree, rev-parse, rev-list, describe, shortlog, cat-file, show-ref, merge-base, name-rev, count-objects); and shells, interpreters and commands that run other commands (bash, sh, node, tsx, ts-node, bun, deno, python, npx, pnpm dlx, npm exec, go run, bundle exec, xargs, find, env, …). A command is judged by its program's name, so ./node_modules/.bin/tsx is tsx and node22 is node. A command saved before one of these rules existed is never used in a run, and the Access tab marks it. pnpm test, npm run <script> and make are allowed — and they run whatever your package.json or Makefile says.
The rules it acts by
Local rules are convenience and SendClipper's rules are the control. Each agent's Rules tab separates the two into labelled blocks so you can see at a glance what holds on the server versus what saves runs on your machine:
- Enforced by SendClipper (read-only in the Studio, changed only by a person in the dashboard — an API key cannot alter its own policy): who the agent may write to (
reply_only,allowlist, oropen), its effective send budgets (hourly, daily, recipients per message, new people per day), address or workspace pause state, and Approval (always,risky, oroff). - Enforced by this computer (evaluated inside Agent Studio before
claudeis ever spawned; the model is never told its rules and has no tool to read or change them): six switches that decide whether each arriving message should act, ignore, or wait.
| Local rule | Default | Verdict when matched |
|---|---|---|
| Only these senders | Off | Ignore unless the lower-cased From address (with +tag stripped and display name ignored) matches a listed address or bare domain (subdomains and wildcards are not matched). Pair with DMARC pass so spoofed headers are rejected. |
| Only mail that passed DMARC | Off | Ignore unless authentication.dmarc === "PASS". |
| Skip high manipulation risk | On | Ignore mail SendClipper scored as high manipulation risk, so it never wakes the agent. |
| One run per conversation every <n> hours | Off | Ignore a new message in a conversation the agent already answered within the last <n> hours. |
| Working hours | Off | Wait when mail arrives outside the chosen days and from–to window (overnight ranges supported) in this computer's time zone, running once the window opens. |
| At most <n> runs a day | Off | Wait after <n> model runs in a rolling 24-hour window until the oldest run ages out. |
Ignore rules always run before wait rules: a message turned away by an ignore rule starts no claude process, appears in Runs as Ignored — <reason>, and is never answered later. A message held by working hours or the daily run cap appears as Waiting — <reason> (until …), survives stopping and restarting the agent, and is re-checked against every rule when its time comes (expiring after 7 days as Ignored — waited more than 7 days). Waiting mail that is no longer in the Inbox when its time comes — moved to Spam, Trash or the archive, or snoozed — is ignored as Ignored — moved out of the Inbox. Saving rules re-checks every waiting message at once: one the new rules no longer hold runs on the next poll, and one they turn away is ignored then. The conversation cooldown counts any run that woke the agent, whether or not it replied. Pressing Test rules evaluates the rules currently in the editor — saved or not — against the last 20 messages in the Inbox (Would act, Would ignore — …, Would wait — …) without waking the agent or writing a run; reading those 20 messages shows on the agent's activity timeline in the dashboard.
How it reports back
Each agent's Communications tab controls what the Studio reports after a run finishes (built and sent by Agent Studio itself, never by the model — ignored and waiting rows are not runs and send nothing) and whether outbound mail waits for you locally first:
| After each run | Default | What Agent Studio sends |
|---|---|---|
| Nothing | On | No per-run summary is emailed or posted (runs still appear in the Studio). |
| Email a summary to <address> | Off | Sends a plain-text summary from the agent's own address after every run it was woken for, threaded into one daily conversation (<agent name> — runs on <YYYY-MM-DD>): trigger sender and subject, outcome sentence, tool names used, Not allowed for this agent lines, changed file names (no diff), and a local-only link to http://127.0.0.1:<port>/#run/<runId> (never the trigger body, never the model's reply text, never a key). The summary address cannot be the agent's own address: a summary would land in the Inbox it watches and wake it again. |
| Post to a webhook <https URL> | Off | POSTs an agent.run JSON summary signed with a per-agent secret (whsec_…, shown once with Copy and Regenerate). http:// is refused except to localhost, 127.0.0.1, or ::1. |
- When a run fails: whenever a run ends
Failed — …or the agent stops itself, Agent Studio always emails<agent name> — a run failedto your summary address if one is set — even when After each run is Nothing or Post to a webhook. Failure emails are throttled to at most one per agent every 10 minutes, and suppressed ones are counted in the next email (and N more failures since…); a run whose email was held back says so. Two stops send no email at all: when SendClipper no longer accepts the agent's key, or its address is archived, the email would go out with that same key or address and could never arrive. For those two, the Stopped banner on the agent in Agent Studio is the signal. - Reports between agents: automatic mail (
Auto-Submitted) from an address another agent in the same Agent Studio uses never wakes an agent — it is shown asIgnored — a report from an agent in this Studio— so two agents cannot mail each other's summaries back and forth. - Budgets, send policy, and Auto-Submitted: summary and failure emails go through the address's own send routes (
POST /v1/mailboxes/:id/messagesand…/messages/:messageId/reply) with the agent's key. They must be allowed by the address'sagentSendPolicy(add your summary address to the allowlist when usingreply_onlyorallowlist), count toward the address's agent send budget, appear on its activity timeline, and carryAuto-Submittedheaders (auto-generated/auto-replied). - Webhook delivery and signature: requests carry
Content-Type: application/json,X-SendClipper-Agent-Timestamp: <seconds>, andX-SendClipper-Agent-Signature: v1=<hex HMAC-SHA256(secret, "<timestamp>.<body>")>(10 s timeout, one retry after 30 s on a network error or5xx, never retried on4xx, redirects not followed).
{
"type": "agent.run",
"agent": { "id": "agt_01f8a9c2b4e1", "name": "Support", "address": "support@acme.io" },
"run": {
"id": "run_1794819600_aabbccdd",
"startedAt": "2026-11-16T09:00:00.000Z",
"finishedAt": "2026-11-16T09:00:04.120Z",
"outcome": "Reply held for approval",
"kind": "held",
"code": null,
"trigger": { "messageId": "9f2c...", "from": "Ada <ada@example.com>", "subject": "Billing question" },
"tools": ["inbox_get_message", "inbox_reply_context", "inbox_reply"],
"refused": [],
"changedFiles": []
}
}import { createHmac, timingSafeEqual } from "node:crypto";
export function verifyAgentWebhook(rawBody, headers, secret) {
const ts = headers["x-sendclipper-agent-timestamp"] ?? "";
const sig = headers["x-sendclipper-agent-signature"] ?? "";
if (!/^\d+$/.test(ts) || Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false;
const expected = `v1=${createHmac("sha256", secret).update(`${ts}.${rawBody}`).digest("hex")}`;
const a = Buffer.from(expected);
const b = Buffer.from(sig);
return a.length === b.length && timingSafeEqual(a, b);
}Ask me first vs the dashboard's hold: turning on Ask me first removes inbox_reply and inbox_send from the run's allowed tools and replaces them with local Studio proposal tools (propose_reply, propose_send). A run that wants to write ends Waiting for you and lists the full proposed message in Agent Studio's Approvals view (waiting up to 7 days before expiring as Expired — nobody approved it). Nothing reaches SendClipper until you press Approve locally (Reject ends the run Rejected by you and sends nothing). If an Approve cannot reach SendClipper, the message may still have gone out: the card then says SendClipper may already have sent this — check Sent in the dashboard, and the next Approve needs you to confirm it is not in Sent. When you press Approve, Agent Studio sends that exact proposal with the agent's key — so SendClipper's own dashboard hold still applies after you approve: if the address's Agent approval is always or risky, the approved send then waits in the dashboard's Awaiting approval queue for a workspace Owner or Admin.
Reading a run
Every message an agent acts on, ignores, or parks appears on its Runs tab so you can answer what happened and why, step by step, on your own computer.
- Outcome filter and local search: filter runs by All, Sent, Held for approval, Waiting for you, No reply, Ignored by a rule, Waiting on a rule, Refused, or Failed (with counts next to each choice), and filter by sender or subject locally with no server call. Your active filter lives in the URL hash (
#agent/<id>/runs?outcome=…&q=…) so reloading keeps it. Rows skipped or parked by a local rule name the rule with its Rules tab label (for exampleIgnored by Only these senders — …orWaiting on Working hours until …), and opening a run (including via#run/<runId>) shows, in order: the trigger message and conversation link, the rule decision, the access summary, every model step and tool call/result (collapsed past 20 lines behind Show all) plus refused tools, folder changes, the outcome with live or final duration, report delivery lines, and any Ask me first proposal and decision. - Run again and its rules: pressing Run again on a run's detail wakes the agent on that trigger message now and creates a new run row marked
Run again of <time>linking back — the original run is never changed. Your local rules apply as for a new arrival except the already-seen check and the 7-day wait limit (One run per conversation, Runs a day and Working hours still apply, and if a rule skips it the new row records that skip). If the message was already answered — the run ended Reply sent, Reply held for approval, or Waiting for you, or another run of the same message did — Agent Studio asks you to confirm first because running again may send a second reply. The button is disabled while the agent is stopped, while a run is in progress (One run at a time — wait for the current run), or while the message is still waiting on a rule (This message is waiting on a rule — running it again could not make it run sooner). Opening a run never reads the message from SendClipper, so whether it is still in the address's Inbox is checked only when you press Run again; if it has gone, nothing runs and the run shows The message is no longer in the Inbox. Run again never bypasses SendClipper: server-enforced send policy, budgets, pauses, and approval holds still judge every send. - Download JSON (export): Download JSON saves
sendclipper-run-<runId>.jsonfor bug reports or audits. It includes the run summary, every recorded line, the proposal record if any, the agent'sid,name, andaddress, and the Agent Studio version — passed through the secret scrubber again (sc_live_…,sc_test_…,whsec_…). Never in the export: the API key, the webhook signing secret, or the full instructions text beyond what the run file already holds. - See what the key did in SendClipper: opens the dashboard's Agent activity screen (
/inbox/agent-activity) filtered to the agent's address and the run's local calendar day, in a new browser tab, so you can compare the local run trace with SendClipper's own record of what keys did on that address. SendClipper keeps that record for 30 days, so for an older run there is nothing left to show. - Retention: Keep runs for in Agent Studio's Settings defaults to 30 days (configurable from
8to365days, noted on the Runs tab as Runs are kept for N days on this computer). Runs whose finish time — or start time, for a run that never finished — is older than that setting are deleted from disk (both the.ndjsonrun file and its.proposals.jsonfile) when Agent Studio starts and every hour. A run still Waiting for you or referenced by a waiting message is never deleted,state/andsecrets/are untouched, and deleted runs stay in the seen-message set so old mail never wakes the agent again. Deleting a run never shortens One run per conversation: Agent Studio keeps the time each conversation was last answered instate/for up to 365 days (the longest cooldown), so a 60-day cooldown still holds after a 30-day-old run is gone.
Templates
Pressing New agent offers Start blank (the default Read mail + Reply setup) and From a template. Picking a template asks only the questions that template needs, then runs the normal Connect SendClipper / Paste a key instead step (if you cancel before connecting, nothing is written to disk). Once connected, the agent opens on its Overview with Made from the <template> template — change anything. and every tab already filled in and editable afterwards:
| Template | Questions asked | What it fills |
|---|---|---|
| Error fixer | Repo folder, Where the code lives (GitHub / GitLab), Reviewer's address | Access: Read mail, Move and mark, folder access with May edit files ON (no commands by default — add your test runner if needed), Reply OFF, Send new OFF, and Open a draft merge request ON. Rules: Only these senders ON (notifications@sendclipper.com, editable), Only mail that passed DMARC ON, Skip high manipulation risk ON, At most 5 runs a day, One run per conversation every 168 hours (7 days). Communications: Email a summary (and failures) to the reviewer; Ask me first OFF. |
| Support triage | Who gets the summaries | Access: Read mail, Read attachments, Reply ON, Move and mark ON, Send new OFF. Rules: Skip high manipulation risk ON, At most 50 runs a day. Communications: Email a summary to that address and Ask me first ON so every drafted reply waits for approval; instructions sort into folders and never promise refunds or delivery dates. |
| Verification-code reader | Script folder, Command to run with the code | Access: Read mail, read-only folder access with only that command prefix allowed (validated by the same command rules as the Access tab, e.g. ./save-code.sh or npm run save-code), Reply / Send new / Move and mark OFF. The command runs in the throwaway copy of the repository's last commit, so the script must be committed, and files it writes inside the copy are not kept. Rules: Skip high manipulation risk ON, One run per conversation OFF so back-to-back codes from the same sender are not skipped. Instructions read inbox_get_message with format: "extract", take only a visible: true code candidate, pass it as the single argument to your command, never send it anywhere else, and end with Code handed to the script without repeating the code. |
| Forwarding summariser | Send summaries to | Access: Read mail, Read attachments, Send new ON, Reply OFF, Move and mark OFF. Rules: Skip high manipulation risk ON. Instructions summarise forwarded mail and send only to that recipient; if the inbox's agentSendPolicy would refuse that address, both the setup step and the Access tab show the allowlist warning with a Change in the dashboard link. |
- Opening a draft merge request: when folder access has May edit files ON, the Access tab offers After a run that changed files: Keep the changes here (default for blank agents) or Open a draft merge request (GitHub or GitLab, remote defaulting to
origin, optional base branch defaulting to the repo's current branch at run time). After a run ends Changes ready without failure, Agent Studio itself — never the model — inspects the worktree's changed paths, refuses to publish if any file touchesinfra/,.env*,deployment.env,**/migrations/**,.git/,.gitlab-ci*,.github/workflows/, or key/certificate files (Not published — <path> may not be changed by an agent) and never publishes a symbolic link or a submodule, commits in the detached copy asSendClipper Agent <address>with<agent name>: <first line of explanation>— with your repository's git hooks turned off and without signing, so nothing in the copy runs and your key never signs an agent's work — pushesHEAD:refs/heads/agent/<shortId>-<yyyymmddHHMM>to the remote (which must be a remote your repository already has, such asorigin;ghandglabopen the draft in the repository they treat as the default, so keep the remote onorigin, which every template uses), runsgh pr create --draft …orglab mr create --draft …, recordsBranch pushed: …andDraft merge request opened: <link>on the run, and addsDraft merge request: <link>to the summary email. - What Studio never does — and the CLI requirement: the model's
--disallowedToolsare unchanged (it still cannot commit or push), Studio never pushes to the base branch, never uses--force, never merges a pull or merge request, and never touches your own checkout. Opening the draft requiresgh(for GitHub) orglab(for GitLab) installed and signed in on your computer (or pointed to viaSENDCLIPPER_AGENTS_GH_BIN/SENDCLIPPER_AGENTS_GLAB_BIN); if the CLI is missing, theagent/…branch is still pushed and the run recordsDraft not opened — <gh|glab> is not installed; branch <b> was pushed. - Verification codes in local run files: Agent Studio's secret scrubber removes
sc_live_…,sc_test_…, andwhsec_…tokens — it does not recognise arbitrary verification codes. While Verification-code reader instructs the model not to repeat the code in its final text, theinbox_get_messageextract tool result recorded in the local.ndjsonrun file on your computer still contains the extracted candidate (and the command line that passed it on) until run retention deletes that run. If the model ever tried a command the agent is not allowed, itsNot allowed for this agent: …line — which a summary email lists — would show that command with its arguments. All of it is in Download JSON if you export that run. - Moving from tools/sendclipper-guard: if you run
tools/sendclipper-guardon your Mac, you can move to the Error fixer template —allowedSendersmaps to Only these senders,fingerprintCooldownDaysto One run per conversation,maxRunsPerDayto At most <n> runs a day,notifyToto Reviewer's address, andremote/baseBranchto Open a draft merge request (seetools/sendclipper-guard/README.md).
Run on Codex
Claude Code is the default Engine. If you pay for ChatGPT rather than Claude, you can run an agent on the Codex CLI instead: pick Codex in the agent's Engine field on the Overview. The picker lists only the engines found on this computer; a missing one reads Codex — not found on this computer with its install line, and a new agent starts on Claude Code when it is found, else on Codex.
- Install and sign in. Run
npm i -g @openai/codex@0.167, thencodex loginand sign in with your ChatGPT account (an OpenAI API key works too). Agent Studio uses your own OpenAI or ChatGPT account through that CLI: nothing is billed through SendClipper, and runs count against your own plan. - It is for mail-only agents, and why. A Codex agent can have every mail access (Read mail, Read attachments, Reply, Send new, Move and mark, and Ask me first) but not A folder on this computer or commands. Claude Code's deny rules keep an agent out of
.envfiles, keys andmigrations/; Codex's sandbox cannot. So an agent that has a folder cannot be switched to Codex, the Access tab refuses to give a Codex agent one, and an MCPagent_updatethat tries either is refused with the same sentence: Codex can't keep an agent out of .env files and keys in a folder — use Claude Code for agents with folder access. - The same tool limits. The model is offered exactly the SendClipper tools the agent's accesses allow, on both engines: the tools are not merely refused, they are not offered, because Studio's MCP server registers only that list and Codex is told the same list. Codex is given no shell, no file reader or editor, no web search, no browser, connectors or plugins, and a read-only sandbox: the patch tool it keeps is rejected ("writing is blocked by read-only sandbox"), and the JavaScript tool it keeps has no files and no network. Only the MCP child talks to SendClipper. Codex 0.167.2 cannot switch off its own sub-agent tools from the command line (a real attempt to use one failed), and Codex describes a sub-agent as having the same tools as the agent that started it.
- Your own Codex setup stays out. Every run gets an empty Codex home with nothing in it but a link to your login, so your
~/.codexconfig, MCP servers, hooks, rules, skills andAGENTS.mdare never loaded, and no session files are written. The agent's key reaches the MCP child by environment only, never on a command line. - Only Codex 0.167.x runs agents. The flags that keep a run mail-only were measured on Codex 0.167, and a newer Codex can add a tool they do not switch off. Agent Studio reads
codex --versiononce when it starts; any other version is refused everywhere (the Engine picker, Start, MCP and a restart) with a sentence naming the version it found and the tested 0.167.x, and no run starts. - A run that steps outside fails. If a Codex run ever uses a shell or exec command, or a web search, the run ends Failed — Codex used a tool it must not have; if Codex reports a tool result SendClipper does not recognise, it ends Failed — Codex reported a result SendClipper does not recognise. Neither is ever counted as a reply sent, and the agent keeps running.
- Runs show their engine. Each run is labelled Claude Code or Codex; the Runs tab can filter by engine, and an exported run carries
engine. Token counts appear only when Codex reports them; none are estimated. - If Codex goes missing, the agent stops itself with "Codex was not found on this computer — install it or switch the engine to Claude Code" and is not run. Changing an agent's engine through MCP marks it Needs review (shown as Engine in the banner). Templates still create Claude Code agents.
From Claude Code
When the local SendClipper MCP server runs on the same computer as Agent Studio, Claude Code discovers the running Studio on its own through ~/.sendclipper-agents/control.json (no SENDCLIPPER_API_KEY required) and manages agents with six tools — while keeping every key, folder warning, and first start in a person's hands. The hosted MCP at https://sendclipper.com/mcp — and a local server started with --http, which anything that reaches its port could call without a credential — registers the same six tools so clients see them, touches nothing, and answers Agent Studio is local — use the local MCP (`npx …` / the stdio bundle) on the computer where the Studio runs.
| Tool | What Claude Code can do |
|---|---|
agent_list | List every agent's id, name, address (or not connected), state (Running, Stopped, Stopped by itself — …, or Needs review), access summary, last run outcome and time, and pending approvals count. |
agent_create | Create an agent Stopped and not connected, marked Created by Claude Code — review and start (with the Overview connect step pre-filled when address was supplied), and return its http://127.0.0.1:<port>/#/agents/<id> link plus A person must connect it and press Start in Agent Studio. Refused (409 too_many_awaiting_review) while 10 agents already wait to be connected and reviewed — review or delete some in Agent Studio first. |
agent_update | Update name, instructions, inbox accesses, local rules, or communications through the same validators as the Studio tabs. |
agent_start | Start a connected, reviewed agent. Refused (409) when the agent is not connected, Needs review, grants Send new, or grants folder access with May edit files. |
agent_stop | Stop any local agent immediately. |
agent_runs | Read up to 50 run summaries (filtered by the same outcome groups as the Runs tab) or one run's scrubbed step lines (runId) — never a key, webhook secret, control token, or proposal approve capability. |
- The review banner and one-click Start: creating an agent from Claude Code shows
Created by Claude Code — review and starton the agent list and on Overview. Any MCP change toinstructions,accesses,communications, or a rule change that widens what wakes the agent marks it Needs review again and — if it was running — stops it immediately asChanged by Claude Code — review and start, and the banner names what changed by tab — for exampleChanged by Claude Code: Instructions, Communications — review and start. Further changes before a person presses Start add to that list. Pure rule tightenings (and renaming) do not re-arm review, so a running agent keeps running with the stricter rule. Pressing Start in Agent Studio clears Needs review and starts the agent in one click. - What MCP cannot do — and why: Claude Code can never set, paste, or read an API key or connect an inbox (keys only ever come from Overview / New agent in your browser); never grant folder access, allowed commands, or draft merge request publishing (accepting the local code-execution warning on Access is a person's act); never set a webhook URL or read a webhook secret (Communications); never approve or reject an Ask me first proposal (Approvals); never change run retention (Settings); and never delete an agent (Overview). Each refusal names the Studio tab where a person makes that choice.
- Never offered inside an agent's own run: Agent Studio starts every run's MCP child with
SENDCLIPPER_MCP_AGENT_TOOLS=off, omitsagent_*from--allowedTools, and protectscontrol.jsonalongsidesecrets/, so an email-answering agent cannot inspect, create, edit, or start agents on your computer.
Keep agents running
Agents you left running come back. Agent Studio remembers what each agent was last set to do. When it starts again — after you closed the terminal, after a reboot, in the foreground or in the background — every agent whose last action was Start starts again, through the same checks as pressing Start. An agent that cannot pass them stays Stopped with the reason Could not start again after a restart: …; an agent you stopped, that stopped itself (budget, key revoked …) or that Claude Code changed and now Needs review stays stopped. If SendClipper cannot be reached yet (no network right after you log in), the agent shows Stopped with that reason and tries again every 30 seconds for ten minutes, and again at the next start; press Keep stopped to say no. A restart is not a new approval: it never clears Needs review. Starting again re-reads the Inbox like any Start, so mail that arrived while Agent Studio was off is not answered.
Run in background. In Settings › Background, Run in background moves Agent Studio into a background service of your operating system (macOS and Linux), so mail to the agent's address is answered with no terminal and no browser tab open. Leave Start when I log in ticked and it starts every time you log in; untick it and it runs until you log out or restart. Your open tab follows to the background Studio without a new sign-in, the agents that were running keep running, and the card then reads Running in background since … with Stop running in background. Running node sendclipper-agents.js while it runs there opens the one in the background (with --no-open it prints a one-time link). If the background process crashes or is force-killed (kill -9), the service starts it again within a minute, throttled by the service manager, and the card says Restarted after a crash at …. A plain kill, logging out and Stop running in background are clean stops and are not restarted.
| System | What Run in background installs |
|---|---|
| macOS | A LaunchAgent, ~/Library/LaunchAgents/com.sendclipper.agents.plist, run by launchd: it starts at log-in when Start when I log in is ticked and is restarted after a crash (never after a clean stop), at most every 30 seconds. |
| Linux | A systemd user unit, ~/.config/systemd/user/sendclipper-agents.service (Restart=on-failure), enabled only when Start when I log in is ticked and started right away. Without loginctl enable-linger $USER it starts when you log in, not at boot. After 10 crashes in 5 minutes systemd stops restarting it. |
| Windows | Running in the background is not available on Windows yet. The card says so, and nothing is installed. If an earlier build installed the Task Scheduler task SendClipper Agents, node sendclipper-agents.js --remove-background still removes it. |
- What it runs is a copy. The service runs
~/.sendclipper-agents/bin/sendclipper-agents.js, a copy of the file you pressed the button in, with the full path of thenodethat ran it — so moving or deleting your download changes nothing. When you open a newersendclipper-agents.js, the card offers Update the background copy, which copies it and restarts the service; open the Studio again afterwards withnode sendclipper-agents.js. - Where its log is.
~/.sendclipper-agents/logs/studio.log(mode0600; past 5 MB the old log is kept asstudio.log.1). The background Studio prints no launch URL and the service definition holds no key, token or secret — only paths (including yourPATH, soclaudeand the commands an agent runs are found), the API and app origins, andSENDCLIPPER_AGENTS_HOME. - Remove it by hand (the same removal Stop running in background does, and what
node sendclipper-agents.js --remove-backgrounddoes on every system):
macOS:launchctl bootout gui/$(id -u)/com.sendclipper.agentsthen delete the.plist. Linux:systemctl --user disable --now sendclipper-agents.servicethen delete the unit file. Windows:schtasks /End /TN "SendClipper Agents"thenschtasks /Delete /TN "SendClipper Agents" /F. - A custom
SENDCLIPPER_AGENTS_HOMEgets its own service name with a short hash of that folder appended, so a test folder never replaces your real one.
Wake the moment mail arrives
An agent connected through Connect SendClipper holds a key for one inbox, and with that key the Studio keeps one realtime connection per running agent to /v1/realtime. When mail lands in the address, SendClipper says "look again" and the reply run starts within about a second — it does not wait for a check. The agent's Overview and its row in the agents list say which it is:
- Wakes the moment mail arrives — the connection is ready. The Studio still checks every 5 minutes as a backstop (set
SENDCLIPPER_AGENTS_BACKSTOP_MS, never below 5 seconds), and every time the connection comes back it checks at once, so mail that arrived while it was down is not missed. - Checking every 20 s — instant wake is reconnecting — the connection is down or not ready yet. The agent keeps working: it checks every 20 seconds (the interval shown is the real one) while the Studio reconnects, waiting longer between tries, up to a minute.
- Checking every 20 s — instant wake needs a key for one inbox — the agent's key is a domain or workspace key, which does not open the connection. Press Stop and connect a key for one inbox: the Studio stops the agent and opens Connect SendClipper, which hands back a key for one inbox. Press Start again afterwards.
- Checking every 20 s — this SendClipper does not offer instant wake — an older SendClipper refused the connection. The agent checks every 20 seconds and asks again after 30 minutes.
Nothing else changes: the same rules, cooldowns, approval and run list apply however the agent was woken, and the connection carries no mail — only the signal to look again. The key travels in the connection's first message, never in the URL, and is never written to a log. Stopping an agent closes its connection. If you revoke its key in the dashboard or archive its address, the connection ends within a minute and the agent stops with the same reason a check would have given. A Studio running in the background wakes the same way, and ~/.sendclipper-agents/logs/studio.log records each connect, ready, close and reconnect.
Where keys and runs live
Your API key, webhook signing secret, agent instructions and run logs stay on your computer under ~/.sendclipper-agents/ (secret files mode 0600, directories 0700). Raw keys and webhook secrets are never stored in agent or run files, never placed on a command line, and scrubbed from run logs, summaries, webhook bodies and browser events; deleting an agent locally removes its local files and webhook secret while leaving its key in API Keys until you revoke Agent Studio · <name> there. Closing the terminal stops every running agent, and launching node sendclipper-agents.js again restores your agents and past runs — and starts again every agent you had left running (see Keep agents running).
| Flag | Purpose |
|---|---|
--api <origin> | SendClipper API origin (default https://sendclipper.com; remembered in ~/.sendclipper-agents/studio.json). Must be https://, or http:// only to localhost, 127.0.0.1 or [::1] — the Studio refuses to start otherwise, because your key would travel unencrypted. |
--app <origin> | Dashboard URL used for settings and approval-queue links (defaults to the API origin, or http://localhost:3000 when --api is http://localhost:4000). |
--port <n> | Local port on 127.0.0.1 (default 4242, or the next free port). |
--no-open | Print the launch URL without opening a browser window. |
--remove-background | Remove the background service Settings › Background installed (macOS, Linux and Windows) and exit. Agents keep what they were set to, and start again the next time the Studio runs. |
Send email
Send a message
| Field | Type | Description |
|---|---|---|
fromrequired | string | A plain address on a verified domain of this workspace, e.g. hello@send.acme.io. A verified domain covers its subdomains. Display-name forms such as Acme <hello@…> are refused with 400. |
torequired | string | One recipient address. Send a batch for more. |
subject | string | Required with html; optional with templateId (the template's own subject is the default, a non-empty value overrides it). Up to 998 characters, no line breaks. |
html | string | The HTML body. Required unless templateId is set; sending both is 400. |
text | string | Plain-text alternative, up to 100 000 characters. Generated from the template blocks when omitted on a template send. |
templateId | string | A published template, by tpl_… public id or row id. See Sending a template. |
template | string | A published template, by its send name ("registration"), looked up in the Email development project of the from domain. Never with templateId. See Sending a template by name. |
variables | object | Merge-tag values for the template, or for the {{tags}} in your own html, subject and text when you send no template. A flat object, ≤ 100 keys, string/number/boolean values ≤ 10 000 characters each. Omit it and your html is sent exactly as written. |
sendClass | "transactional" | "marketing" | Defaults to transactional (receipts, resets, alerts; delivered even to an address that unsubscribed from a newsletter). marketing is refused with 403 for an unsubscribed address and carries a per-recipient one-click unsubscribe link: List-Unsubscribe headers on the wire, and {{unsubscribe_url}} filled in on a template send when you do not supply it. See Unsubscribe. A marketing message also carries your workspace's postal address in its footer (appended when the body does not already show it) and is refused with 400 postal_address_missing while none is on file. See Postal address. |
trackOpens | boolean | Defaults to true. false leaves the open-tracking pixel out of this message, so it never records an opened event. |
trackClicks | boolean | Defaults to true. false sends every link exactly as written instead of through the click-tracking redirect, so the message never records a clicked event. Turning tracking off on one-to-one mail from a new domain makes it look more like ordinary mail to spam filters. |
replyTo | string | string[] | Where replies go: one bare address or a list of up to 10, sent as the Reply-To header. Omitted, replies go to from. Send again repeats it. |
attachments | object[] | Files sent with the message, each { filename, content, contentType? }: content is the file's bytes as base64, and contentType is guessed from the filename when omitted. At most 20 files, 7 MiB per file and 7 MiB of files per message, counted after decoding; the provider sending this message may set lower limits (provider_* refusals). The request body on this route may be up to 40 MB. Not accepted on a batch item. |
201 answers with the message: id, messageId (the msg_… public id, which is also the local part of the message's Message-ID header), from, to, domain, subject, status (queued), createdAt, sesMessageId (the provider's id, filled once sent) and templateId.
| Refusal | Status | Why |
|---|---|---|
domain_unknown | 403 | from is not on a domain of this workspace. |
domain_not_verified | 403 | The domain exists but its DNS is not confirmed. Publish the records and press Check now. |
domain_failed | 403 | A sending record was found broken on the last check. The message names the record; detail.domain names the from domain. |
domain_not_verified_for_sending_provider | 403 | The domain is verified in SendClipper, but the provider SendClipper currently sends through (Scaleway Transactional Email or Microsoft Azure) is not ready for it yet. Publish the “Sending · Scaleway” or “Sending · Azure” records shown for the domain under Domains, then press Check now. Nothing is stored or queued. |
provider_sender_not_registered | 403 | SendClipper currently sends through Microsoft Azure, and Azure only sends from addresses registered with it for that domain (by default only donotreply@). The message names the address that can send. Nothing is stored or queued. |
api_key_domain_scope | 403 | A domain-scoped key sending from another domain. |
api_key_mailbox_scoped | 403 | The key is limited to one inbox, which cannot use this door: reply or send from that address under /v1/mailboxes/:id instead (see A key for one inbox). Checked before the key's permission. Nothing is stored or queued; the batch door refuses the whole request. |
recipient_suppressed | 403 | The recipient is on the suppression list (hard bounce, complaint, unsubscribe or manual). detail carries the reason. |
sandbox_cap_reached | 403 | A new workspace's daily sending allowance is spent. It resets at midnight UTC. The cap lifts only after a person on our side reviews the workspace: with a verified domain AND a subscription (Settings › Plan & billing), press Request review on the dashboard. Subscribing alone does not lift the cap. The message says where the review stands. |
postal_address_missing | 400 | sendClass is marketing and the workspace has no postal address on file. Add one under Settings › Workspace. A template send is checked before the template is resolved (so before the domain check); a hand-written body is checked right after the domain check. Nothing is stored or queued. Transactional sends are unaffected. Sending a failed marketing message again hits the same check. |
workspace_sending_paused | 409 | This workspace's sending is paused: by an operator, automatically for its bounce or complaint rate, or because its subscription payment failed or the subscription ended. The message names the reason and what to do (for a billing pause, resolve it under Settings › Plan & billing and sending resumes on its own). Nothing is stored or queued. The same 409 comes back from the batch door (for the whole request), from a broadcast's send, test and schedule, and from a mailbox reply. |
attachment_content_invalid | 400 | An attachments[] entry's content is not base64. The message and detail name the file. Nothing is stored or queued. |
attachment_count_exceeded | 400 | More files than one message may carry (20 by default). |
attachment_too_large / attachments_too_large | 413 | One file is over the per-file limit, or the files add up to more than the per-message limit, counted by their decoded size. Nothing is stored. |
template_* | 400 / 404 / 409 | See template sends. |
Delivery status
A message moves forward through one status at a time and never back. Every transition is also a row on the message's event timeline and, for the six deliverable ones, a webhook.
| Status | Meaning |
|---|---|
queued | Accepted and waiting for the send worker. |
sent | Handed to the provider; sesMessageId is set. |
delivered | The receiving server accepted it. |
opened | The tracking pixel loaded. |
clicked | A tracked link was followed. |
bounced | Rejected by the receiving server. A hard bounce suppresses the address. |
complained | Marked as spam by the recipient. The address is suppressed. |
failed | Could not be handed to the provider after retries. Send again once the cause is fixed. |
List and inspect
| Field | Type | Description |
|---|---|---|
search | string | Full-text over recipient, sender, subject, body and message id, most relevant first (subject, then participants, then body). Quotes, or and -word work; the last word also matches as a prefix. Counts up to 1,000 matches. |
status | string | One of the statuses above. Funnel-cumulative: delivered includes opened and clicked. |
domain | string | Exact sending domain, case-insensitive. |
broadcastId | uuid | Only messages sent by this broadcast. |
from / to | ISO 8601 | Created-at window. |
page / pageSize | int | Defaults 1 / 50, pageSize ≤ 100. |
Answers { items, total, totalCapped, page, pageSize }. Each item is the summary shape the send response uses. totalCapped is true when a search stopped counting at 1,000 matches. total then means "at least", and later pages still return the older matches.
{
"id": "0b6c2d4e-…",
"messageId": "msg_9f2b7c10ad",
"from": "hello@send.acme.io",
"to": "ada@lumen.io",
"domain": "send.acme.io",
"subject": "Welcome to Acme",
"status": "clicked",
"sesMessageId": "0100019…",
"createdAt": "2026-09-10T09:41:02.518Z",
"html": "<h1>Hi Ada</h1>…",
"text": "Hi Ada, …",
"bodyExpired": false,
"bodyExpiredAt": null,
"bodyRetentionDays": 30,
"template": { "id": "…", "publicId": "tpl_9f2b7c10ad42", "name": "Welcome" },
"threadId": null,
"sendClass": "transactional",
"oneClickUnsubscribe": false,
"unsubscribeInBody": null,
"footerPostalAddress": null,
"resends": [],
"events": [
{ "id": "…", "type": "accepted", "meta": null, "createdAt": "2026-09-10T09:41:02.518Z" },
{ "id": "…", "type": "sent", "meta": null, "createdAt": "2026-09-10T09:41:03.104Z" },
{ "id": "…", "type": "delivered", "meta": null, "createdAt": "2026-09-10T09:41:05.871Z" },
{ "id": "…", "type": "opened", "meta": null, "createdAt": "2026-09-10T10:02:11.004Z" },
{ "id": "…", "type": "clicked", "meta": { "url": "https://acme.io/start" }, "createdAt": "2026-09-10T10:02:19.550Z" }
]
}Counts per status for the Emails screen's header.
Send again
Creates a new message with the original's body and recipient; the failed one is never changed. Only a failed message qualifies, because repeating a bounced or complained send damages the reputation the suppression list protects. Four 409s: resend_not_failed, resend_body_expired (retention deleted the body), resend_already_in_flight and resend_attachment_missing (a file the original carried is no longer stored or no longer matches what was attached; the message names the file and nothing is sent). The response is the new message with resendOf set, and the original's detail lists it under resends.
Tracking and retention
- Every HTML body is instrumented on the way out: a 1×1 open pixel and rewritten, signed
https?://links. Opens and clicks are recorded against the message that carried them and fan out asemail.opened/email.clicked. - Bodies are kept for 30 days. After that the HTML and text are deleted,
bodyExpiredflips to true andbodyExpiredAtis set. The row, its status and its whole event timeline stay forever. - An
In-Reply-To/Referencespair is set automatically when you reply from a mailbox, so the conversation threads.GET /v1/emails/:idexposes the resultingthreadId.
Your allowance, and what a pause stops
A plan includes a number of emails per billing period (the Pro plan, 250,000). The allowance is not a limit. Passing it refuses nothing and pauses nothing. Every email above it costs the plan's overage rate ($2.00 per additional 1,000), counted when the period closes and billed on the invoice for the following period. The live figure, the period's dates and the overage so far are on Settings › Plan & billing and on GET /v1/billing/usage.
You hear about it twice per period, by email to the workspace Owner, and each notice is sent once:
| Notice | When | What it says |
|---|---|---|
| Approaching the allowance | At 80% of the allowance by default (emails.warnAtPct / emails.warnAt on the usage response, so you never have to hard-code it). | How many you have sent, that sending continues past the allowance, and what every further 1,000 costs. |
| Overage has started | The first email past the allowance. | How far over you are, the cost so far, and that passing the allowance does not restrict sending, and never will. |
A billable email is an outbound message that was accepted: failed messages and our own notices to you are not counted, and received mail never is. Both notices and the usage bar count the same way.
409 workspace_sending_paused: the API, batch, a broadcast's send, test and schedule, an automation step (recorded as failed), a mailbox reply and Send again. A scheduled broadcast that comes due is held and goes out once sending resumes. There is no per-kind degradation: transactional and marketing mail stop together. Inbound mail is untouched: messages to your receiving-verified domains are stored and filed as usual, and webhooks keep delivering. The same rule applies whoever placed the pause (billing, an operator, or your bounce and complaint rates; see Deliverability).Batch sends
Up to 500 messages in one request, each item exactly the body POST /v1/emails takes (html or templateId + variables per item). Items are validated and gated individually: a bad address, an unverified domain, a suppressed recipient, a draft template or a marketing item in a workspace with no postal address (postal_address_missing) fails that item and its siblings still send. The request itself is refused only when the array is empty (400 batch_empty), over the limit (400 batch_too_large, detail.limit), or when an operator has paused the workspace's sending. Then the whole request answers 409 workspace_sending_paused and no item is stored (unless every item already failed its own domain check, in which case you get those per-item errors instead). The body limit on this route is 10 MiB. An item may carry replyTo; an item with attachments fails alone with attachments_not_batchable (send it on its own).
curl -X POST https://sendclipper.com/v1/emails/batch \
-H "Authorization: Bearer sc_live_<your key>" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: batch-2026-09-10-0001" \
-d '{
"emails": [
{ "from": "hello@send.acme.io", "to": "ada@lumen.io",
"templateId": "tpl_9f2b7c10ad42", "variables": { "first_name": "Ada" } },
{ "from": "hello@send.acme.io", "to": "not-an-address",
"subject": "Hi", "html": "<p>Hi</p>" },
{ "from": "hello@send.acme.io", "to": "mira@northwind.io",
"subject": "Your invoice", "html": "<p>Attached below.</p>" }
]
}'HTTP/1.1 200 OK
{
"data": [
{ "index": 0, "status": "accepted", "id": "0b6c…", "messageId": "msg_9f2b7c10ad" },
{ "index": 1, "status": "failed",
"error": { "code": "validation_failed", "message": "to must be a valid email address" } },
{ "index": 2, "status": "accepted", "id": "c41a…", "messageId": "msg_1e0d5a7b33" }
],
"summary": { "submitted": 3, "accepted": 2, "failed": 1 }
}data[i].indexis the position in your array; results come back in order.- A failed item carries the same
error.codethe single endpoint would have answered with, plusvalidation_failedfor a malformed item. - A template named by several items is loaded once per request; a publish between two requests is seen by the second.
- One
Idempotency-Keycovers the whole batch. A batch counts as one request against your rate limit.
Templates
Designer and lifecycle
A template is built from blocks on the Templates screen (heading, text, button, image, divider, spacer, columns, social, footer, table, chart and inline SVG) and rendered to email-safe HTML on every save. An optional AI assistant edits the blocks from a prompt and attached pictures; it runs on your own computer through a small local bridge, never on our servers.
A template is a draft until you publish it, and only a published template can be sent. Editing a published template changes what future sends render; messages already sent keep the HTML they were sent with.
Sending a template
Pass templateId and variables to POST /v1/emails, POST /v1/emails/batch (per item) or the sandbox door instead of html:
curl -X POST https://sendclipper.com/v1/emails \
-H "Authorization: Bearer sc_live_<your key>" \
-H "Content-Type: application/json" \
-d '{
"from": "hello@send.acme.io",
"to": "ada@lumen.io",
"templateId": "tpl_9f2b7c10ad42",
"variables": {
"first_name": "Ada",
"order_id": 48213,
"unsubscribe_url": "https://acme.io/u/abc123"
}
}'htmlandtemplateIdare exclusive; sending both, or neither, is400.subjectis optional: the template's own subject is the default, your non-empty value overrides it, and it is substituted with the same variables.textis generated from the blocks when omitted.- Resolution happens before the send, so link tracking signs the real URLs and every refusal comes back synchronously.
GET /v1/emails/:idrecords which template was sent (template,templatePublicId).- Your own
htmlcan carry tags too: sendvariableswith it (notemplateId) and its{{tags}}, the subject's and yourtext's are filled by the same rules, with the same refusals below. Withoutvariablesthe body goes out exactly as written, braces and all. Tags in a link work in any quotedhref.
Sending a template by name
Every domain is a project under Email development, and each template there has a send name, derived from its name (Registration → registration) and editable in the designer. Your app sends "template": "registration" instead of an id, so the same code works against every environment:
curl -X POST https://sendclipper.com/v1/emails \
-H "Authorization: Bearer sc_live_<your key>" \
-H "Content-Type: application/json" \
-d '{
"from": "noreply@myapp.com",
"to": "ada@example.com",
"template": "registration",
"variables": { "first_name": "Ada", "verify_url": "https://myapp.com/verify/abc" }
}'- The name is looked up in the project of the
fromdomain (the domain itself or its closest parent,mail.myapp.com→myapp.com), then among the workspace-wide templates (those in no project). - Names are lower-case letters, digits,
-and_, matched case-insensitively and unique per project. Two projects may each have their ownregistration. templateandtemplateIdare exclusive. Everything else (variables, the refusals below, the batch door, the sandbox door) works exactly as for an id. An unknown name is404 template_not_foundnaming the domain it looked in.
| Refusal | Status | Why |
|---|---|---|
template_not_found | 404 | Unknown id or name, or a template in another workspace. |
template_not_published | 409 | Still a draft. Publish it first. |
template_variables_missing | 400 | A tag has neither a value nor a fallback; detail.missing lists them. A blank is never sent. |
template_variables_invalid | 400 | A value used as a link target is not https://, http:// or mailto: (detail.unsafeLinks). |
subject_required | 400 | Neither the template nor the request has a subject. |
subject_invalid | 400 | The resolved subject has a line break or exceeds 998 characters. |
HTTP/1.1 400 Bad Request
{
"error": {
"code": "template_variables_missing",
"message": "This template needs a value for: order_id",
"detail": { "missing": ["order_id"] }
}
}Merge tags
Write {{tag}} anywhere in a block's text, a button link or the subject, and {{tag|fallback}} to supply a default. Tag names are [a-zA-Z_][a-zA-Z0-9_]*, optionally dot-separated ({{company.name}}), and case-sensitive.
- Values are HTML-escaped in the body, percent-encoded inside a link, verbatim in the subject and text.
- A tag at the start of a link (
{{cta_url}}or{{app_url}}/login) must be an https://, http:// or mailto: URL; a tag later in the link, like?e={{email}}, is encoded as a query value. {{unsubscribe_url}}is an ordinary variable on a transactional send: every footer block renders it, so pass one. AsendClass: "marketing"send fills it with the one-click link when you don't, and broadcasts mint it per recipient for you.{{postal_address}}is filled from Settings › Workspace whenever the workspace has an address, so a footer block can show it: put the tag in the block's address field. On a transactional send your ownpostal_addressvalue wins; on a marketing send the workspace's address is always the one carried.- A tag with no value and no fallback refuses the send rather than rendering "Hi ,".
- The company merge fields (
{{contact.role}},{{company.name}},{{offer.pitch}}…, listed under Broadcasts) are ordinary variables here: send them by name, dots included —"variables": { "company.name": "Fabbri" }. This door looks nothing up (it does not know which contact a recipient is), so you supply every value; broadcasts and automations fill them for you.
Template routes
?project=<domain id> lists one Email development project's templates.
Every domain as an Email development project, with templateCount and publishedCount.
| Field | Type | Description |
|---|---|---|
name | string | 1 to 120 characters. |
projectDomainId | uuid | The Email development project (a domain of the workspace) it belongs to. With one, the send name is derived from the name when key is omitted. |
key | string | The send name (registration): lower-case letters, digits, -, _; unique per project (409 template_key_taken). Also settable with PATCH, where null clears it. |
subject | string | Default subject, up to 300 characters. May contain merge tags. |
preheader | string | Preview text, up to 300 characters. |
blocks | Block[] | The designer's block list. Unknown block types and javascript: links are refused with 400 invalid_blocks. |
The rendered HTML, unresolved, as text/html.
Takes the create fields plus domainIds: the domains whose mailbox app offers the template (the whole set, replaced; see Templates in the mailbox app). Every template answers domains (id and name) and createdByMailbox (set when it was made in the mailbox app).
A deleted template's id stops resolving; messages already sent are unaffected.
| Field | Type | Description |
|---|---|---|
mimeTyperequired | string | image/png, image/jpeg, image/webp or image/gif. |
base64required | string | The file bytes. |
name | string | Display name, up to 120 characters. |
Uploads a picture for use in image blocks. The response carries a public URL under /v1/template-assets/:publicId that mail clients load without a session; it is immutable and cached for a year.
| Field | Type | Description |
|---|---|---|
siterequired | string | A website: mybenp.ch or https://mybenp.ch/. |
Finds that website's logo — a company of yours on that domain lends its own, otherwise the home page's logo is read — and stores a copy an email can carry: SVG and WebP become PNG (Gmail shows no SVG, Outlook no WebP), and a white logo on a transparent background is drawn dark so it shows on a white email. Answers url (the public address for an image block's src), mimeType, base64, from (company or site) and darkened; 404 site_logo_not_found says why when there is none. The template AI uses it when you ask for a site's logo.
name, first_name, email, unsubscribe_url, broadcast_name, postal_address) plus the company merge fields, filled per recipient. See Broadcasts.Webhooks
A webhook is one HTTP POST per (event × subscribed endpoint), signed with a secret only you and SendClipper hold. Subscribe an endpoint on the Webhooks screen or with the API below, verify the signature on every delivery, answer 2xx quickly and do your work afterwards. Delivery is at-least-once: deduplicate on the event id.
Endpoints
| Field | Type | Description |
|---|---|---|
urlrequired | string | The receiver, https:// only. An http:// URL is refused unless allowInsecureHttp is set. Private and internal destinations are refused outright (see below). |
eventsrequired | string[] | Unique subset of the six event types. An empty array is a valid endpoint that receives nothing. |
allowInsecureHttp | boolean | Acknowledge a plain-HTTP receiver. Stored per endpoint and shown as an insecure chip; ignored when the URL is https://. |
The 201 response is the endpoint plus its signing secret (whsec_ + 32 hex). It is shown once; every later read returns only a masked secretHint such as whsec_9f2b••••••••a17c.
Change url, events, allowInsecureHttp or active. Disabling (active: false) keeps everything: URL, events, secret and history. Queued work is held with its retry clock paused and resumes on re-enable; events that occur while it is disabled are not queued at all.
Serves the two verifier snippets below plus the tolerance, so the product, this page and the test suite state one number.
Recent attempts with status code, latency and the receiver's answer.
Events and payload
| Event | When |
|---|---|
email.delivered | The receiving server accepted the message. |
email.opened | The tracking pixel loaded in a mail client. |
email.clicked | A tracked link in the message was followed. |
email.bounced | The receiving server rejected it (hard or soft), or Amazon SES refused it because the address is on its account suppression list. Which one is on the message's timeline. |
email.complained | The recipient marked it as spam. The address is suppressed automatically. |
email.failed | SendClipper could not hand it to the provider after retries. |
mailbox.message.received | Mail arrived in one of your addresses' Inbox. Carries the message and its conversation; see Received mail. |
{
"id": "evt_9f2b7c10ad42c3d4e5f60718",
"event": "email.delivered",
"createdAt": "2026-09-06T09:41:02.518Z",
"data": {
"emailId": "0b6c2d4e-…",
"messageId": "0100019…",
"to": "user@acme.io",
"domain": "send.acme.io",
"subject": "Your receipt"
}
}idis stable per (email, event): every retry and every replay of the same event carries the same id. Deduplicate on it, plus whatever identifies the endpoint on your side if two endpoints share one handler.data.emailIdis the message id you got back from POST /v1/emails;data.messageIdis the provider's id for the same send.- Headers:
Content-Type: application/json,User-Agent: SendClipper-Webhooks/1.0. Redirects are never followed: a3xxis a failed attempt. - New fields, new event types and new headers may be added without notice. Nothing is removed or retyped inside
/v1, so ignore what you do not recognise.
Received mail
mailbox.message.received wakes a program, for example an AI agent answering support@, when mail arrives, so it does not poll. It is sent once per message filed in the Inbox of an address. Spam is never announced, and neither is mail that no address claimed or that was moved out of the Inbox before it went. Automated mail (receipts, sign-in codes) is announced like any other message.
{
"id": "evt_4c1e0a9b7d2f3e6a8b5c0d1e",
"event": "mailbox.message.received",
"createdAt": "2026-11-09T10:12:44.031Z",
"data": {
"messageId": "5f0c9a1e-…",
"mailbox": { "id": "8d2e…", "address": "support@acme.io" },
"message": {
"id": "5f0c9a1e-…",
"direction": "inbound",
"from": "lea@customer.io",
"fromName": "Lea Brandt",
"to": ["support@acme.io"],
"cc": [],
"subject": "Re: Where is order 4471?",
"occurredAt": "2026-11-09T10:12:41.000Z",
"messageIdHeader": "CAF7x…@mail.gmail.com",
"text": "Any news? It still says processing.",
"newText": null,
"textTruncated": false,
"bodyExpired": false,
"listsTruncated": false,
"attachments": [],
"omittedAttachments": [],
"authentication": { "spf": "PASS", "dkim": "PASS", "dmarc": "PASS",
"spam": "PASS", "summary": "passed", "routingReason": null },
"agentRisk": { "level": "none", "reasons": [] },
"autoSubmitted": null,
"safety": { "level": "none", "total": 0, "truncated": false,
"findings": [], "files": [] }
},
"thread": {
"id": "1a7b…",
"subject": "Re: Where is order 4471?",
"messageCount": 3,
"history": [ /* the two earlier messages, oldest first */ ],
"truncated": false
}
}
}- This is the one webhook that carries your received mail. Subscribing an endpoint to it is the opt-in, and it is never on by default; only tick it for a receiver you trust with that mail.
data.messageis the arrival.data.thread.historyholds up to 19 earlier messages of the conversation, oldest first: only mail of the same address, never anything in Spam or Trash.thread.truncatedsays older ones were left out.newTextis what the sender wrote without the history they quoted, ornullwhen nothing was quoted (then all oftextis new), the same split as format=agent.- Text only, never HTML. When a message had no plain-text part its HTML is converted. The whole body is at most 96 KiB, under the 100 KB default of most JSON body parsers: the oldest history goes first, then the arrival's text is cut.
textTruncatedandlistsTruncatedsay when something was cut. - Read
authenticationandagentRiskbefore you act on what a message asks.agentRiskisnullwhen nothing assessed the message, which is not the same asnone. safetysays what the message's links and PDF attachments really are: alevel, how many things were found (total) and up to tenfindings, each acodewith its facts, for example{ "code": "link_text_mismatch", "shown": "www.example.com", "target": "storage.example.net" }for a link whose wording shows one site and opens another. The link's full address is not in the webhook; read the message for it.filessays of each PDF inattachmentswhether its links were checked (examined); the list of where they go is on the message read. These are facts, never a verdict, new codes may be added, andnullmeans nothing was assessed, which is not the same asnone.autoSubmittedis set when the message said it was automatic (RFC 3834). Do not answerauto-repliedmail, such as an out-of-office: a key's reply to it is refused with403 agent_reply_to_auto_reply.- Answer through
POST /v1/mailboxes/:id/messages/:messageId/replywithdata.mailbox.idanddata.messageId, using a Full access key: a Sending key cannot reply from a mailbox. Fetch an attachment withGET /v1/mailboxes/:id/messages/:messageId/parts/:partId. - SendClipper keeps the body with the delivery record only for a while. 72 hours after the event finished, the subjects and texts are removed. A replay after that sends the body with
"redacted": "retention"; read the message through the mailbox API instead. A message deleted for good (an expired agent inbox, Empty Trash) is removed at once, and a delivery still owed sends"redacted": "deleted". - The id is stable per message, so an SNS redelivery or a retry sends nothing twice, and every retry carries the same body. Signing, retries and replay are the same as every other event.
Signature headers
| Header | Value | Status |
|---|---|---|
X-SendClipper-Timestamp | 1756800000: seconds since the epoch, stamped when this attempt was signed | current |
X-SendClipper-Signature-V2 | t=1756800000,v1=<hex>[,v1=<hex>] | current |
X-SendClipper-Signature | <hex> | deprecated 2026-09-06, still sent until at least 2027-03-06 |
The signed string is `${timestamp}.${rawBody}`: the decimal timestamp, one ASCII full stop, then the request body exactly as it arrived. Algorithm HMAC-SHA256 keyed by the UTF-8 bytes of your whsec_… secret (prefix included), encoded as 64 lowercase hex characters.
- Sign the raw bytes. Parsing the JSON and re-serialising it changes key order and whitespace and the check fails. In Express use
express.raw(), in Flaskrequest.get_data(), never the parsed body. - Accept any
v1=that matches, never only the first: during a secret rotation each delivery carries two. - Enforce a tolerance of five minutes (300 s) on
t=. The timestamp is inside the signature, so a captured delivery cannot be refreshed without your secret. That is your replay protection, and SendClipper does not enforce it for you. A retry is re-signed with a fresh timestamp, so a late success is not rejected by its own tolerance. - The deprecated
X-SendClipper-Signaturecovers the body only, verifies forever, and during a rotation carries the new secret only. Move toX-SendClipper-Signature-V2.
Verifying a delivery
Both snippets are standard-library only, loop over every v1=, enforce the tolerance and compare in constant time. They are the same code the API test suite runs against a real captured delivery, so they cannot rot.
// Node.js 18+, standard library only.
const crypto = require("crypto");
const TOLERANCE_SECONDS = 300; // five minutes
function parseSignatureHeader(header) {
const result = { timestamp: null, signatures: [] };
for (const part of String(header || "").split(",")) {
const eq = part.indexOf("=");
if (eq < 0) continue;
const key = part.slice(0, eq).trim();
const value = part.slice(eq + 1).trim();
if (key === "t" && value !== "" && Number.isFinite(Number(value))) {
result.timestamp = Number(value);
} else if (key === "v1" && value) {
result.signatures.push(value);
}
}
return result;
}
function constantTimeEquals(a, b) {
const left = Buffer.from(a, "utf8");
const right = Buffer.from(b, "utf8");
if (left.length !== right.length) return false; // timingSafeEqual throws otherwise
return crypto.timingSafeEqual(left, right);
}
function verifyWebhook(secret, rawBody, header) {
const { timestamp, signatures } = parseSignatureHeader(header);
if (timestamp === null || signatures.length === 0) return false;
const now = Math.floor(Date.now() / 1000);
if (Math.abs(now - timestamp) > TOLERANCE_SECONDS) return false;
const expected = crypto
.createHmac("sha256", secret)
.update(`${timestamp}.${rawBody}`, "utf8")
.digest("hex");
// Accept ANY match: during a secret rotation there are two v1= values.
let ok = false;
for (const candidate of signatures) {
if (constantTimeEquals(expected, candidate)) ok = true;
}
return ok;
}
// Express: read the RAW body, not express.json()
app.post(
"/hooks/sendclipper",
express.raw({ type: "application/json" }),
(req, res) => {
const ok = verifyWebhook(
process.env.SENDCLIPPER_WEBHOOK_SECRET,
req.body.toString("utf8"),
req.get("X-SendClipper-Signature-V2"),
);
if (!ok) return res.status(400).send("bad signature");
res.status(200).send("ok"); // answer 2xx quickly; do the work afterwards
const event = JSON.parse(req.body.toString("utf8"));
// ... deduplicate on event.id, then handle event.event / event.data
},
);# Python 3.8+, standard library only.
import hashlib, hmac, time
TOLERANCE_SECONDS = 300 # five minutes
def parse_signature_header(header):
timestamp, signatures = None, []
for part in (header or "").split(","):
if "=" not in part:
continue
key, _, value = part.partition("=")
key, value = key.strip(), value.strip()
if key == "t":
try:
timestamp = int(value)
except ValueError:
timestamp = None
elif key == "v1" and value:
signatures.append(value)
return timestamp, signatures
def verify_webhook(secret, raw_body, header):
timestamp, signatures = parse_signature_header(header)
if timestamp is None or not signatures:
return False
if abs(int(time.time()) - timestamp) > TOLERANCE_SECONDS:
return False
if isinstance(raw_body, bytes):
raw_body = raw_body.decode("utf-8")
expected = hmac.new(
secret.encode("utf-8"),
f"{timestamp}.{raw_body}".encode("utf-8"),
hashlib.sha256,
).hexdigest()
# Accept ANY match: during a secret rotation there are two v1= values.
return any(hmac.compare_digest(expected, s) for s in signatures)
# Flask: use request.get_data(), never request.json
@app.post("/hooks/sendclipper")
def hooks():
ok = verify_webhook(
os.environ["SENDCLIPPER_WEBHOOK_SECRET"],
request.get_data(),
request.headers.get("X-SendClipper-Signature-V2"),
)
if not ok:
return "bad signature", 400
return "ok", 200Retries, dead letters and replay
- Backoff 30 s → 1 m → 2 m → 4 m → 8 m → 16 m → 32 m → hourly until 24 hours from the first attempt, then the event is dead-lettered. Per-request timeout 5 s.
- Retried: any
5xx,408,425,429, every3xx, and every transport error or timeout. - Not retried, dead-lettered after one attempt because the same bytes would be refused the same way:
400,401,403,404,405,410,413,415,422. - Deliveries to one endpoint are sent in order and stop at the first failure; nothing behind a retrying event is delivered until it succeeds or dies.
Undelivered work. state is dead_lettered by default; retrying means pending or delivering, all means every state. This is a cursor-paginated list: { data, page: { cursor, hasMore } }. Pass cursor back to get the next page.
The payload we sent, every attempt, and your server's last answer.
A replay is one immediate attempt. If it fails again the event goes straight back to the undelivered list with its replay count raised, to be replayed by hand. There is no hidden second retry ladder behind the button. A replayed delivery is signed with whatever secrets are live at that moment. replay-all takes the same state/endpointId filters as the list, replays up to 200 events in one call and answers { queued, remaining, capped, max }. Replay on a disabled endpoint is refused.
Rotating the secret
POST /v1/webhook-endpoints/:id/rotate-secret answers 200 with the endpoint and its new secret. The endpoint keeps its id, URL, events, active state and delivery history.
- For 24 hours every delivery is signed with both the new secret (first) and the old one (second), so you deploy the new value whenever you like without missing an event. A second rotation inside that window replaces the grace secret: at most two are ever live.
- Retrying the request with the same
Idempotency-Keyreturns the same secret, not a second one. Two concurrent rotations are a conditional write: one wins, the other gets409with no secret in the body. - If you still verify the deprecated
X-SendClipper-Signature, deploy the new secret the moment you rotate, because that header cannot carry two.
Where we will and will not send
SendClipper resolves every destination itself, validates every address the name answers with, and connects only to a validated address. This happens at registration and again at delivery time, with the socket pinned to the validated address so DNS is never consulted twice.
- Refused: loopback, RFC 1918, CGNAT, link-local (including the cloud metadata address
169.254.169.254), unique-local, multicast and reserved ranges; thelocalhost,.local,.internaland.home.arpasuffixes; any URL carryinguser:password@. - A refusal is terminal: the event is dead-lettered, not retried. Three refusals in a row disable the endpoint and email the workspace Owner once; a successful delivery resets the count. Recover in this order: point the hostname at a public address, enable the endpoint, then replay the dead-lettered events. Events that were merely held behind the refusals resume on their own.
- A name that resolves to nothing (
ENOTFOUND) is an ordinary transport failure: it retries on the ladder and never disables anything. - Endpoints must be
https://. Plain HTTP needs an explicitallowInsecureHttp: true, which is shown on the endpoint card and never relaxes the address rule.
Domains
Every message is sent from an address on a domain you have proven you own. Sending needs MX, SPF, DKIM and DMARC; receiving needs two more records and is independent: a broken receiving record never blocks a send.
Add a domain
| Field | Type | Description |
|---|---|---|
namerequired | string | A bare hostname such as send.acme.io, with no scheme or path. Lower-cased on save. Domain names are globally unique across SendClipper: a name another workspace holds cannot be added. |
regionrequired | "us-east-1" | "eu-west-1" | "us-west-2" | Where the domain's identity is registered and its mail is sent from. Pick the one nearest your recipients. |
The response is the domain with status: "pending", its region, per-record flags (spfOk, dkimOk, dmarcOk, mxOk) and lastCheckedAt/lastError. A subdomain of a verified domain (billing.acme.io under acme.io) can send without being added on its own.
What deleting the domain takes with it: mailboxes, aliases, apiKeys scoped to it, portal, plus the messages and templates that stay behind and platformSender.
Removes the domain, its addresses and aliases, its mail portal and every API key scoped to it, and withdraws it from the sending providers and from receiving. Messages already sent or received keep their archive. The domain that sends the platform's own notifications is refused with 409 domain_is_platform_sender. An API key is refused with 409 mailbox_has_agent_activity while any of the domain's addresses has lines on its Agent activity timeline from the last 30 days; a person can delete it from the dashboard.
DNS records
[
{ "purpose": "MX", "host": "mail.send.acme.io", "priority": 10,
"value": "feedback-smtp.eu-west-1.amazonses.com (priority 10)",
"copyValue": "feedback-smtp.eu-west-1.amazonses.com", "ok": true },
{ "purpose": "SPF", "host": "mail.send.acme.io",
"value": "v=spf1 include:amazonses.com ~all", "ok": true },
{ "purpose": "DKIM", "host": "a1b2c3._domainkey.send.acme.io",
"value": "a1b2c3.dkim.amazonses.com", "ok": true },
{ "purpose": "DKIM", "host": "d4e5f6._domainkey.send.acme.io",
"value": "d4e5f6.dkim.amazonses.com", "ok": true },
{ "purpose": "DKIM", "host": "g7h8i9._domainkey.send.acme.io",
"value": "g7h8i9.dkim.amazonses.com", "ok": false },
{ "purpose": "DMARC", "host": "_dmarc.send.acme.io",
"value": "v=DMARC1; p=none; rua=mailto:dmarc@send.acme.io", "ok": true,
"alsoFor": ["scaleway"] },
{ "purpose": "TEM_SPF", "host": "send.acme.io",
"value": "v=spf1 include:_spf.google.com include:_spf.tem.scaleway.com ~all",
"note": "send.acme.io already publishes an SPF record (…). Do not add a second one. Edit that record so it reads exactly this merged value. …",
"ok": false },
{ "purpose": "TEM_DKIM", "host": "<project>._domainkey.send.acme.io",
"value": "v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkq…", "ok": false },
{ "purpose": "RECEIVING_TOKEN", "host": "_sendclipper-receiving.send.acme.io",
"value": "sendclipper-receiving=9f2b7c10ad42c3d4e5f60718a1b2c3d4", "ok": false },
{ "purpose": "MX_INBOUND", "host": "send.acme.io", "priority": 10,
"value": "inbound-smtp.eu-west-1.amazonaws.com", "ok": false }
]| Purpose | Needed for | What it does |
|---|---|---|
MX | Sending | Bounce handling on the custom MAIL FROM subdomain (mail.<domain>). |
SPF | Sending | Authorises our servers to send for that subdomain. |
DKIM | Sending | Three CNAMEs that let receivers verify our signature. All three must resolve. |
DMARC | Sending | Publishes your policy; p=none to start, tighten later. One _dmarc record serves both providers (alsoFor: ["scaleway"]). |
TEM_SPF | Sending through Scaleway | Scaleway's include on the domain itself. A name may carry only one SPF record, so when yours already has one the value is your record with Scaleway's include merged in, and note says so. Edit the existing record; never add a second. |
TEM_DKIM | Sending through Scaleway | Scaleway's DKIM key, a TXT under its own selector. It sits beside the Amazon SES CNAMEs and replaces none of them. |
RECEIVING_TOKEN | Receiving | A TXT record with a per-domain secret only SendClipper could have minted. This is what proves you own the zone before mail is routed into your mailboxes. |
MX_INBOUND | Receiving | The MX on the domain itself, pointing incoming mail at our receiving endpoint. |
Publish each record at your DNS provider exactly as given. Record values differ by region; re-fetch after a region change.
Start DMARC at p=none. The domain's DMARC tab in the dashboard reads the reports receivers send and says when the domain is ready for the next stage (quarantine 25%, quarantine, reject). With your DNS host connected (Cloudflare or Hostinger), one press moves the policy one stage and keeps every other tag (except sp=none, which it drops so subdomains follow the policy), and another press goes back. The tab lists every stage change it made.
Once the policy is at enforcement, the domain's Brand logo tab checks your logo for BIMI (SVG Tiny Portable/Secure, at most 32 KB, square), explains anything to fix, shows it the way Gmail and Apple Mail would, and hosts it at a URL that stays the same while the logo exists. You can point at a logo on your own HTTPS site instead. The tab then gives you the default._bimi record to publish and checks it. Yahoo and AOL show the logo from there; Gmail also needs a Verified or Common Mark Certificate, and Apple Mail a Verified Mark Certificate, which you add in the same tab.
SendClipper can send through Amazon SES or Scaleway Transactional Email. When Scaleway is configured, every domain you add is registered with Scaleway for you, and its two TEM_* records appear in this list. Publish them once, alongside the others, and a later switch of sending provider needs no DNS work and no Scaleway account. The domain view's providers block says which providers it is ready for: ses.ready is its verification here, and scaleway.ready needs that plus Scaleway's own check. Scaleway's MX is never listed: receiving always stays on Amazon SES.
Verification
Resolves every record now and returns the updated domain. The status is verified when every sending record checks out, failed when one was found broken (lastError names it), and pending while records are still missing. A background job re-checks pending and failed domains on its own, so a record that propagates overnight is picked up without a click. Only a verified domain can send; the refusal codes are listed under Send a message.
Receiving
Turns receiving on or off. Enabling mints the domain's receiving token and adds the two receiving rows to the records list. Mail is routed into the workspace only once both receivingEnabled and receivingVerified are true. The TXT token is the gate, because the inbound MX value is the same for every customer and proves nothing about who owns the zone. Receiving matches the domain exactly: mail to support@mail.acme.io is not routed by acme.io. What happens to a message once it arrives is under Mailboxes.
Region
Moves the domain's identity to another region. This is a re-registration, not a relabel: the DKIM tokens are replaced, the status returns to pending, the receiving proof is cleared, and you publish the new records. Once a domain holds any messages, the region cannot change (409 region_immutable).
Suppressions
The suppression list is every address SendClipper will not send to, and why. It is written for you on a hard bounce, on repeated soft bounces, on a spam complaint, when someone presses Unsubscribe (on the confirm page or in their mail client) and when Amazon SES itself refuses an address, and by hand. A send to a suppressed address is refused with 403 recipient_suppressed before anything leaves: on the API, in a batch item, in a broadcast fan-out.
| Reason | Scope | Written by |
|---|---|---|
hard_bounce | all mail | A permanent bounce from the receiving server. |
soft_bounce | all mail | Repeated temporary bounces (mailbox full, over quota, server busy) for one address: by default the third within 7 days. The entry states the numbers it was written with. |
complaint | all mail | A spam report from the recipient's provider. |
unsubscribe | marketing only (transactional sends still go) | The Unsubscribe button behind a marketing email's unsubscribe link (opening the link alone changes nothing), or the mail client's one-click Unsubscribe. |
manual | all mail | POST /v1/suppressions or the Suppressions screen. |
provider | all mail | Amazon SES refused the address because it is on the suppression list of the Amazon SES account SendClipper sends through. |
There are two lists, and they are not the same thing. Yours is per workspace: it holds the addresses above, and you can remove most entries. Amazon SES keeps its own list for the whole sending account (when on, which is the default: every address that hard-bounced or complained, from any workspace) and refuses to send to it however the message arrives. When it does, the message is bounced (the email.bounced webhook fires) and its timeline reads Refused by Amazon SES: address on the account suppression list. The address is added to your list as provider, which cannot be removed here (removing it would change nothing at Amazon SES). Such a message is left out of the bounce and complaint rates read against the provider's thresholds (the reputation alerts and the automatic pause), because Amazon SES leaves it out of its own. To have one lifted, contact support.
One soft bounce never suppresses: a full mailbox is usually emptied. The count is per address, per workspace, over bounces recorded in the last 7 days by default (the operator can change both numbers); the entry records the ones it was written with (reasonDetail reads 3 soft bounces in 7 days, last: mailbox full). A bounce the provider marks Undetermined is neither hard nor soft and is never counted.
Cursor-paginated: { data, page: { cursor, hasMore }, counts }, 25 per page by default, up to 100. counts is the per-reason total for the header.
The whole list as a streamed CSV download.
| Field | Type | Description |
|---|---|---|
emailrequired | string | The address to block. Lower-cased on save. |
note | string | Why, up to 500 characters. Shown on the row. |
| Field | Type | Description |
|---|---|---|
reasonrequired | string | Required body. 10 to 500 characters explaining why the address may be mailed again; kept in the audit trail. |
hard_bounce entry lets you send to an address the provider has already refused. Do it only when you know the cause is fixed (a mailbox restored). Amazon SES usually lists a hard-bouncing address on its own list too; then the next send is refused there and the address returns as provider. A complaint or provider entry cannot be removed here: the request answers 403 suppression_not_removable. Contact support.Removing a soft_bounce entry is safe to try: the bounces that put it there are not counted again, and three new soft bounces within the window put it back on its own.
Usage
Your workspace's emails sent and received: the figures on the Usage screen. A sent email (emails) is one that left SendClipper: a failed send and SendClipper's own notices to you are not counted, while a bounced message did leave and is. A received email (received) is mail that arrived in your inboxes, not a draft or a restored import. The response carries your package; this calendar month with both counts, a straight-line projection of sends to month end and the average per day; previousMonth; periods (day, week from Monday and month, each with from, to, emails and received); daily (every day of this month so far, zero-filled); months (the last months calendar months, default 6, oldest first, zero-filled); byDomain (this month's top eight sending domains) and storage (inbox storage used against your package's ceiling). Session only; an API key is refused.
/v1/analytics/overview and /v1/analytics/costs are the platform operator's and answer 403 to a workspace member.The Overview screen's tiles: 14 or 30 days.
409 workspace_sending_paused with a reason naming the rate, the line and the sample (for example complaint rate 0.6% is at or above 0.5% (SES critical threshold), measured over 30 days on 500 sends) and the support address to write to (support@sendclipper.com by default), the dashboard shows the paused banner, and the Owner gets one "Sending is paused" email carrying the same numbers. The pause is not lifted when the rate falls back. Write to that address, and sending resumes once the list has been reviewed with you.Reporting abuse
Two addresses reach a person at SendClipper, as RFC 2142 says they should:
| Address | Write to it about |
|---|---|
| abuse@sendclipper.com | Mail sent through SendClipper that you never asked for: spam, phishing, a list you never joined. |
| postmaster@sendclipper.com | Mailbox providers and mail administrators: delivery problems, feedback about our sending, anything an operator of a mail system needs to raise. |
Forward the message you received with its full headers (Gmail: Show original; Outlook: View message source), or attach it. The headers are how we find the workspace that sent it. A report we can confirm is grounds to pause that workspace's sending, as the Acceptable Use Policy says.
abuse@ and postmaster@ on the domain you send from. Create both as mailboxes on your receiving domain and turn on notifyOwner (Email the Owner in the address's editor) so a complaint reaches a person the same day (see Mailboxes). The Owner email is a platform notice and cannot yet be sent for every workspace. Where it cannot, the editor says so and the mail still lands in the address, so check it (and its Spam folder, since a forwarded spam message often scans as spam itself) rather than waiting for the email.Contacts and audiences
A contact is a name, an address and a status, filed in any number of audiences (lists): one contact can be in several audiences, and an audience holds many contacts. Segments slice across audiences, and a broadcast goes to either one. A contact in two audiences of one broadcast is still mailed once. Contacts are only needed for campaigns; transactional sends through the API do not create them.
Every audience with its live member count.
| Field | Type | Description |
|---|---|---|
namerequired | string | Up to 100 characters, unique in the workspace ignoring case (409 audience_name_taken). It cannot contain "|", which files use to list several audiences (400 audience_name_invalid). |
color | string | A hex colour for its chip, like #1795cf. Defaults to the next one in the palette. |
Creates an empty audience and answers it with count: 0.
Renames it and/or changes its color, with the same rules. Its contacts, and every campaign that sends to it, stay as they are.
Adds up to 1,000 contacts, by id, in one request. A contact keeps every other audience it is in; one already in this audience is counted in alreadyMembers and an id that is not a contact of this workspace in notFound, never an error for the rest. Adding an existing contact does not start an automation: triggers run when a contact is created.
POST /v1/audiences/<audience id>/members
{ "contactIds": ["<contact id>", "<contact id>"] }
→ { "added": 2, "alreadyMembers": 0, "notFound": 0 }Takes the same contactIds out of the audience and answers { removed, notMembers }. The contacts themselves are kept.
Deletes the audience and its memberships, never a contact: 204. It is refused with 409 audience_in_use while a scheduled broadcast sends to it, an automation's trigger filters on it or a segment's rule names it. A draft broadcast that sent to it simply loses its recipients.
{ items, total, page, pageSize }, 25 per page by default and up to 200. status is subscribed, unsubscribed or bounced. Each contact carries audiences, every { id, name, color } it is in (oldest first); audienceId/audienceName repeat the first of them for clients written before contacts could be in several.
| Field | Type | Description |
|---|---|---|
namerequired | string | Up to 120 characters. |
emailrequired | string | Lower-cased on save; unique per workspace. |
audienceIds | uuid[] | Every audience the contact joins; [] for none. Omitted (with audienceId) means the workspace's default audience. |
audienceId | uuid | One audience — the older form of audienceIds. |
status | "subscribed" | "unsubscribed" | "bounced" | Defaults to subscribed. |
A multipart upload, field file: a CSV up to 10 MiB or a vCard (.vcf, 3.0 or 4.0) up to 25 MiB. Besides our own header row name,email,audience (one audience cell may name several, separated by |: Newsletter | Customers) (and our own backup, below), the importer recognises the exports of Google Contacts, Outlook, Apple Contacts, Mailchimp, Brevo and Resend and maps their columns itself. With no other field, an address already in the workspace and an audience name that does not exist yet are skipped, never changed or created. Optional text fields change that:
| Field | Type | Description |
|---|---|---|
filerequired | file | The CSV or vCard. |
audienceId | uuid | Every row goes into this audience; the file's own audience column is ignored. |
newAudience | string | Every row goes into an audience by this name, created when missing (1 to 100 characters). |
createAudiences | "true" | "false" | Create the audiences the file's audience column names (at most 50 per import). |
onDuplicate | "skip" | "update" | An address already in the workspace: leave it (default) or update its name and custom fields and add it to the file's audiences (it keeps the ones it is already in). An update never re-subscribes an unsubscribed or bounced contact. |
mapping | JSON string | One target per column, overriding detection: "email", "name", "first_name", "last_name", "audience", "status", "unsubscribed", "bounced", "created_at", "property:<key>" or "ignore". |
The response reports imported, updated, duplicates, invalid and skipped counts, the detected source, any audiencesCreated, and the first 25 skipped rows with the reason, so the file can be fixed. An import never adds an address to the suppression list.
name,email,audience
Ada Lovelace,ada@lumen.io,Newsletter
Mira Fabbri,mira@northwind.io,Customerscurl -X POST https://sendclipper.com/v1/contacts/import \
-H "Authorization: Bearer <session token>" \
-F "file=@contacts.csv"The same upload, read and nothing written: the detected source, each column's proposed target with sample values, the first five rows and the audience names the file uses. Send an edited mapping back to the import.
Every contact, or one audience's, as a download. csv (the default) is the lossless backup: email, name, first and last name, audiences (Newsletter | Customers), status, created date and one column per custom field, which POST /v1/contacts/import reads back as is. vcf is a vCard 4.0 file for address books. Cells that a spreadsheet would run as a formula are prefixed with ' (the importer removes it again). An unknown audience is 404. With an API key this needs a full key.
unsubscribed contact and an address on the suppression list are two different things: the first is skipped by broadcasts, the second is refused by every send.Segments
A segment is a saved set of rules over engagement and contact fields, evaluated live: its count on the Segments screen and in a broadcast picker is computed at request time, never cached.
A broadcast can send to a segment (segmentId on the broadcast, instead of audienceId). Its rules are checked again when the campaign goes out, so it reaches whoever matches then (subscribed contacts only, suppressed addresses excluded). A segment a scheduled broadcast depends on cannot be deleted (409 segment_in_use).
Automations use segments too: a segment can filter a flow's subscribe trigger, an Is in segment? condition checks membership when the contact reaches it, and a whole segment can be enrolled at once (below). A segment an automation uses cannot be deleted either.
| Field | Type | Description |
|---|---|---|
namerequired | string | 1 to 80 characters (create only). |
rulesrequired | Rule[] | At least one rule; all rules must match (AND). |
rules[].field | string | opened_count, clicked_count, last_open_after, last_open_before, subscribed_age_days, created_at, audience_id, status. |
rules[].op | "=" | ">=" | "<=" | ">" | "<" | Comparison. Equality only for audience_id and status. |
rules[].value | number | string | Shaped per field: a count, an ISO date, an audience id, a status. |
rules[].days | int | 1 to 3650. Window for the count fields: opened at least N times in the last D days. |
POST /v1/segments/preview
{
"rules": [
{ "field": "opened_count", "op": ">=", "value": 3, "days": 30 },
{ "field": "status", "op": "=", "value": "subscribed" }
]
}
→ { "count": 1284, "chips": ["Opened ≥ 3 in 30 days", "Subscribed"] }Broadcasts
A broadcast is one message to an audience or a segment: a draft you edit, test, then send now or schedule. Every recipient gets their own messages row with the same status lifecycle and webhooks as an API send, filtered on the Emails screen by broadcastId.
Lifecycle
Every field is optional. An empty body creates an empty draft for the builder to fill in.
| Field | Type | Description |
|---|---|---|
name | string | Up to 200 characters. |
audienceId | uuid | null | Who receives it: an audience's subscribed contacts. |
segmentId | uuid | null | Or a segment's matching subscribed contacts, evaluated at send time. Setting one clears the other; both at once is 400 broadcast_two_targets. |
from | string | An address on a verified domain. |
subject / previewText | string | Up to 300 characters each. May carry merge tags. |
deliveryMode | "now" | "schedule" | "recurring" | How it goes out. |
scheduledAt | ISO 8601 | null | When, for schedule mode. |
status | "draft" | "scheduled" | Set scheduled together with scheduledAt to schedule; there is no separate schedule route. sending and sent are reached only through /send. |
bodySource | "sample" | "template" | "html" | Where the body comes from (below). |
templateId | string | null | A published template, for bodySource template. |
bodyHtml | string | null | Pasted HTML, up to 500 000 characters, for bodySource html. |
How many contacts will actually receive it (the audience, or the segment's matches, minus unsubscribed contacts and suppressed addresses), plus sampleHtml, the body resolved for a sample recipient.
Sends one copy to your own address with a test unsubscribe link that suppresses nobody.
Starts the fan-out. The broadcast moves to sending and then sent; its card shows delivered, opened and clicked counts as the events arrive.
A scheduled broadcast goes out on the first check after its time (every 30 seconds). It may no longer be sendable by then: its template was unpublished or deleted, its body is empty, a tag has no value, a link starts with a tag that is never a web address, its From is outside a marketing domain nominated since, its audience or segment has no subscribed contacts left, or it has no recipients picked any more. Then it is moved back to draft once and nobody is mailed. The broadcast carries returnedToDraft (at, code and a one-sentence reason) until it is next edited; the list marks it not sent and the builder shows the reason. A broadcast held because sending is paused or no postal address is on file stays scheduled and goes out once that is resolved.
The recipient picker: every audience with its subscribed count, and every segment with the number of subscribed contacts it matches now.
Body and personalisation
| bodySource | Rendered from |
|---|---|
sample | The built-in sample email. The default. |
template | A published template (templateId). Picking a draft is 409 template_not_published. If the template is unpublished or deleted later, the campaign still saves as a draft (templateUnavailable says why); sending, test-sending and scheduling it answer 409 template_not_published / 404 template_not_found until it is published again or another body is chosen. |
html | Your pasted HTML, sanitised on save: scripts, event handlers, javascript: and data: URLs, iframes and meta-refresh are stripped; nothing else is touched. A non-blank previewText goes in as a hidden preheader right after <body>, so the inbox shows it after the subject. |
Personalisation runs per recipient inside the fan-out with a fixed vocabulary: {{name}}, {{first_name}}, {{email}}, {{unsubscribe_url}}, {{broadcast_name}} and {{postal_address}} (your workspace's own, from Settings). Write {{first_name|there}} for a contact with no name.
Company merge fields fill in per recipient too, from the contact and the company it is linked to (by hand or by its email domain): {{contact.first_name}}, {{contact.name}}, {{contact.email}}, {{contact.role}}; {{company.name}}, {{company.city}}, {{company.country}}, {{company.category}}, {{company.what}}, {{company.markets}}, {{company.tech.main}}, {{company.project}}; {{offer.name}} and {{offer.pitch}} (the company's best-matching offer); and {{ai.opening_line}} — the first opening line written from the profile, never an AI call at send time. They work the same in a template, a pasted body, the subject and an automation's email. A field used without a fallback must have a value for every recipient, or the send, the test and the schedule are refused with 400 broadcast_company_fields_unresolved (“{{company.city}} has no value for 12 of 340 recipients — add a fallback like {{company.city|your city}}”). With a fallback, people without a value get the fallback.
Any other tag without a fallback refuses the send, the test and the schedule with 400 broadcast_tags_unresolved naming the tags, before the first recipient (never three hundred in). So does a link that starts with a tag that can never be a web address (href="{{email}}"): 400 broadcast_link_tags_invalid names it; start the link with https://, or write mailto:{{email}}.
Unsubscribe
Every broadcast carries a real, per-recipient unsubscribe link: a signed token. Opening it shows a page asking “Unsubscribe from this sender?” and writes nothing, so a corporate link scanner that opens every link in a message cannot unsubscribe anyone; pressing its button writes an unsubscribe suppression (marketing scope) and answers a plain confirmation page. A body with no {{unsubscribe_url}} gets one appended rather than being refused; an automation step's email gets the same line. The page always answers 200, is idempotent and never reveals why a token did not work.
The same link also works from inside the mail client. Every marketing message (a broadcast, an automation step, or an API send with sendClass: "marketing") goes out with List-Unsubscribe and List-Unsubscribe-Post: List-Unsubscribe=One-Click headers, so Gmail, Yahoo and Outlook show an “Unsubscribe” control next to the sender. Pressing it POSTs the link with no page and no confirmation (RFC 8058); the POST form writes the same suppression and answers a constant 200. Transactional messages carry neither header, so a receipt never shows an unsubscribe control.
Postal address
Anti-spam law (CAN-SPAM in the US, the EU's sender-identification rules for commercial email) requires a real postal address on marketing mail. Type your company's address once under Settings › Workspace (or PATCH /v1/workspace with postalAddress) and every marketing message carries it in the footer, beside the unsubscribe link: the sample body shows it where its footer always had an address, a template shows it wherever its footer places {{postal_address}}, and any other body gets one line appended at the end. A body that already shows the address is never given a second one.
With no address on file, every marketing send (a broadcast's send, test and schedule, an automation step, and an API send with sendClass: "marketing") is refused with 400 postal_address_missing before anyone is mailed (SendClipper can mint an unsubscribe link, but it cannot invent an address). A scheduled broadcast that comes due is held and goes out on the first check after the address is added. Transactional mail is never refused for it and never gains an appended line (a transactional template whose footer places the tag shows the address if one is on file). Each sent message keeps the address it went out with, so changing it later does not rewrite what earlier campaigns say. Every broadcast view carries postalAddressMissing, the refusal sentence while no address is on file (null once there is one), which is what the builder's banner shows. Sending a failed marketing message again re-applies the rule with the address on file at that moment.
Automations
An automation is a journey a contact walks step by step: send an email, wait hours or days, and a condition (branch) that lets the contact continue only if they opened or clicked the previous email; otherwise they leave the flow. Every email goes through the same send path as POST /v1/emails, as marketing mail, so suppressions, the postal address and the unsubscribe link all apply.
A flow starts when a contact subscribes (optionally only contacts in one audience), or when you enroll a contact from the Activity view or through the API below. Each contact enters each flow once. Before every email the contact is checked again: someone who unsubscribed or was suppressed while waiting leaves the flow instead of getting it. Pausing a flow holds everyone where they are; resuming picks them up.
| Field | Type | Description |
|---|---|---|
emailrequired | string | An existing contact in this workspace. The audience filter does not apply; subscription state and suppressions do. |
curl -X POST https://sendclipper.com/v1/automations/$FLOW_ID/enrollments \
-H "Authorization: Bearer $SENDCLIPPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "email": "ana@example.com" }'| Refusal | Status | Why |
|---|---|---|
automation_paused | 409 | The flow is not Live. |
contact_not_found | 404 | No contact with that address. Add it first. |
contact_not_subscribed | 409 | The contact unsubscribed or bounced. |
recipient_suppressed | 409 | The address is on your suppression list. |
already_enrolled | 409 | This contact has already been through the flow. |
| Field | Type | Description |
|---|---|---|
segmentIdrequired | uuid | Every subscribed, unsuppressed contact it matches now enters the flow; contacts already through it are skipped. At most 1,000 at once (409 segment_too_large). |
| Field | Type | Description |
|---|---|---|
namerequired | string | Up to 80 characters. |
recipe | "blank" | "welcome" | "nudge" | "drip" | Starting steps. Default blank (one email). |
trigger | "contact.subscribed" | "manual" | What starts it. Default contact.subscribed. |
| Field | Type | Description |
|---|---|---|
name | string | Rename. |
trigger | "contact.subscribed" | "manual" | Change what starts it. |
audienceId | uuid | null | Only contacts in this audience (null = all). |
segmentId | uuid | null | Or only contacts matching this segment when they are added (never both). |
active | boolean | Live or paused. Going Live is refused (409 automation_incomplete) while a step cannot run, naming the step. |
| Field | Type | Description |
|---|---|---|
typerequired | "send" | "wait" | "branch" | Inserted before the exit step. |
subject | string | Required for send, up to 160 characters. |
body | string | Up to 2,000 characters. |
from | string | Sender address on one of your verified domains. |
days / hours | int | For wait: 0 to 90 days plus 0 to 23 hours, at least one hour in total. |
condition | "opened" | "not_opened" | "clicked" | "not_clicked" | "in_segment" | "not_in_segment" | Required for branch. Opens and clicks are tested against the last email the flow sent; a segment condition against the segment's rules when the contact gets there. |
segmentId | uuid | Required for in_segment / not_in_segment. |
| Field | Type | Description |
|---|---|---|
status | "active" | "waiting" | "completed" | "exited" | "failed" | Filter by where the contact is. |
limit | int | 1 to 200, default 50. |
Mailboxes
A mailbox is one address on a domain that has receiving enabled and verified. Mail sent to it is parsed, threaded with anything you sent, and readable in the dashboard Inbox, through the API, by a person you hand a password to, or inside your own product through an embed.
Create an address
| Field | Type | Description |
|---|---|---|
domainIdrequired | uuid | A domain of this workspace. |
localPartrequired | string | The part before the @, 1 to 64 characters. Addresses are unique across SendClipper, case-insensitively: 409 mailbox_address_taken. |
displayName | string | Up to 120 characters. |
color | #rrggbb | For the rail. |
catchAll | boolean | Receive everything on the domain that no other address claims. One per domain (409 mailbox_catch_all_taken). |
The response is the mailbox: id, address, domain, catchAll, canReceive (the domain has proven receiving), canSend (the domain is verified for sending), unread and total counts.
displayName, color, catchAll, archived, embedOrigins, notifyOwner, clientAccess, agentSendPolicy, agentSendAllowlist, agentSendsPerHour, agentSendsPerDay, agentRecipientsPerSend, agentDistinctRecipientsPerDay, agentPaused and agentApproval (see Who an agent may write to, A budget, and a pause that names it and Wait for a person to approve; those eight need a signed-in session, not a key). The address itself is immutable.
clientAccess: true (Mail apps in the address's editor, off by default) lets the person who owns the address read its Inbox in Apple Mail, iPhone Mail or Thunderbird over IMAP, signing in with the address and its mailbox password. They find the settings to type in their webmail under Address settings. Wrong passwords there count toward the same sign-in limit as the webmail, and turning it off ends a connected mail app on its next sync. Sending works too, from the same app and the same password (port 465, or 587 with STARTTLS), through every rule a send from the webmail follows; it can come from the address or one of its own aliases, and is never open- or click-tracked.
notifyOwner: true emails the workspace Owner, at their sign-in address, once for every message that arrives at the address: the sender, the subject, the first lines and a link to it in the Inbox. Mail filed in Spam sends nothing. Turn it on for addresses nobody watches all day, above all your own abuse@ and postmaster@ (see Reporting abuse). It is a second call after the address exists: POST /v1/mailboxes takes no notifyOwner. The notice is a platform email and appears in /logs; one send is attempted per message, so a notice that ends failed is resent from /logs (Send again), not by the next arrival. At most MAILBOX_NOTIFY_MAX_PER_HOUR notices (default 5) go out per address per rolling hour: the last one says more are arriving and to open the Inbox, and anything past it is filed as usual with no email. Where the platform cannot send notices for a workspace, ownerNoticeAvailable on the mailbox reads false, the address's editor says no email will go out, and the mail still arrives as usual. A domain-scoped API key reads that field from its own domain only, so it sees false unless its domain is the platform sender's. That is a conservative answer, not a verdict on the workspace. Both fields, notifyOwner and ownerNoticeAvailable, ride every mailbox response.
Every mailbox response also carries azureSender: { state, reason, checkedAt }, where state is registered, pending, failed or not_applicable. When SendClipper sends through Microsoft Azure, an address can only send from a domain once Azure has registered it as a sender. SendClipper requests this when the address is created (and withdraws it when the address is archived), so you never call anything for it. Creating an address never waits on Azure.
Archives the address rather than deleting it: it stops receiving and signing in, and everything it received stays readable. Retiring an address never destroys its archive.
Deletes the address for good. It needs ?confirm=<the address>, works on an archived address too, and frees the address to be created again. By default its mail is kept and moves to All mail, unfiled; add &deleteMail=true to delete received mail, drafts and attachments with it. A message you sent stays in the delivery log either way. Sign-in and embed tokens for the address stop working at once. An API key is refused with 409 mailbox_has_agent_activity while the address has lines on its Agent activity timeline from the last 30 days (deleting it would erase the record kept of the key); a person can delete it from the dashboard, and the key can still archive it.
How mail is routed
- The recipient's domain must be a receiving-verified domain of exactly that name. Otherwise the message is refused.
- An address matching the local part (ignoring a
+tag) files it there. - Otherwise an alias with that local part files it in the alias's mailbox (the message keeps the alias as its recipient).
- Otherwise the domain's catch-all takes it.
- Otherwise it is kept unfiled and shows under "All mail" in the dashboard. An unclaimed address is never bounced.
Replies are threaded by In-Reply-To and References, then by normalised subject plus participants within 90 days, so a customer answering a message you sent through the API lands in the same conversation. Inline images are served through GET /v1/messages/:id/parts/:partId, authenticated and tenant-scoped, never as a data URI.
Read a mailbox from your app
This is the "receive from my app" half. A key with read or sending permission can read; a key scoped to the address's domain, or to this one address, is the right one to hand to a service. folder is inbox, starred, sent, drafts, archive, spam, trash or all (every folder at once, Spam, Trash and Drafts included). A message filed under another address is 404, and a search never reaches one.
search is full-text over subject, participants and body, in any script, most relevant first (subject, then participants, then body); quotes, or and -word work, and the last word also matches as a prefix. The answer is { items, total, unread, totalCapped, counts, labels, page }: total and unread count the whole list (a search counts up to 1,000 matches and sets totalCapped), and page: { cursor, hasMore } pages it: pass cursor back for the next page. A page is limit rows, 1 to 200, 200 when omitted.
# List what support@acme.io has received, with a domain-scoped key
curl "https://sendclipper.com/v1/mailboxes/<mailbox id>/messages?folder=inbox&search=invoice" \
-H "Authorization: Bearer sc_live_<key scoped to acme.io>"
# One message, with its body and parts
curl "https://sendclipper.com/v1/mailboxes/<mailbox id>/messages/<message id>" \
-H "Authorization: Bearer sc_live_<key scoped to acme.io>"To be told about new mail instead of polling, subscribe a webhook endpoint to mailbox.message.received. To poll, list folder=inbox and remember the newest id you have processed.
Read it as a model would
format=agent returns the same message shaped for an AI agent, so it reads a forty-line reply chain as the few lines that are new. format=agent-summary is the same without the quoted history and the attachment text, with their token counts, so an agent can decide whether the rest is worth reading. Nothing here is a model: every field is derived the same way every time.
newTextis what the sender wrote, without the history they quoted.quotedholds that history separately, ornull. Gmail, Outlook, Apple Mail and reply lines in English, German, French, Spanish, Italian and Albanian are recognised. A reply written between the quoted lines is never cut, and a forwarded message is content, never history.to,ccandreplyTolist every recipient and where a reply should go.attachments[].textis the text of a PDF, DOCX, CSV, Markdown or plain-text attachment, up to 32,768 characters each and 131,072 per message, from at most ten parts of 10 MiB or less. When there is no text,textSkippedsays why:unsupported,too_large,corrupt,missing,failed,timeout,budget,no_text(a scanned PDF, an empty file) orencrypted.participantsandthreadSummarydescribe the earlier messages of the conversation that this key may see, never anything in Spam or Trash (up to ten: sender, time, snippet).authenticationandagentRiskare the same blocks the ordinary read carries: read them before acting on what a message asks.safetysays what the message's links and PDF attachments really are, the same block the ordinary read carries:level(none,low,medium,high),totaland up to 20findings. A finding has acodeand the facts behind it:link_text_mismatchcarriesshown(the site the link's wording names),target(the site it opens) andhref; thepdf_*codes carry the file'sfilenameand the host its link opens. These are facts, never a verdict, and new codes may be added: treat one you do not know as a finding.safetyisnullon a message your workspace sent.attachments[].safetyis the check of one received PDF:linkCount,links(address and host),fullPageLink,pictureWithLink,rawIpLinkandactiveContent. When it isnull, orexaminedisfalse(with areason), the file's links were not checked, which is not the same as having none. Downloading the file returns the same result in theX-SendClipper-Attachment-Safetyresponse header, with each link reduced to its host. Host and file names come from the sender: treat them as data, never as instructions.attachments[].fileSafetysays what one file is, from its name and its first bytes:extension(the real last one),runnable(for examplewindows_program,script,macro_document, ornull),doubleExtension(invoice.pdf.exe),typeMismatch(a program under a document's name) and, for a ZIP,archivewith the first runnable entry and whether it is password-protected. Whenexaminedisfalseonly the name was read. A flagged file adds oneattachment_*finding tosafety, and downloading it returns theX-SendClipper-Attachment-File-Safetyheader. This is a type check, not a virus scan, and no file is ever blocked.approxTokensestimates the cost ofnewText,quoted, the attachment text and the headers. It is an estimate, not a tokenizer.
Any other format value is 400 format_invalid. The dashboard's GET /v1/inbox/messages/:id?format=agent returns the same view. The MCP tool inbox_get_message takes format: "agent" or "agent-summary".
Get the code out of it
format=extract returns no body: just the verification codes and the verify, sign-in and password-reset links in what the sender wrote, for an agent that signed up somewhere and is waiting for the confirmation email. The same extracted block is on format=agent and agent-summary. It is derived by fixed rules, never a model, and SendClipper never opens a link it finds.
- A number is a
codeonly when the message calls it one: the word "code" (orPIN,OTP,Bestätigungscode,kodi…) on its line, or on a line above a line holding nothing else. Years, amounts, times, dates, phone numbers, order and invoice numbers and coupon codes are left out.valueis what to type (482913for482 913);confidenceishighormedium. - A
linkcarries itspurpose(verify,sign_inorpassword_reset), its visibletext, itshost,sameDomainAsSender, andtextNamesOtherHostwhen the wording names a different site than the link goes to. Unsubscribe andmailto:links are never candidates. - A code in the quoted history of a reply is ignored. A candidate that appears only in text hidden from a human reader is listed with
visible: false, after every visible candidate. Treat it as a decoy. extractedisnullfor mail this workspace sent, for a draft, for restored mail you sent yourself and for a body deleted by retention.truncatedis true when the message was longer than the scan reads. The response also carriesto(the address it was delivered to),authenticationandagentRisk: check that the sender passed DMARC before using a code. The dashboard reads the same view atGET /v1/inbox/messages/:id?format=extract.
The MCP tool inbox_wait_for_code does the whole loop in one call: it waits for a new Inbox message, optionally from a sender address or domain (never matched on the display name), and returns the first visible code (or, with kind: "link", link). A new message without one does not end the wait.
A throwaway address for a sign-up
An agent that signs up somewhere needs an address for one email. This gives it one on SendClipper's own agent domain, with no domain or DNS to set up: agent-k3x9q2…@agents.sendclipper.com. Send ttlHours (1 to 168, default 24) and an optional displayName. The answer is an ordinary mailbox with expiresAt set, so every read above works on it, and inbox_wait_for_code returns the code.
- It receives only. Sending or replying from it is
403 agent_inbox_receive_onlyand nothing is sent. - When
expiresAtpasses, the address and everything it received are deleted (a webhook delivery of a message keeps its text for up to 72 hours). Mail sent to it afterwards is accepted and dropped, exactly as for an address that never existed.DELETEends it sooner; with an API key that is refused (409 mailbox_has_agent_activity) once the address has Agent activity, so the record of what the key did stays until the address expires. - It needs a Full access key for the whole workspace. A key limited to one domain or one inbox is refused. A workspace may hold 50 at once (
409 agent_inbox_limit).
The MCP tools are inbox_create_ephemeral and inbox_delete_ephemeral.
Answer it from your app
The other half: a program that reads an address's mail can answer it. These three writes need a Full access key — a sending or read key is 403 api_key_scope_insufficient. For an agent that runs one address, create the key for that address alone (A key for one inbox): it reads and answers that mail and cannot reach any other address.
A key's PATCH may file a message in Spam or Trash, but not take one back out of them: 403 agent_move_out_of_quarantine_refused. Mail in those two folders is not part of the conversation the address may write to, and moving it out would add its sender. A person rescues it in the dashboard.
Ask reply-context first rather than guessing recipients. It answers { reply: { to, cc }, replyAll: { to, cc }, replyAllAddsNothing, subject, forwardSubject, quotedBody, forwardBody, forwardAttachments, forwardOmitted, forwardOmittedNotice }.forwardOmitted lists received files a forward cannot carry because they were too large to keep, and forwardOmittedNotice is one sentence naming them (null when there are none). Reply-all means "everyone on the message except us", and "us" is every address on every domain your workspace owns — which your code cannot know, so the server decides it. A Bcc is never in a reply-all.
Neither send takes a from. The sender is the address in the path, or one of that address's own aliases by fromAliasId. That is deliberate: a key that can send as one address must not be able to send as every other address on the domain, because the whole domain's reputation rides on it. The body is otherwise the mailbox compose body — to, cc, bcc, subject, body, html, templateId + variables, attachmentIds, fileIds, draftId, sendAt — and the reply's parent is the message in the URL, never a replyToId in the payload.
A reply goes out through the same sending path as everything else, so every gate still applies: the domain must be verified, the recipient must not be suppressed, sending must not be paused, and the rate limit counts it. Two more are the address's own: by default a key may answer only people already in the conversation and nobody else (Who an agent may write to), and it may send only so much (A budget, and a pause that names it). The Sent copy is filed under the address and threaded onto the customer's message, so it appears in the conversation and in /logs as one message, not two.
PATCH is the small stuff: unread, starred, snoozeUntil, and folder — inbox, archive, spam or trash. A message filed under another address is 404 on every one of these four routes, never 403: a refusal tells a key nothing about the rest of the workspace.
Opening one received message also returns authentication, with Amazon SES's spf, dkim, dmarc and spam verdicts exactly as SES sent them: PASS, FAIL, GRAY (neither a pass nor a failure: no SPF answer, a message not signed by the sender's domain, or a sender with no DMARC policy), PROCESSING_FAILED, or null when nothing was recorded. It also returns the sender's dmarcPolicy when DMARC failed, a summary (passed, partial, failed, unknown), routingReason and spamOverriddenAt once someone moved it out of Spam. routingReason says why it is, or was, in Spam: spam_verdict, dmarc_quarantine, dmarc_reject (kept in Spam, never deleted), virus_verdict (a record with no content; the message itself was never stored) or manual (a person moved it there; the reading pane says so without naming who). authentication is null on mail you sent.
Who an agent may write to
A program that answers an address's mail is reading messages written by strangers, and a stranger can simply ask it to forward the thread somewhere. So every address carries a rule for what a key may do from it, and the default is the cautious one. The rule covers exactly two routes, and only when the caller is an API key: POST /v1/mailboxes/:id/messages/:messageId/reply and POST /v1/mailboxes/:id/messages (the MCP tools inbox_reply and inbox_send use them).
| agentSendPolicy | A key may write to |
|---|---|
reply_only | The default. People already in the conversation it is answering, and nobody else. A new message is refused outright, even to someone who wrote in last year. |
allowlist | The same people, or anyone on agentSendAllowlist. A superset of reply_only, so turning it on never takes away a reply. |
open | Anyone. The ordinary sending gates still apply (verified domain, suppression, pause, rate limit). |
Who is in the conversation. The sender, the Reply-To, and every To and Cc of the messages that arrived in it and that this address holds. A message in Drafts, Spam, Trash or Reports, or filed under another address, adds nobody. The message you are answering counts too, even when it has no thread yet, under the same rule: answering a draft or a message in Spam or Trash makes nobody a party. A Bcc never makes anyone a party, and mail you sent adds nobody either: replying to your own Sent message, with nothing from outside after it, is refused under reply_only. Your own mailbox addresses and their aliases (with or without a +tag) are taken out, so a reply from support@ cannot be turned into mail to billing@ because both sat on a customer's To line; a colleague at your domain who wrote in is a party like anyone else. The check is per recipient across to, cc and bcc: the Reply and Reply all that reply-context suggests for a message that arrived are made of conversation parties and pass, and adding one stranger to a reply refuses only the stranger.
Allowlist entries are an exact address (cfo@partner.io) or a bare domain (partner.io, a leading @ is accepted). A domain covers that domain only, never its subdomains: acme.io allows bob@acme.io and not bob@billing.acme.io. There are no wildcards. Entries are lower-cased and de-duplicated, and a list holds at most 200.
# A person (a dashboard session) decides whom keys may write to
PATCH /v1/mailboxes/<id>
{ "agentSendPolicy": "allowlist", "agentSendAllowlist": ["vendor.io", "cfo@partner.io"] }
# A key that answers support@acme.io, to someone who is not in the conversation
POST /v1/mailboxes/<id>/messages
{ "to": "eve@evil.example", "subject": "Forwarded thread", "body": "…" }
→ 403
{ "error": {
"code": "agent_recipient_not_allowed",
"message": "This address only lets an API key write to people in the conversation or on its allowlist, and eve@evil.example is on neither.",
"detail": { "policy": "allowlist", "recipients": ["eve@evil.example"] } } }The refusal is a 403, raised before anything is written: no message, no draft, nothing sent. detail.recipients lists only the addresses that were refused, lower-cased. A message with sendAt is judged when you submit it, while its conversation exists, and is refused then rather than hours later in Drafts; once accepted, a scheduled message cannot be edited, so its recipients cannot change after the check. Another address's mailbox or message is still 404, never this 403.
Only a person changes the rule. Set agentSendPolicy (open, reply_only or allowlist) and agentSendAllowlist (the list replaces the stored one) with PATCH /v1/mailboxes/:id from a signed-in session with manage:mailboxes, or in the address's editor in the dashboard Inbox (Agent sending). A key that sends either field, even with its current value, gets 403 agent_policy_session_only whichever address it names, so a key cannot loosen its own leash. A malformed entry or a list over 200 is 400 agent_allowlist_invalid with detail.invalid and detail.max. Both fields ride every mailbox response (GET /v1/mailboxes included), so a program can read its own rule before it tries.
What it does not govern. The same two routes called with a signed-in session are never held to it, and neither is anything else a person does from the address: the dashboard Inbox, the mailbox app at /mail and the embed, a mail app over SMTP, recurring sends. Nor is POST /v1/emails or the batch route, which are the sending API and take their own verified From. It is the guard on a program answering an address's mail, not a limit on what a Full access key can do elsewhere. Every address starts on reply_only, including the ones that existed before this rule: a key that used to start conversations from an address gets the 403 until a person opens it.
A budget, and a pause that names it
The rule above decides whom a key may write to; this decides how much. A program in a loop (two agents answering each other, a retry that never gives up) writes to the same few people at machine speed, and the first you hear of it is your domain's reputation. So every address also holds a key to four numbers. They cover the same two routes as the rule above and, like it, only when the caller is an API key: a person sending from the same address is never counted and never paused.
| Budget | Default | A send that would pass it |
|---|---|---|
| Recipients per message | 10 | Refused 400 agent_too_many_recipients with detail.limit and detail.count. To, Cc and Bcc are counted together, de-duplicated and case-insensitive. Nothing is counted and nothing is paused. |
| Sends per hour | 60 | Refused 429 agent_budget_exceeded with a Retry-After header and detail.retryAfterSeconds. The address is not paused: an hour later it sends again. |
| Sends per day | 500 | Refused 429 agent_budget_exceeded and the address is paused until a person resumes it. This is the number that stops two agents answering each other, who have one recipient and so never trip the next row. |
| Different recipients per day | 100 | Refused 429 agent_budget_exceeded and paused, like the row above. It is judged only when the send names someone new; writing again to people already written to today is the daily-send budget's business. |
The two daily budgets are rolling 24 hours, the hourly one a rolling hour. A send over both an hourly and a daily budget is the daily one's: telling a looping agent to wait an hour would only schedule its next attempt. A refused send costs nothing: it writes nothing and is not counted, and neither is a send that a later check refuses (the domain, a suppression, the sandbox limit). A message with sendAt is counted when you submit it, once, not again when it leaves. Two things err on the side of refusing sooner: cancelling a scheduled message does not give its send back, and sending a scheduled draft right away (draftId) is counted again, so scheduling and cancelling, or scheduling and sending now, is never a way around a budget.
# A person (a dashboard session) sets this address's numbers, or pauses it
PATCH /v1/mailboxes/<id>
{ "agentSendsPerHour": 20, "agentSendsPerDay": 200, "agentRecipientsPerSend": 5,
"agentDistinctRecipientsPerDay": null } # null = go back to the default
# A key that has already sent this address's hourly allowance
POST /v1/mailboxes/<id>/messages/<messageId>/reply
→ 429 Retry-After: 754
{ "error": {
"code": "agent_budget_exceeded",
"message": "This address has already sent 60 messages through API keys in the last hour, which is its limit. Wait about 13 minutes and try again.",
"detail": { "budget": "sends_per_hour", "limit": 60, "windowSeconds": 3600, "retryAfterSeconds": 754 } } }
# A key that passes a DAILY budget: refused, and the address is now paused
→ 429
{ "error": {
"code": "agent_budget_exceeded",
"message": "Daily budget reached: a send from support@acme.io would have taken it past its limit of 500 API-key sends in 24 hours. Agent sending from this address is now paused until a person resumes it in the dashboard. Do not retry; ask a person.",
"detail": { "budget": "sends_per_day", "limit": 500, "windowSeconds": 86400, "paused": true } } }
# Every agent send after that, until a person resumes it
→ 409
{ "error": {
"code": "agent_paused",
"message": "Agent sending from support@acme.io is paused. Daily budget reached: … It stays paused until a person resumes it in the dashboard. Do not retry; ask a person.",
"detail": { "pausedAt": "2026-11-10T08:30:00.000Z", "reason": "Daily budget reached: …" } } }
# Too many people on one message
→ 400
{ "error": { "code": "agent_too_many_recipients",
"message": "This message names 12 different recipients and this address lets an API key write to at most 10 per message. Send fewer, or split it.",
"detail": { "limit": 10, "count": 12 } } }
# A person resumes it (a key gets 403 agent_policy_session_only)
PATCH /v1/mailboxes/<id>
{ "agentPaused": false }The pause. When a daily budget trips, the address's agent sending is paused. Every later send through a key is 409 agent_paused, naming the stored reason and when it began (detail.pausedAt, detail.reason), however long the key waits. The owners and admins of the workspace get one notification in the bell, naming the address and opening its editor, where the resume button is (a second trip while it is already paused rings nothing). A message you scheduled with sendAt before the pause still goes at its time, because it was inside the budget when it was accepted; cancel it from the dashboard if it should not.
Only a person lifts it. Press Resume agent sending in the address's editor in the dashboard Inbox, or send { "agentPaused": false } to PATCH /v1/mailboxes/:id from a signed-in session. Resuming a pause that a daily budget caused starts a fresh count: sends from before the resume no longer count toward any of the budgets (they stay in your records), so the next send is not refused by the thing that paused it. Pause agent sending does the reverse by hand, with the reason "Paused by a person." and no notification, and resuming that pause keeps every count where it was, so pausing and resuming is never a way to a fresh day. A key that sends agentPaused, or any budget below, gets 403 agent_policy_session_only whichever address it names, so a key can neither raise its own budget nor resume itself.
The numbers are per address. Set agentSendsPerHour (up to 10,000), agentSendsPerDay (up to 100,000), agentRecipientsPerSend (up to 101) and agentDistinctRecipientsPerDay (up to 100,000) as positive whole numbers, or null to follow the default again, from a session with manage:mailboxes or in the same editor. Every mailbox response carries them as agentBudget (sendsPerHour … as set, null when following the default, plus defaults and effective — what a key is held to right now) and agentPaused ({ at, reason, source }, where source is budget or person, or null), so a program can read its own budget and whether it is paused before it tries. The budget and the pause belong to the address, not to the key. There is no ceiling on one key across addresses yet: a Full access key can create another address, which starts unpaused with its own budget. A new address starts on reply_only and a key cannot change that, so it can answer mail that arrives there and cannot start a conversation; a key scoped to one domain cannot create addresses on another. There is no budget on attachments, because a key cannot upload a file; it can only send ones a person already put on the address.
SendClipper can also pause every agent in a workspace at once, for example while an abuse report is looked into. Every send by an API key from any address then answers 409 agent_paused with detail.scope "workspace" and the reason, while your people, POST /v1/emails and your receipts keep sending. Each address's editor says so, and only SendClipper support lifts it.
Wait for a person to approve
A key's send can wait for a person instead of going out. It is checked exactly as above first (the pause, whom it may write to, the recipient limit and the budget, which it counts against), and only then held: a refusal stays a refusal, never a wait. Two things hold it. The key can ask, with requireApproval: true on either send route. Or the address can require it, with agentApproval:
| agentApproval | A key's send is held when |
|---|---|
off | Never, unless the key asked. The default, for every address. |
risky | It answers a message rated a high manipulation risk (agentRisk), or it goes to someone not yet in the conversation. A new message counts everyone as new. |
always | Every time. |
# A key asks for a person to look first
POST /v1/mailboxes/<id>/messages/<messageId>/reply
{ "to": "ana@customer.io", "subject": "Re: Refund", "body": "We will refund it.",
"requireApproval": true }
→ 202
{ "held": true, "emailId": null,
"message": { "id": "<held message id>", "folder": "drafts", … },
"approval": { "requestedAt": "2026-11-10T09:00:00.000Z", "reason": "requested",
"reasonText": "The agent asked for a person to approve this message before it is sent.",
"error": null, "replyToId": "<messageId>" } }
# Or the address holds a key's sends itself (Owner or Admin, signed in)
PATCH /v1/mailboxes/<id>
{ "agentApproval": "risky" } # "off" (default), "risky" or "always"
# An Owner or Admin releases it (session only), or throws it away
POST /v1/inbox/messages/<held message id>/approve → 201 { "approved": true, "emailId": "…", "message": { … } }
POST /v1/inbox/messages/<held message id>/discard → 200 { "discarded": true }A held send answers 202, not 201, and nothing has been sent. held is true, emailId is null, and approval.reason says why: requested, always, high_risk_parent or new_recipient, checked in that order. Do not send it again. It is already waiting, and a second send puts a second copy in front of the person, who may approve both. The owners and admins of the workspace get one notification in the bell per address per hour, opening the dashboard Inbox's Awaiting approval folder.
Only the Owner or an Admin releases it, signed in to the dashboard (Approve and send or Discard). A Developer gets 403 approval_owner_admin_only, an API key 401 api_key_not_accepted. Approving sends exactly what the key submitted, from the same address. It is then in Sent, the held message is gone, and a second press finds nothing (404). Every sending check is asked again at that moment. If one refuses (for example, sending is paused), nothing is sent, the message stays held with that refusal shown on it as approval.error, and it can be approved again once the cause is fixed. Discarding never sends it and does not give the send back to the budget.
While it waits, the key can read it with GET /v1/mailboxes/:id/messages/:messageId, which shows approval. After approval or discard that read is a 404. Nothing else can send, edit, move or delete it. Naming it as draftId, or changing it anywhere, is 409 message_awaiting_approval, and it does not appear in Drafts or in any list a key or a mailbox user reads. A held message cannot be scheduled: sendAt on a send that would be held is 400 approval_send_at_unsupported, so leave it out and it goes the moment it is approved. requireApproval from a signed-in person is 400 approval_agent_only, because a person's own sending is never held. Only an Owner or Admin changes agentApproval. A key that sends it gets 403 agent_policy_session_only, and any other member 403 approval_owner_admin_only.
Automatic replies
Mail an API key sends from an address says a machine wrote it, as RFC 3834 asks: Auto-Submitted: auto-replied on a reply and Auto-Submitted: auto-generated on a new message. Vacation responders then stay silent instead of answering your agent. A person's mail from the same address carries no such header.
A received message that said it was automatic shows autoSubmitted (auto-replied, auto-generated, …) on every read and in the mailbox.message.received webhook. It is null for ordinary mail. A key's reply to an auto-replied message (an out-of-office, or another agent's reply) is refused with 403 agent_reply_to_auto_reply, and nothing is sent or charged: two responders answering each other never stop. A reply to auto-generated mail, such as a notification or another agent's new message, is allowed, and a person may reply to anything.
Test an agent
An Owner or Admin can make an address a test address in the address's editor under Test address, or with agentTestSandboxId on PATCH /v1/mailboxes/:id. Everything sent from it is kept in one of your sandboxes instead of being delivered: an API key's send or reply, a held send someone approves, a scheduled send when it fires, and a person's own send too. Every agent check runs first, so the policy, the budget, the hold and the auto-reply rule behave exactly as they would for real. The sending checks after them do not run: a trapped message is never refused for an unverified domain, a suppressed recipient or a paused workspace.
A test then puts made-up mail into the address, as if from had written it. It goes through the real receiving path, so it is scored for manipulation, read by the code extractor, marked automatic when you pass autoSubmitted, threaded onto inReplyToId, and it wakes a mailbox.message.received webhook (with test: true). The answer is 202 with the new message's id.
# A person (Owner or Admin) makes the address a test address
PATCH /v1/mailboxes/<id>
{ "agentTestSandboxId": "<a sandbox id>" }
# The test puts a made-up message into it, through the real receiving path
POST /v1/mailboxes/<id>/test-messages
{ "from": "tester@made-up.example", "subject": "Your code", "text": "Your code is 482913." }
→ 202 { "id": "<message id>", "state": "queued" }
# The agent answers it as it would answer anyone
POST /v1/mailboxes/<id>/messages/<message id>/reply
{ "to": "tester@made-up.example", "subject": "Re: Your code", "body": "Thanks!" }
→ 201 { "emailId": null,
"trapped": { "sandboxId": "<sandbox id>", "sandboxMessageId": "<id>" },
"message": { "folder": "sent", "test": true, … } }- A trapped send answers
emailId: nullandtrapped. Its Sent copy is markedtest, and nothing reaches/logs, usage or your sending reputation. Read what would have gone out with the sandbox's messages. - Made-up mail cannot be put into an ordinary address (
409 mailbox_not_test_address). When an address stops being a test address, its made-up mail cannot be answered (409 message_is_test), and the made-up senders stop counting as people in the conversation. POST /v1/emailsand batch sends from a test address are refused with409 test_address_send_refused. Files cannot ride a test send yet (400 test_address_attachments_unsupported). The sandbox an address names cannot be deleted (409 sandbox_in_use).- Over MCP,
sandbox_inject_inboundputs the message in and waits for it, and a trapped send reads “TRAPPED — NOT SENT”.
Your agent is audited
Everything an API key does on an address through the routes above (/v1/mailboxes/:id/messages…) is a line on that address's Agent activity timeline in the dashboard, opened from the address in the Inbox. Each line names the key (its name and masked hint) and says, in one sentence, what it did: read a message, opened an attachment, looked up who to answer, sent, replied, scheduled, was held for approval, marked read or unread, moved or changed a message, or was refused, with the refusal's code and sentence, even though the refused request itself wrote nothing. When an Owner or Admin approves or discards a held send, that line names the person too.
- Opening the same message again within an hour adds to its line (×10) rather than writing ten. The same refusal repeated within a minute adds to its line too, and so does the same change to the same message (marking it read again, moving it to the same folder) within a minute. Listing, searching and waiting for mail are not recorded, and neither is a
404or a401. - Lines are kept for 30 days. Anyone who can read the address's mail in the dashboard can read its timeline and filter it by key, kind and day. Archiving the address keeps it; deleting the address for good deletes it, and so does moving its domain to another account (the mail moves, the old owner's timeline does not).
- An API key cannot read the timeline, edit a line of it or erase it. Its routes,
GET /v1/mailboxes/:id/agent-activityand…/agent-activity/keys, answer a key401 api_key_not_accepted, and a key'sDELETE /v1/mailboxes/:id/permanent(orDELETE /v1/domains/:id) is409 mailbox_has_agent_activitywhile the address has lines: a person deletes it from the dashboard. Build your agent as if a person will read every line. - Mail a key sends from an address, now, at its scheduled time or once a person approves it, is recorded with source
agentand the key's id. InGET /v1/emails/:iditsacceptedevent reads{ "via": "agent", "label": "Sent by an agent (support-bot)", "apiKeyId": "…" }, and the Emails screen shows "Sent by an agent" with the key's name. A person's own sends from the same address keep the mailbox origin, andPOST /v1/emailsis an API send, not on the timeline.
Mailbox users
Setting a password (10+ characters) lets a person sign in to that one address at /mail with no dashboard account at all (a support agent, a client). Removing it ends every live session within one request.
POST /v1/mailbox-auth/login
{ "address": "support@acme.io", "password": "…" }
→ { "token": "eyJ…", "expiresIn": "12h" }
GET /v1/mailbox/messages?folder=inbox Authorization: Bearer <mailbox token>
GET /v1/mailbox/messages/:id
PATCH /v1/mailbox/messages/:id { "unread": false, "starred": true, "folder": "archive" }
POST /v1/mailbox/send { "to", "subject", "body", "cc", "bcc", "replyToId", "fromAliasId" }
or { "to", "subject", "templateId", "variables", "fromAliasId" }
DELETE /v1/mailbox/messages/:id delete forever (the message must be in Trash)
POST /v1/mailbox/trash/empty delete everything in this address's Trash- The mailbox token is not a dashboard session: it opens nothing outside that address.
POST /v1/mailbox/sendhas nofromfield: the sender is always the signed-in address. A reply from a mailbox is one row that is both the Sent entry and an entry on the Emails screen. While an operator has paused the workspace's sending it answers409 workspace_sending_pausedwith the reason (the same refusalPOST /v1/inbox/sendgives the operator app); the mailbox app shows that message as-is rather than disabling Send ahead of time.- The mailbox app shows what the dashboard Inbox shows for that address: a Spam folder, how each message was checked and why it is in Spam, and the HTML body with its inline images.
PATCHwith{ "folder": "spam" }marks a message as spam and{ "folder": "inbox" }on a message in Spam marks it not spam, the same record the dashboard's move writes. An inline image is fetched with the mailbox token from the parts route under Attachments. - Wrong password, no password, archived and no-such-address are one identical refusal, deliberately.
GET /v1/mailbox/eventsis a Server-Sent Events stream of this address's arrivals, with the token in theAuthorizationheader (a browserEventSourcecannot send one; use a client that can). It sendsready({ "heartbeatMs" }) once, thenmessage.receivedwith{ "id", "folder" }for each new message (ids only; read the message withGET /v1/mailbox/messages/:id) and aheartbeatwhile nothing arrives. It ends withsession_endedwithin 30 seconds of sign-in being turned off. One address may hold 10 streams at once; the 11th is429 mailbox_events_limit. A stream can drop at any time, so keep polling as the fallback.
Aliases and the inbox limit
An alias is an extra address on a mailbox's own domain that delivers into that mailbox. An address belongs to one mailbox or one alias, never both, across every workspace (otherwise 409 mailbox_address_taken). A mailbox user can send from their own aliases with fromAliasId on POST /v1/mailbox/send (another mailbox's alias is 404); there is still no free from. Archiving a mailbox pauses its aliases (they route nothing and do not count), and restoring it brings them back.
A signed-in mailbox user can also manage their own aliases and create a separate inbox on their domain, optionally with a password so its owner can sign in. Creating one does not let them read its mail.
Each domain may hold a limited number of addresses (active mailboxes plus their aliases), set by the platform administrator. Every create past it answers 409 mailbox_limit_reached, for example "acme.io can have at most 10 inboxes and aliases. Ask your administrator to raise the limit." Restoring an archived mailbox counts as a create.
# An alias: hello@acme.io delivers into info@acme.io's mailbox
POST /v1/mailboxes/<info's id>/aliases
{ "localPart": "hello" }
→ { "id": "…", "address": "hello@acme.io", "mailboxId": "<info's id>", "active": true }
# How many addresses each domain holds, and its limit
GET /v1/mailbox-limits
→ { "domains": [{ "domain": "acme.io", "used": 4, "max": 10 }] }
# A mailbox user, signed in at /mail
GET /v1/mailbox/addresses → aliases, inboxes on the domain, usage
POST /v1/mailbox/aliases { "localPart": "hello" }
POST /v1/mailbox/inboxes { "localPart": "sales", "displayName": "Sales", "password": "…" }Attachments
Upload one file per request as multipart/form-data in a field named file, the moment it is chosen; the answer is { id, filename, contentType, sizeBytes }. Name the ids in attachmentIds on POST /v1/mailbox/send. Pass the ids already on the message in attached so the message total is checked while the person is still writing. A file that is never sent is deleted 24 hours after upload. Received files are listed under attachments on a message and download through the part routes; ?download=1 forces a download. To attach a file the address already has — one it received or sent — name its part id in fileIds on the send or on a draft instead: the server attaches the stored file as it is, so nothing is downloaded or uploaded again. Only files of that address on messages outside Drafts, Spam and Trash can be named (the list GET /v1/mailbox/files shows); any other id is 400 attachment_not_found. The size and count limits count these together with attachmentIds, and a file whose stored copy is gone is 409 file_attachment_missing, naming it. This is also how an API key attaches a file: it has no upload route. A received file larger than the per-file limit can't be opened here: the message still arrives, the file stays inside the original message (a mail app or a mailbox backup has it), and it is listed under omittedAttachments as { filename, contentType, sizeBytes, limitBytes, reason: "too_large" } with no part id (plus inline: true when it was a picture the body shows). The same list is on format=agent and agent-summary and on each message of the mailbox.message.received webhook, so an empty attachments is never read as "nothing was attached". A whole message larger than 48 MiB cannot be received at all: the address gets a message in its Inbox naming the sender and subject and saying it was too large to receive.
- At most 7 MiB per file and 7 MiB per message, and 20 files. Every limit is counted by the files' own size, the number a file dialog shows, not their size once encoded for email. Encoding makes a message about 37% larger in transit, so 7 MiB of files is about 9.8 MB on the wire, which Amazon SES, Azure and receiving servers take. A message the preferred sending provider cannot carry goes through another that can, or is refused before it is stored. Refusals are
413 attachment_too_largeand413 attachments_too_large, each naming the file and the limit. - One address (or one dashboard user) may hold at most 50 uploaded files, 250 MiB in all, that are not yet on a sent message or a saved draft; past that an upload is
409 attachment_staging_limit. Sending or saving the message the files are on frees the room. - Uploads are limited to 30 a minute per address, 20 at once, and 300 a minute per workspace; past that the answer is
429 rate_limitedwith aRetry-Afterheader anddetail.scopeattachment_upload.
Templates in the mailbox app
A template can be offered to the people who sign in to addresses on one or more domains: in the designer, Available in inboxes on, or PATCH /v1/templates/:id with { "domainIds": ["<domain id>"] } (the whole set, replaced). An id that is not one of the workspace's domains is 400 template_domain_not_found. The mailbox app then shows it under Templates as a rendered preview, and a new message can send it: POST /v1/mailbox/send takes templateId and variables instead of body, with exactly the refusals of a template send: 400 template_variables_missing names a missing tag, and a draft is 409 template_not_published.
- An address sees a template only when it is offered on that address's domain and is published, or was made from the mailbox app on that domain. Anything else, another domain's included, is
404 template_not_found, never a 403. - A mailbox user can design templates of their own with the same drag-and-drop designer, without the AI assistant. A template made there is offered on that address's domain and can be changed, published or deleted by any address on the same domain. One made in the dashboard is send-only in the mailbox app:
403 template_read_only. Which domains offer a template is never writable from the mailbox app. - Pictures upload through
POST /v1/mailbox/templates/assets, the same store, types and 6 MiB limit as the dashboard'sPOST /v1/templates/assets.
Read and send from a mail app
Once an Owner or Admin turns on Mail apps for an address (its editor in the Inbox) and the address has a mailbox password, the person who owns it can add it to Apple Mail, iPhone or iPad Mail, or Thunderbird. The user name is the full address (shown below as you@yourcompany.com) and the password is its mailbox password. The same settings, filled in for the address, are in the webmail under Address settings and in the dashboard's address editor.

- Open Mail and choose Mail › Add Account… in the menu bar.
- Choose Other Mail Account…, then Continue.
- Type your name, the email address
you@yourcompany.comand your mailbox password. Click Sign In. - Mail says it cannot verify the account and shows more fields. Set Account Type to
IMAP, Incoming Mail Server tosendclipper.com, Outgoing Mail Server tosendclipper.comand User Name toyou@yourcompany.com. Click Sign In, tick Mail, then Done. - If it does not connect: Mail › Settings › Accounts, pick the account, open Server Settings and untick Automatically manage connection settings. Incoming: port
993with Use TLS/SSL; outgoing: port465with Use TLS/SSL. Click Save.
For now the mail app shows the Inbox only; the other folders stay in the webmail. What you send from the app goes out and is filed under Sent in the webmail. If the app says it could not save a copy to Sent, the message has still been sent.
Outgoing mail also works on port 587 with STARTTLS, for an app or network that blocks 465.
An agent or an IMAP library (LangChain's or CrewAI's IMAP tools, Python's imaplib) signs in the same way, with an API key as the password: the user name is the address, the password sc_live_…. The key must cover the address (the whole workspace, its domain, or just that inbox) and Mail apps must be on. That session is the agent, not a person. Everything it sends follows the address's agent rules (who it may write to, its budget, approval, automatic replies, a test address), and what it opens, marks and sends is on the Agent activity timeline. A read-only key reads, opens every folder read-only and cannot send. Revoking the key ends its sessions.
Embed a mailbox
# 1. Allow your page to frame the mailbox (once)
PATCH /v1/mailboxes/<id>
{ "embedOrigins": ["https://app.acme.io"] }
# 2. On every page render, from your backend
POST /v1/mailboxes/<id>/embed-token
→ { "token": "eyJ…", "expiresIn": "1h" }
# 3. In the page
<iframe src="https://sendclipper.com/embed/mail?token=<token>"
style="width:100%;height:640px;border:0"></iframe>embedOriginsempty means not embeddable. Exact origins only, no wildcards, no paths;http://is accepted forlocalhostonly. The frame'sframe-ancestorspolicy is set from the token.- The token lives one hour and travels in the URL, so mint one per page render from your backend. Clearing the origins ends live embeds on their next request.
Back up and restore
The dashboard's Backup & restore page. The download is one mbox file (mboxrd) of every message one address (or the whole workspace) shows, oldest first: received mail byte for byte, our own sends and drafts rebuilt with their attachments. Each message carries X-SendClipper-Folder and Gmail's X-Gmail-Labels, so a restore puts it back in the same folder. folder limits it to one of inbox, sent, drafts, archive, spam, trash.
A restore is a multipart/form-data upload: file (an .mbox from Google Takeout, Thunderbird or Apple Mail, one .eml, or a .zip of either, up to 1 GiB), mailboxId (the address to restore into) and an optional folder for mail that names none (default inbox). The answer is 202 and the restore runs in the background; poll it by id for status and the imported, duplicates, skipped and failed counts.
- Owner and Admin only, session only: no API key reaches these routes. Where two-factor is required for the inbox, it is required here too.
- A message already in the address (same
Message-ID) is counted as a duplicate and not written again, so restoring a file twice, or restoring an export into the address it came from, adds nothing. - Restored mail is filed as received mail, even in Sent. It never appears in email logs, analytics or your usage, and sends no webhook or notification.
- Restores in one workspace run one at a time: a file uploaded while another restore is running is accepted and waits its turn (status
queued), up to five waiting (409 mail_import_queue_fullbeyond that). A file over the limit is413 mail_import_too_large; another workspace's address or restore id is404.
/v1/inbox/** and /v1/messages/** (two-factor required). Those routes serve the dashboard; integrate against /v1/mailboxes/**.Sandboxes
A sandbox is a trap inbox for a project: point your staging app at it and every message it sends is caught, parsed and shown (HTML, text, headers, raw source), and nothing is delivered. Trapped mail is not on the Emails screen, sends no webhooks and touches no reputation number. Each sandbox keeps its last 500 messages for 30 days; at the cap the oldest is dropped, never the newest refused.
| Field | Type | Description |
|---|---|---|
namerequired | string | 1 to 64 characters; becomes the slug. Unique per workspace (409 sandbox_name_taken). |
projectLabel | string | What it is for, up to 80 characters. |
color | #rrggbb | For the list. |
The SMTP host and port, username and password, the API token hint and the inbox address. The SMTP password can be read again any time; the API token is shown once, on creation and on reset.
Resets both credentials at once, with no grace period.
Renames; the slug, address and credentials never move.
Really deletes the sandbox, its messages and their archived source.
SMTP
The main door: a config change, no code change, reachable from any machine. Use the host and port from the Integration tab with AUTH PLAIN or LOGIN and the sandbox's username and password. Port 2525 speaks STARTTLS, and login is refused until the connection has upgraded. In nodemailer that is secure: false, requireTLS: true, in cURL --ssl-reqd. Every RCPT TO is accepted (up to 50 per message) and nothing is ever delivered onward; messages up to 25 MiB.
MAIL_HOST=<smtp host from the Integration tab>
MAIL_PORT=2525
MAIL_USERNAME=<sandbox username>
MAIL_PASSWORD=<sandbox password>
MAIL_ENCRYPTION=tlsThe JSON door
Exactly POST /v1/emails with a different token and path: the same body field for field (from, to, subject, html, text, templateId, variables, replyTo, attachments), the same 201 { id }. A project switches between the sandbox in staging and the real endpoint in production by changing two environment variables and no code. A marketing send (sendClass "marketing") gets the workspace's postal address in the footer exactly as the real door gives it (a template's {{postal_address}} filled, or one line appended), so what you see trapped is what production would send. One difference: with no address on file the sandbox never answers postal_address_missing; the message is trapped without the line, while the real door refuses. Add the address under Settings › Workspace before go-live. A marketing send also carries the one-click unsubscribe link the real door mints ({{unsubscribe_url}} filled on a template send, and the List-Unsubscribe headers in the trapped message's raw source), but clicking a trapped message's link answers “This was a test send” and suppresses nobody. A trapped message keeps its Reply-To and its files in the raw source; a message larger than the sandbox keeps (25 MiB) is refused with 413 sandbox_message_too_large.
curl -X POST https://sendclipper.com/v1/sandbox/emails \
-H "Authorization: Bearer sc_sbx_<sandbox token>" \
-H "Content-Type: application/json" \
-d '{ "from": "hello@send.acme.io", "to": "anyone@example.com",
"subject": "Test", "html": "<p>Caught.</p>" }'The address
Every sandbox has an address of the form <name>@inbox.sendclipper.com, shown on the Integration tab. Anything delivered there is trapped, so a third-party service you are integrating can send its real notifications to it. A name another workspace already holds gets a short suffix. The tab says whether the address is live yet.
Reading trapped mail
A summary is id, subject, fromAddress, fromName, toAddresses, snippet, sizeBytes, read, trappedAt; the detail adds ccAddresses, the SMTP envelope (envelopeFrom, envelopeTo, where a Bcc shows up), bodyHtml, bodyText (only when the message really carried a text part), headers, transport and clientIp. /raw is the original MIME as text/plain.
| Not this | That |
|---|---|
| A sandbox (this section) | A trap inbox. Mail goes nowhere. |
| The sending cap on a new workspace | A daily limit on real sends until a person on our side has reviewed the workspace (verify a domain, subscribe to a plan, have the Owner accept the terms, which a sign-up already does, then Request review on the dashboard). Past it, the send routes answer 403 sandbox_cap_reached. |
Workspace and team
Renames the workspace (name, 1 to 80 characters) and/or sets its postalAddress: free text, one address line per line, 10 to 500 characters, at most 8 lines. null or blank clears it. Both fields are also on GET. Every marketing message carries this address in its footer, and a marketing send with none on file is refused (Postal address). A bad address is 400 postal_address_invalid naming what was wrong, and nothing in the request is saved.
Messages sent this month against the plan, and the retention window.
A new workspace's daily sending allowance and how much of it is used today (the same figure the send routes enforce), plus conditions (domainVerified, billingReady, and termsAccepted: whether the workspace Owner has accepted the Terms of Service and the Acceptable Use Policy) and graduation: { state, requestedAt, reviewedAt, note }, where state is not_requested, requested, declined (with the reviewer's note) or approved.
Asks a person on our side to lift the cap. Allowed once every condition holds and sending is not paused; answers the status above with graduation.state = requested. The cap keeps counting until an operator approves; there is no self-serve way past it. 409 graduation_not_ready names what is missing in detail.missing; 409 workspace_already_graduated once the workspace is out. Asking again after a decline is accepted.
The signed-in person accepts the current Terms of Service and Acceptable Use Policy for their own account: { "acceptedTermsVersion": "2026-09-23" }, the version shown at the top of both pages. A sign-up accepts them on the register form; this route is for an account created before that. The workspace Owner's acceptance is one of the review conditions above. Answers { termsAcceptedAt, termsVersion, recorded } with 200, and recorded: false when the account already holds an acceptance (of any version), which is never overwritten; the answer then names what is on record. 400 terms_not_accepted for any other version.
Invite a member as Admin, Developer or Viewer. Owner is not invitable.
{ status: "ok", service: "mailplatform-api" }: a liveness check for your monitoring.
Error codes
Every named refusal is { error: { code, message, detail? } }. Codes are stable; messages may be reworded.
Authentication and access
| Code | Status | Meaning |
|---|---|---|
insufficient_role | 403 | Your role lacks the capability the route needs; detail names the roles that have it. |
api_key_scope_insufficient | 403 | The key's permission (read / sending / full) does not cover this route. |
api_key_domain_scope | 403 | A domain-scoped key used outside its domain. |
api_key_mailbox_scoped | 403 | A key limited to one inbox used outside that address's mail; detail.mailbox names the address. |
api_key_mailbox_unavailable | 403 | A key limited to one inbox whose address is archived; it works again once the address is restored. |
mfa_required | 403 | Only on deployments that require two-factor for the Inbox (INBOX_MFA_REQUIRED=on): reading mailbox mail from the dashboard without having set up two-factor. |
session_revoked | 401 | The session was signed out from another device or expired. |
invalid_credentials | 401 | Mailbox sign-in refused. |
mailbox_session_ended | 401 | A mailbox token whose address lost its password, was archived or was deleted. |
Sending
| Code | Status | Meaning |
|---|---|---|
domain_unknown | 403 | from is not on a domain of this workspace. |
domain_not_verified | 403 | DNS not yet confirmed for that domain. |
domain_failed | 403 | A sending record was found broken on the last check. |
domain_not_verified_for_sending_provider | 403 | Verified here, but not yet ready at the provider carrying SendClipper's outbound mail right now (Scaleway Transactional Email or Microsoft Azure). Publish that provider's records from the domain's DNS records (TEM_* or ACS_*), then run Check now. |
provider_sender_not_registered | 403 | Only while SendClipper sends through Microsoft Azure: the from address is not one Azure can send from for that domain yet (by default only donotreply@). The message names the address that can send. |
provider_recipient_limit | 400 | More recipients (To, Cc and Bcc together) on one message than the provider carrying it accepts: 50 through Amazon SES or Microsoft Azure, 10 through Scaleway Transactional Email. |
provider_attachment_count | 400 | Only while SendClipper sends through Scaleway Transactional Email: more than 10 attachments. |
provider_attachment_type | 400 | Same provider: an attachment of a type it does not accept (for example a zip); the message names the file. |
provider_message_too_large | 413 | The message and its attachments, once encoded, are larger than any provider that is switched on can carry: 10 MB through Microsoft Azure, 40 MB through Amazon SES, 2 MB through Scaleway. Measured on the message as it is sent, tracking links included. |
recipient_suppressed | 403 | The address is on the suppression list; detail.reason says why. |
sandbox_cap_reached | 403 | A new workspace's daily sending allowance is spent. |
postal_address_missing | 400 | A marketing send (sendClass marketing on POST /v1/emails or a batch item, a broadcast's send/test/schedule, an automation step) while the workspace has no postal address. Add one under Settings › Workspace (PATCH /v1/workspace postalAddress). In a batch it fails only the marketing items; a scheduled broadcast that comes due is held until an address is added; an automation step is recorded as failed with this message. Transactional mail never asks. |
postal_address_invalid | 400 | PATCH /v1/workspace with a postalAddress that is too short, too long, over 8 lines or contains control characters; the message says which. |
graduation_not_ready | 409 | POST /v1/workspace/graduation-request while a condition is outstanding or sending is paused; detail.missing lists domainVerified, billingReady, termsAccepted (the workspace Owner has not accepted the terms) and sendingPaused. |
registration_closed | 403 | POST /v1/auth/register while sign-up is by invitation only and the request carries no valid inviteCode. Checked before anything else, so nothing is created. |
terms_not_accepted | 400 | POST /v1/auth/register (or POST /v1/auth/terms-acceptance) without acceptedTermsVersion set to the current version of the Terms of Service and Acceptable Use Policy (missing, stale or not a string). detail.version is the value to send. On register it is checked before anything else, so nothing is created. |
workspace_already_graduated | 409 | A review request, approval or decline aimed at a workspace that has already left the sandbox. Leaving the sandbox is permanent. |
workspace_sending_paused | 409 | This workspace's sending is paused: by an operator, automatically when its bounce or complaint rate crossed the provider's critical line (see Usage › Automatic pause), because a subscription payment failed and was not fixed by the date the Owner was told, or because a graduated workspace's subscription ended. The message names the reason and what to do (for a billing pause, resolve it under Settings › Plan & billing and sending resumes on its own). Answered by POST /v1/emails, the batch door (whole request), a broadcast's send/test/schedule and a mailbox reply. A scheduled broadcast that comes due is held until resume; an automation step that tries to send is recorded as failed with this reason. |
batch_empty / batch_too_large | 400 | An empty array, or more than 500 items (detail.limit). |
validation_failed | None | Per-item, inside a batch response: the item's body failed validation. |
header_not_allowed / header_value_invalid | 400 | Only In-Reply-To and References may be set, and never with a line break. |
resend_not_failed / resend_body_expired / resend_already_in_flight / resend_attachment_missing | 409 | Send again refused; see Send again. |
Templates
| Code | Status | Meaning |
|---|---|---|
template_not_found | 404 | Unknown id or another workspace's template. |
template_not_published | 409 | A draft cannot be sent. |
template_variables_missing | 400 | detail.missing lists tags with no value and no fallback. |
template_variables_invalid | 400 | detail.unsafeLinks lists values used as a link that are not https, http or mailto. |
subject_required / subject_invalid | 400 | No subject anywhere, or one with a line break / over 998 characters. |
template_empty | 409 | Publishing a template with no blocks. |
invalid_blocks | 400 | An unknown block type or a refused link. |
broadcast_tags_unresolved | 400 | A broadcast body uses a tag outside the fixed vocabulary with no fallback. |
broadcast_company_fields_unresolved | 400 | A company merge field without a fallback has no value for some recipients; detail.gaps counts them. |
broadcast_audience_empty | 400 | A broadcast's audience has no subscribed contacts, so nothing would be sent. A scheduled one is moved back to draft. |
Requests
| Code | Status | Meaning |
|---|---|---|
rate_limited | 429 | Honour Retry-After; detail carries the limit that fired. |
idempotency_key_invalid | 400 | Empty, too long or non-ASCII Idempotency-Key. |
idempotency_key_in_flight | 409 | The first request with this key is still running. Retry the same key after Retry-After. |
idempotency_key_reused | 409 | Same key, different body. |
invalid_cursor | 400 | A tampered or expired pagination cursor. |
Domains, mailboxes and sandboxes
| Code | Status | Meaning |
|---|---|---|
region_immutable | 409 | The domain already holds messages; its region cannot change. |
mailbox_address_taken | 409 | That address exists somewhere on SendClipper. |
mailbox_catch_all_taken | 409 | The domain already has a catch-all. |
mailbox_archived | 409 | The address is archived; unarchive it first. |
mailbox_not_embeddable | 409 | No embedOrigins are set, so no embed token can be minted. |
mailbox_password_too_short | 400 | A mailbox password needs 10 characters. |
sandbox_name_taken | 409 | A sandbox with that name exists in this workspace. |
404, never 403. The API does not confirm that an object exists for someone else.