API reference
Send email from your app, and read what happened to it.
The AcornDispatch API sends email from your app and tells you what happened to it. It also manages people, streams, suppressions, webhooks and mailing drafts.
The base URL is https://api.acorndispatch.com. Every path starts with /api/v1 after it, and the samples show the full URL. Requests and answers are JSON, except the image upload.
- Send one message: Send an email.
- Send up to 500 in one call: Send a batch.
- Read what happened: Messages, or get events posted to you: Webhooks.
There is no SMTP endpoint. Send through the REST API only.
Send the API key in the Authorization header on every request:
Authorization: Bearer $ACORNDISPATCH_API_KEYA workspace Admin creates keys on the APIs & Keys page in AcornDispatch and picks the scopes of each. Every key starts with adn_. Keep the key in a server-side secret. No other auth header works.
A missing or wrong key gets 401 unauthorized. A key without the scope a route needs gets 403 forbidden. Where a route lists two scopes, either one works.
| Scope | In the app | Lets the key |
|---|---|---|
email:send | Send email | Send one email to one person from a stream. Also sends a batch, reads and lists messages, reads sending stats, lists streams and checks the suppressions of an address. |
streams:write | Manage streams | Create and edit streams. Also lists, pauses and resumes streams. |
topics:write | Manage topics | Create, edit and archive topics. |
suppressions:write | Manage suppressions | Check, add and lift the suppressions of an address. |
people:write | Manage people | Add, update and delete people by their id or email address. |
webhooks:write | Manage webhooks | Create, edit and delete webhooks. Also lists webhooks. |
mailings:write | Write drafts and send tests | Create and edit drafts. Send tests to workspace members and allowed addresses only. Prepare a schedule for a person to confirm. Also manages the variants of an A/B test. |
assets:write | Upload images | PNG, JPEG, GIF or WebP, up to 5 MB each. |
mailings:read | Read mailings | See drafts, scheduled and sent mailings. |
reports:read | Read results | Results of each mailing, and how healthy your sending is. Reads the report of a mailing. |
audiences:read | Read audiences | Audience names and how many people are in each. |
email:sendSend emailSend one email to one person from a stream. Also sends a batch, reads and lists messages, reads sending stats, lists streams and checks the suppressions of an address.streams:writeManage streamsCreate and edit streams. Also lists, pauses and resumes streams.topics:writeManage topicsCreate, edit and archive topics.suppressions:writeManage suppressionsCheck, add and lift the suppressions of an address.people:writeManage peopleAdd, update and delete people by their id or email address.webhooks:writeManage webhooksCreate, edit and delete webhooks. Also lists webhooks.mailings:writeWrite drafts and send testsCreate and edit drafts. Send tests to workspace members and allowed addresses only. Prepare a schedule for a person to confirm. Also manages the variants of an A/B test.assets:writeUpload imagesPNG, JPEG, GIF or WebP, up to 5 MB each.mailings:readRead mailingsSee drafts, scheduled and sent mailings.reports:readRead resultsResults of each mailing, and how healthy your sending is. Reads the report of a mailing.audiences:readRead audiencesAudience names and how many people are in each.
A key can prepare a schedule but never schedule or send a mailing. A person confirms that in AcornDispatch.
Every error has this form:
{ "error": { "code": "from_domain_not_allowed", "message": "The from domain is not the sending domain of the workspace." } }- Branch on
code, not onmessage. Message texts can change. recipient_inactivealso haserror.reason, and theMessageID,ToandSubmittedAtof the stored message at the top level.- A batch answers 200 and puts each refusal in its own entry. See Send a batch.
- A message that was accepted can still fail before it goes out. Its
statusis thenfailedwith afailure.code. See Failures.
Each code, its HTTP status and what it means are in the error table.
| Code | HTTP | Meaning |
|---|---|---|
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
unsupported_field | 422 | Cc or Bcc has a value, To holds more than one address, or a template send sets TrackOpens or TrackLinks. |
template_not_found | 422 | TemplateAlias names no template of the workspace. |
template_archived | 422 | TemplateAlias names a template that is archived. Nothing is stored. |
topic_not_found | 422 | Topic names no topic of the workspace. Nothing is stored. |
topic_archived | 409 or 422 | The topic is archived. A send that names it gets 422, and nothing is stored. A change to it gets 409. |
from_required | 422 | A template send has no From, the template has no sender, and the workspace has no default sender. |
from_invalid | 422 | From is not one valid mailbox. See From address. |
from_domain_not_allowed | 422 | The From domain is not the sending domain or a subdomain of it. |
sending_domain_taken | 409 | Another workspace uses the From domain. |
stream_required | 422 | A message of a batch has no MessageStream. A batch names the stream of every message; a single send without it uses the default transactional stream. |
stream_not_found | 422 | MessageStream, a stream value or a webhook's streams names no stream of the workspace. |
stream_archived | 422 | A send or a webhook's streams names an archived stream. A default stream is never archived. |
stream_reserved | 422 | A send, a PATCH, a pause or a resume names the Mailings or the Automations stream. Those two streams carry the workspace's mailings and automations. See Streams. |
stream_under_review | 409 | A resume names a stream that AcornDispatch paused while it reviews delivery. Only AcornDispatch resumes it. |
link_domain_missing | 422 | The message needs the workspace link domain, and the workspace has none. See Unsubscribe links and tracking. |
list_unsubscribe_not_allowed | 422 | Headers sets List-Unsubscribe or List-Unsubscribe-Post on a broadcast stream. AcornDispatch sets both there. |
recipient_inactive | 422 | The recipient cannot get this message. error.reason is suppressed, address_not_found or unsubscribed. The message is stored as skipped, so the answer also has its MessageID, To and SubmittedAt. |
idempotency_conflict | 409 | The Idempotency-Key was used with a different request. See Idempotency. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
validation_failed | 422 | A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule. |
conflict | 409 | The change does not fit the current state, for example an edit of a mailing that is no longer a draft. |
stream_key_taken | 409 | Another stream of the workspace has this key. Archived streams count. |
stream_key_invalid | 422 | The stream key breaks the key rule. See the stream object. |
stream_key_immutable | 422 | The key of a stream never changes after the stream is created. |
stream_kind_immutable | 422 | A stream cannot change its kind. |
stream_auto_pause_transactional | 422 | Only a broadcast stream can have auto_pause. |
address_not_allowed | 422 | A mailing test send names an address that is not a workspace member or on the test list. The send routes never answer it. |
internal_error | 500 | Something failed on our side. Retry with the same Idempotency-Key. In a batch, only that entry has it. |
topic_key_invalid | 422 | The topic key breaks the key rule. See the topic object. |
topic_key_taken | 409 | Another topic of the workspace has this key. Archived topics count. |
topic_key_fixed | 409 | The key of a topic never changes after the topic is created. |
topic_default_fixed | 409 | default_subscribed cannot change once the topic covers email or a person has made a choice. |
invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.unsupported_field422CcorBcchas a value,Toholds more than one address, or a template send setsTrackOpensorTrackLinks.template_not_found422TemplateAliasnames no template of the workspace.template_archived422TemplateAliasnames a template that is archived. Nothing is stored.topic_not_found422Topicnames no topic of the workspace. Nothing is stored.topic_archived409 or 422The topic is archived. A send that names it gets 422, and nothing is stored. A change to it gets 409.from_required422A template send has noFrom, the template has no sender, and the workspace has no default sender.from_invalid422Fromis not one valid mailbox. See From address.from_domain_not_allowed422TheFromdomain is not the sending domain or a subdomain of it.sending_domain_taken409Another workspace uses theFromdomain.stream_required422A message of a batch has noMessageStream. A batch names the stream of every message; a single send without it uses the default transactional stream.stream_not_found422MessageStream, astreamvalue or a webhook'sstreamsnames no stream of the workspace.stream_archived422A send or a webhook'sstreamsnames an archived stream. A default stream is never archived.stream_reserved422A send, aPATCH, a pause or a resume names the Mailings or the Automations stream. Those two streams carry the workspace's mailings and automations. See Streams.stream_under_review409A resume names a stream that AcornDispatch paused while it reviews delivery. Only AcornDispatch resumes it.link_domain_missing422The message needs the workspace link domain, and the workspace has none. See Unsubscribe links and tracking.list_unsubscribe_not_allowed422HeaderssetsList-UnsubscribeorList-Unsubscribe-Poston a broadcast stream. AcornDispatch sets both there.recipient_inactive422The recipient cannot get this message.error.reasonissuppressed,address_not_foundorunsubscribed. The message is stored as skipped, so the answer also has itsMessageID,ToandSubmittedAt.idempotency_conflict409TheIdempotency-Keywas used with a different request. See Idempotency.payload_too_large413The body is over the route's limit. See Body size.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.validation_failed422A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule.conflict409The change does not fit the current state, for example an edit of a mailing that is no longer a draft.stream_key_taken409Another stream of the workspace has this key. Archived streams count.stream_key_invalid422The stream key breaks the key rule. See the stream object.stream_key_immutable422The key of a stream never changes after the stream is created.stream_kind_immutable422A stream cannot change its kind.stream_auto_pause_transactional422Only a broadcast stream can haveauto_pause.address_not_allowed422A mailing test send names an address that is not a workspace member or on the test list. The send routes never answer it.internal_error500Something failed on our side. Retry with the sameIdempotency-Key. In a batch, only that entry has it.topic_key_invalid422The topic key breaks the key rule. See the topic object.topic_key_taken409Another topic of the workspace has this key. Archived topics count.topic_key_fixed409The key of a topic never changes after the topic is created.topic_default_fixed409default_subscribedcannot change once the topic covers email or a person has made a choice.
- Each key may make 60 requests per minute, counted per clock minute. Every route has this limit except the two send routes.
POST /api/v1/emailandPOST /api/v1/email/batchhave no request limit. AcornDispatch paces the delivery itself.- Over the limit, a route answers 429
rate_limitedwith aretry-afterheader in seconds. Wait that long, then retry. - A request counts once its key is valid, also when it then fails, for example on a missing scope.
GET /api/v1/messages and GET /api/v1/mailings answer one page at a time:
{ "data": [ ... ], "next_cursor": "MjAyNi0xMS0xMF..." }limitsets the page size: 1 to 100 on messages (default 20), 1 to 100 on mailings.- For the next page, send
cursorwith thenext_cursorof the previous page and the same filters. next_cursorisnullon the last page. Treat it as opaque text.- A cursor that AcornDispatch did not make gets 400
invalid_request. - The other lists (streams, webhooks, audiences) answer
{ "data": [ ... ] }in one page.
Send an Idempotency-Key header on POST /api/v1/email and POST /api/v1/email/batch to make a retry safe. Use a value that is unique per message in your app, for example password-reset:<token id>.
- The value is 1 to 255 visible ASCII characters with no spaces. Anything else gets 400
invalid_request. - The same key with the same request returns the first answer: the same
MessageIDandSubmittedAt. Nothing is sent again. A first answer ofrecipient_inactivecomes back again too. - The same key with a different request gets 409
idempotency_conflict. Every field counts, including theFeedback-IDheader. The order ofMetadatakeys does not. - A key belongs to one workspace. It stays in use while AcornDispatch keeps the message record (13 months).
- Without the header, every request is a new message. A retry after a timeout can then send twice.
- In a batch the key counts per position. Send the same batch again with the same key, and each entry returns the
MessageIDit got the first time. Keep the same messages in the same order. A batch key never matches a single send with the same key.
- One mailbox:
addrorName <addr>. Two addresses, a group or a line break gets 422from_invalid. - The domain must be the workspace sending domain or a subdomain of it, such as
mail.acme.examplewhen the sending domain isacme.example. Another domain gets 422from_domain_not_allowed. - A domain that another workspace uses gets 409
sending_domain_taken. Fromis at most 320 characters. Above it: 400invalid_request.- AcornDispatch writes the
Fromheader again from the name and address it read, and quotes the name when needed.
The check is strict (RFC 5322). Put a display name in double quotes when it holds one of , ; : @ ( ) < > [ ] " or \. A . may stay unquoted.
| From | Result |
|---|---|
Smith, Jane <jane@mail.acme.example> | 422 from_invalid: put the name in double quotes |
"Smith, Jane" <jane@mail.acme.example> | Accepted |
"ana@client.example via Acme" <notify@mail.acme.example> | Accepted |
Jane Q. Smith <notify@mail.acme.example> | Accepted |
Smith, Jane <jane@mail.acme.example>422from_invalid: put the name in double quotes"Smith, Jane" <jane@mail.acme.example>Accepted"ana@client.example via Acme" <notify@mail.acme.example>AcceptedJane Q. Smith <notify@mail.acme.example>Accepted
In Python, email.utils.formataddr(("Ana, Acme Support", "notify@mail.acme.example")) quotes the name for you. In JavaScript, put the name in double quotes and escape \ and " inside it.
| Route | Largest body | Above it |
|---|---|---|
POST /api/v1/email | 10 MB | 413 payload_too_large |
POST /api/v1/email/batch | 16 MB | 413 payload_too_large |
POST /api/v1/assets | See Images | 413 payload_too_large |
PUT /api/v1/customers/{identifier} | 1 MB | 413 payload_too_large |
| Every other route with a JSON body | 4 MB | 413 payload_too_large |
POST /api/v1/email10 MB413payload_too_largePOST /api/v1/email/batch16 MB413payload_too_largePOST /api/v1/assetsSee Images413payload_too_largePUT /api/v1/customers/{identifier}1 MB413payload_too_large- Every other route with a JSON body4 MB413
payload_too_large
- The size is checked from
Content-Lengthbefore the body is read. - The attachments of one message are at most 10 MB in all, decoded. Above it: 400
invalid_request. - Attachments travel as base64, which adds a third to their size, and the body cap counts the whole JSON body. So one
POST /api/v1/emailcarries about 7.5 MB of attachments at most, decoded. Send a larger one in a batch. - In a batch, the 16 MB is for every item together, and each message keeps its own 10 MB attachment cap.
Each stream has a kind: transactional (mail a person needs: sign-in, receipts, notices) or broadcast (newsletters, announcements).
- Put
{{{ unsubscribe_url }}}where the link goes, inHtmlBody,TextBodyor both, for example<a href="{{{ unsubscribe_url }}}">Unsubscribe</a>. AcornDispatch puts in the message's own link, on every stream kind. Spaces inside the braces are optional. - The link turns off the email's topic: the
Topicyour app named, else a topic of its template or its stream. See Topics and spam reports. - An email with no topic gets an unsubscribe from all broadcast mail. Transactional mail keeps sending.
- On a broadcast stream, a part without the placeholder gets a small footer: an Unsubscribe link and, when the workspace has one set, its postal address. The HTML footer goes before
</body>.HtmlBodyandTextBodyare checked one by one. - Broadcast mail also gets the one-click unsubscribe headers. A message that sets
List-UnsubscribeorList-Unsubscribe-Postthere gets 422list_unsubscribe_not_allowed. - A transactional stream gets no footer, and AcornDispatch adds no unsubscribe headers. Your app may set its own: see Headers AcornDispatch owns.
- Commercial email must carry the sender's postal address (CAN-SPAM in the United States, and similar laws elsewhere). Put it in the HTML your app sends for broadcast mail. AcornDispatch does not refuse a message without one.
- A message needs the workspace link domain when it is on a broadcast stream, has the placeholder in either body, or has an
HtmlBodywithTrackOpensorTrackLinkson. - A template send needs it on a broadcast stream or on a stream that tracks.
- Without a link domain, such a message gets 422
link_domain_missing.
TrackOpensadds an open pixel to the HTML part.TrackLinksrewrites the links of the HTML part. A text-only message is never tracked.- With link tracking off, the HTML goes out byte for byte as you sent it, apart from the placeholder, the footer and the open pixel.
- A template send, and every other message on the stream, is tracked as the stream's
track_opensandtrack_linkssay. - Never track sign-in, password reset or verification mail. Link tracking stores each rewritten URL, so a secret link would be stored. Send
"TrackLinks": "None"and"TrackOpens": falseon that mail, so a stream default cannot turn them on.
AcornDispatch checks suppressions and unsubscribes when it accepts a message and again when it sends it. A recipient blocked at accept gets 422 recipient_inactive. A block that comes later ends the message as skipped.
A recipient who turned off a topic of the message counts as unsubscribed: error.reason and skip_reason say unsubscribed.
A topic is a kind of email that a person can turn off. Give every email a topic, transactional and broadcast. Use one topic per kind of email, and name it when you send: "Topic": "weekly-summary".
A topic on a whole stream covers every email of that stream. Give each kind of email its own topic with Topic.
- AcornDispatch stops all email from your workspace to that person, transactional and broadcast. It shows as a spam report on the Suppressions page.
- It also turns off every topic of the email they reported, transactional ones included.
- A team member can remove the spam report on the Suppressions page. Email starts again, and the topics it turned off turn back on.
Who can turn a topic back on, and what happens when spam reports rise: Topics guide.
- Send one message to an address you control with
POST /api/v1/emailand anIdempotency-Key. - Send the same request again. The
MessageIDmust be the same. - Read it with
GET /api/v1/messages/{id}untilstatusisdelivered, or read why it isskipped,bouncedorfailed. - If you use webhooks, check that your endpoint got the
Deliveryevent and that your signature check passes. Then change one byte of the body in a test and check that it fails. - On a broadcast stream, open the message and check the unsubscribe link and the postal address.
POST/
Needsemail:send
Sends one message to one recipient. 200 means AcornDispatch stored the message and queued it. Delivery comes later: read it on the message or get it by webhook.
- Send
TemplateAlias, or at least one ofHtmlBodyandTextBody. Both, or neither, gets 400invalid_request. TemplateModel,IdentifiersandSendAtneedTemplateAlias. Without it they get 400invalid_request.- A template send refuses
TrackOpensandTrackLinkswith 422unsupported_field: the stream decides. - In a template send,
FromandSubjectare optional.
Body
| Field | Type | Required | Note |
|---|---|---|---|
From | string | Yes | One mailbox on your sending domain or a subdomain of it: addr or Name <addr>. See From address. Optional in a template send. |
To | string | Yes | Exactly one address: addr or Name <addr>, at most 320 characters. A list or a group gets 422 unsupported_field. Send one message per recipient. |
Cc | string or array | No | Not supported. A value gets 422 unsupported_field. null, "" and [] are ignored. |
Bcc | string or array | No | Not supported, as Cc. |
Subject | string | Yes | At most 2,000 characters, one line: no control characters except tab. Optional in a template send, where it replaces the template's subject. |
HtmlBody | string | One of | At least one of HtmlBody and TextBody, unless you send TemplateAlias. Sent as you wrote it: no template language runs on it, so braces are safe. |
TextBody | string | One of | Sent as you wrote it. |
ReplyTo | string | No | One address: addr or Name <addr>. In a template send it replaces the template's reply-to. |
Headers | array | No | At most 20 headers, each name once in any case. Some names are refused, and three have their own rules: see Headers AcornDispatch owns. |
Headers.Name | string | Yes | A letter or digit first, then letters, digits and hyphens. At most 64 characters. |
Headers.Value | string | Yes | At most 998 characters, no line breaks. |
Tag | string | No | At most 1,000 characters, one line. Stored on the message, read back on it and sent in webhooks. |
Metadata | object | No | A flat object of string values: at most 20 keys, each key 1 to 80 characters, each value at most 1,000 characters, one line each. Stored on the message, read back on it and sent in webhooks. |
MessageStream | string | No | A stream key. Not sent: the default transactional stream of the workspace. Unknown: 422 stream_not_found. Archived: 422 stream_archived. The Mailings or Automations stream: 422 stream_reserved. |
TrackOpens | boolean | No | Not sent, or null: the stream's track_opens. Adds an open pixel to the HTML part only. A template send refuses it. |
TrackLinks | string: None, HtmlAndText, HtmlOnly or TextOnly | No | Not sent, or null: the stream's track_links. Links are rewritten in the HTML part only: HtmlAndText and TextOnly act as HtmlOnly, and links in TextBody are never tracked. A template send refuses it. |
Attachments | array | No | At most 20 files, 10 MB in all, decoded. |
Attachments.Name | string | Yes | The file name. Unique in the message, at most 255 characters, with no / or \. |
Attachments.Content | string | Yes | The file as base64. |
Attachments.ContentType | string | Yes | The media type, for example application/pdf. |
Attachments.ContentID | string | No | For an inline image. A cid: prefix is removed. |
DisableMessageRetention | boolean | No | true: the body is not kept. It is cleared when the send ends, and the message page never shows it. The message itself (recipient, subject, status, events) is kept as usual. Use it for email that carries a secret, such as a sign-in code. |
TemplateAlias | string | No | The key of a template the workspace keeps in AcornDispatch, at most 64 characters. Sends that template in place of a body: see Send with a template. |
TemplateModel | object | No | Template send only. The data the template reads. |
Identifiers | object | No | Template send only. Links the message to a person who exists in the workspace. Send id, email or both. |
Identifiers.id | string | One of | Your app's id of the person, 1 to 255 characters. |
Identifiers.email | string | One of | The person's address, 1 to 255 characters. |
SendAt | string | No | Template send only. An ISO 8601 time with a zone, within 90 days, for example 2026-11-20T09:00:00Z. A time in the past sends now. |
Topic | string | No | The topic key, 1 to 64 characters. It replaces the topics of the stream and the template for this email. Give each kind of email its own topic. Unknown: 422 topic_not_found. Archived: 422 topic_archived. Nothing is stored for either. |
Fromstring, requiredOne mailbox on your sending domain or a subdomain of it:addrorName <addr>. See From address. Optional in a template send.Tostring, requiredExactly one address:addrorName <addr>, at most 320 characters. A list or a group gets 422unsupported_field. Send one message per recipient.Ccstring or array, optionalNot supported. A value gets 422unsupported_field.null,""and[]are ignored.Bccstring or array, optionalNot supported, asCc.Subjectstring, requiredAt most 2,000 characters, one line: no control characters except tab. Optional in a template send, where it replaces the template's subject.HtmlBodystring, one of requiredAt least one ofHtmlBodyandTextBody, unless you sendTemplateAlias. Sent as you wrote it: no template language runs on it, so braces are safe.TextBodystring, one of requiredSent as you wrote it.ReplyTostring, optionalOne address:addrorName <addr>. In a template send it replaces the template's reply-to.Headersarray, optionalAt most 20 headers, each name once in any case. Some names are refused, and three have their own rules: see Headers AcornDispatch owns.Headers.Namestring, requiredA letter or digit first, then letters, digits and hyphens. At most 64 characters.Headers.Valuestring, requiredAt most 998 characters, no line breaks.Tagstring, optionalAt most 1,000 characters, one line. Stored on the message, read back on it and sent in webhooks.Metadataobject, optionalA flat object of string values: at most 20 keys, each key 1 to 80 characters, each value at most 1,000 characters, one line each. Stored on the message, read back on it and sent in webhooks.MessageStreamstring, optionalA stream key. Not sent: the default transactional stream of the workspace. Unknown: 422stream_not_found. Archived: 422stream_archived. The Mailings or Automations stream: 422stream_reserved.TrackOpensboolean, optionalNot sent, ornull: the stream'strack_opens. Adds an open pixel to the HTML part only. A template send refuses it.TrackLinksstring, optionalNot sent, ornull: the stream'strack_links. Links are rewritten in the HTML part only:HtmlAndTextandTextOnlyact asHtmlOnly, and links inTextBodyare never tracked. A template send refuses it.string:None,HtmlAndText,HtmlOnlyorTextOnlyAttachmentsarray, optionalAt most 20 files, 10 MB in all, decoded.Attachments.Namestring, requiredThe file name. Unique in the message, at most 255 characters, with no/or\.Attachments.Contentstring, requiredThe file as base64.Attachments.ContentTypestring, requiredThe media type, for exampleapplication/pdf.Attachments.ContentIDstring, optionalFor an inline image. Acid:prefix is removed.DisableMessageRetentionboolean, optionaltrue: the body is not kept. It is cleared when the send ends, and the message page never shows it. The message itself (recipient, subject, status, events) is kept as usual. Use it for email that carries a secret, such as a sign-in code.TemplateAliasstring, optionalThe key of a template the workspace keeps in AcornDispatch, at most 64 characters. Sends that template in place of a body: see Send with a template.TemplateModelobject, optionalTemplate send only. The data the template reads.Identifiersobject, optionalTemplate send only. Links the message to a person who exists in the workspace. Sendid,emailor both.Identifiers.idstring, one of requiredYour app's id of the person, 1 to 255 characters.Identifiers.emailstring, one of requiredThe person's address, 1 to 255 characters.SendAtstring, optionalTemplate send only. An ISO 8601 time with a zone, within 90 days, for example2026-11-20T09:00:00Z. A time in the past sends now.Topicstring, optionalThe topic key, 1 to 64 characters. It replaces the topics of the stream and the template for this email. Give each kind of email its own topic. Unknown: 422topic_not_found. Archived: 422topic_archived. Nothing is stored for either.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
unsupported_field | 422 | Cc or Bcc has a value, To holds more than one address, or a template send sets TrackOpens or TrackLinks. |
from_invalid | 422 | From is not one valid mailbox. See From address. |
from_domain_not_allowed | 422 | The From domain is not the sending domain or a subdomain of it. |
sending_domain_taken | 409 | Another workspace uses the From domain. |
from_required | 422 | A template send has no From, the template has no sender, and the workspace has no default sender. |
template_not_found | 422 | TemplateAlias names no template of the workspace. |
template_archived | 422 | TemplateAlias names a template that is archived. Nothing is stored. |
topic_not_found | 422 | Topic names no topic of the workspace. Nothing is stored. |
topic_archived | 409 or 422 | The topic is archived. A send that names it gets 422, and nothing is stored. A change to it gets 409. |
stream_not_found | 422 | MessageStream, a stream value or a webhook's streams names no stream of the workspace. |
stream_archived | 422 | A send or a webhook's streams names an archived stream. A default stream is never archived. |
stream_reserved | 422 | A send, a PATCH, a pause or a resume names the Mailings or the Automations stream. Those two streams carry the workspace's mailings and automations. See Streams. |
link_domain_missing | 422 | The message needs the workspace link domain, and the workspace has none. See Unsubscribe links and tracking. |
list_unsubscribe_not_allowed | 422 | Headers sets List-Unsubscribe or List-Unsubscribe-Post on a broadcast stream. AcornDispatch sets both there. |
recipient_inactive | 422 | The recipient cannot get this message. error.reason is suppressed, address_not_found or unsubscribed. The message is stored as skipped, so the answer also has its MessageID, To and SubmittedAt. |
idempotency_conflict | 409 | The Idempotency-Key was used with a different request. See Idempotency. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
internal_error | 500 | Something failed on our side. Retry with the same Idempotency-Key. In a batch, only that entry has it. |
invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.unsupported_field422CcorBcchas a value,Toholds more than one address, or a template send setsTrackOpensorTrackLinks.from_invalid422Fromis not one valid mailbox. See From address.from_domain_not_allowed422TheFromdomain is not the sending domain or a subdomain of it.sending_domain_taken409Another workspace uses theFromdomain.from_required422A template send has noFrom, the template has no sender, and the workspace has no default sender.template_not_found422TemplateAliasnames no template of the workspace.template_archived422TemplateAliasnames a template that is archived. Nothing is stored.topic_not_found422Topicnames no topic of the workspace. Nothing is stored.topic_archived409 or 422The topic is archived. A send that names it gets 422, and nothing is stored. A change to it gets 409.stream_not_found422MessageStream, astreamvalue or a webhook'sstreamsnames no stream of the workspace.stream_archived422A send or a webhook'sstreamsnames an archived stream. A default stream is never archived.stream_reserved422A send, aPATCH, a pause or a resume names the Mailings or the Automations stream. Those two streams carry the workspace's mailings and automations. See Streams.link_domain_missing422The message needs the workspace link domain, and the workspace has none. See Unsubscribe links and tracking.list_unsubscribe_not_allowed422HeaderssetsList-UnsubscribeorList-Unsubscribe-Poston a broadcast stream. AcornDispatch sets both there.recipient_inactive422The recipient cannot get this message.error.reasonissuppressed,address_not_foundorunsubscribed. The message is stored as skipped, so the answer also has itsMessageID,ToandSubmittedAt.idempotency_conflict409TheIdempotency-Keywas used with a different request. See Idempotency.payload_too_large413The body is over the route's limit. See Body size.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".internal_error500Something failed on our side. Retry with the sameIdempotency-Key. In a batch, only that entry has it.
Example
curl -sS -X POST 'https://api.acorndispatch.com/api/v1/email' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: welcome:42' \
-d '{
"From": "",
"To": "",
"Subject": "Hello from AcornDispatch",
"HtmlBody": "<p>It works.</p>",
"TextBody": "It works.",
"MessageStream": "",
"Tag": "welcome",
"Metadata": {
"user_id": "42"
},
"TrackLinks": "None"
}'{
"To": "person@example.com",
"SubmittedAt": "2026-11-11T09:30:00.000Z",
"MessageID": "0b6f2c1e-5d4a-4c8e-9f3b-2a1d7e6c5b4a",
"ErrorCode": 0,
"Message": "OK"
}curl -sS -X POST 'https://api.acorndispatch.com/api/v1/email' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: welcome:42' \
-d '{
"From": "",
"To": "",
"Subject": "Hello from AcornDispatch",
"HtmlBody": "<p>It works.</p>",
"TextBody": "It works.",
"MessageStream": "",
"Tag": "welcome",
"Metadata": {
"user_id": "42"
},
"TrackLinks": "None"
}'{
"To": "person@example.com",
"SubmittedAt": "2026-11-11T09:30:00.000Z",
"MessageID": "0b6f2c1e-5d4a-4c8e-9f3b-2a1d7e6c5b4a",
"ErrorCode": 0,
"Message": "OK"
}MessageIDis a lower-case UUID. Store it: the message read, webhooks and idempotent replays all use it.Tois the address only, without a display name.- A refusal uses the error form of Errors. For
recipient_inactivethe message is stored as skipped, so the answer also has itsMessageID,ToandSubmittedAt. - Send an
Idempotency-Keyheader to make a retry safe: see Idempotency.
Field names are case-sensitive. A field that is not in the list gets 400 invalid_request ("Unknown field: X").
An empty string ("") counts as not sent for HtmlBody, TextBody, ReplyTo, Tag, MessageStream, TemplateAlias, TemplateModel, Identifiers and SendAt.
Cc and Bcc ignore "", null and []. Any other field refuses "" with 400 invalid_request: leave the field out, or send null. In a template send, From and Subject count "" as not sent too.
Send TemplateAlias in place of HtmlBody and TextBody to send a template the workspace keeps in AcornDispatch (Templates). The template is the content. The call names the recipient, the stream and the data.
{
"MessageStream": "password-resets",
"TemplateAlias": "password_reset",
"TemplateModel": { "name": "Ana", "reset_url": "https://acme.example/reset/abc" },
"To": "ana@example.com"
}TemplateAliasis the key of the template. An unknown key gets 422template_not_found. An archived template gets 422template_archived, and nothing is stored.TemplateModelis the data the template reads, asmessage_data(andtrigger), for example{{ message_data.name }}. Not sent:{}.MessageStreamworks as in a body send. Any stream can send any template. On a broadcast stream the message is broadcast mail: it gets the unsubscribe headers and, when the template has no{{ unsubscribe_url }}link, the footer (Unsubscribe links and tracking).Fromis optional. Sent: the From address rules apply. Not sent: the template's sender, else the workspace's default sender. With neither, the call gets 422from_required.SubjectandReplyToare optional. They replace the template's own.Headers,Tag,MetadataandAttachmentsfollow the rules of a body send.TagandMetadataare stored, read back on the message and sent in webhooks.Identifierslinks the message to a person who exists in the workspace, by your app's id (id) or by address (email). AcornDispatch never creates a person from a send.SendAtsends the message later, at most 90 days ahead. A time in the past sends now.- Tracking follows the stream's
track_opensandtrack_links, for every message on it. A stream that tracks needs the workspace link domain (422link_domain_missing). Keep sign-in, reset and verification email on a stream with link tracking off. - The answer is the answer of a body send: the same five fields and a UUID
MessageID. A template archived after the call ends the message asskippedwithskip_reasoncanceled. - How long AcornDispatch keeps the data you send is a setting of the template.
Headers refuses these names with 400 invalid_request: From, To, Cc, Bcc, Reply-To, Sender, Subject, Date, Message-ID, Return-Path, MIME-Version, Received, every Content-*, DKIM-*, Resent-* and X-AD-* name, every other List-Unsubscribe* name, and a few other reserved names. Three names have their own rules.
The mail servers that send your message write this header. AcornDispatch gives them up to two fields, and the servers fill the rest:
Feedback-ID: <identifier>:<stream key>:<server id>:<server name>- Your app may give the first field. Send one
Feedback-IDheader (the name in any case) whose value is one identifier: 1 to 32 characters fromA-Z,a-z,0-9,.,_and-, with no colon. It goes out with each.changed to-. Your value never goes out as a header of its own. - Any other value gets 400
invalid_request. - Without the header, the first field is the
Tag: each character outsideA-Z,a-z,0-9,_and-becomes-, and it is cut to 32 characters. With noTageither, the first field is empty. - The second field is the stream key of the message, with the same character rule. The sending servers can write their own value there instead, so do not rely on it.
- There is no workspace field. Mailbox providers such as Gmail report per sending domain, and each sending domain belongs to one workspace.
- The header is part of the request for idempotency: the same
Idempotency-Keywith anotherFeedback-IDgets 409idempotency_conflict.
For example, { "Name": "Feedback-ID", "Value": "reset.v2" } on the stream outbound goes out as Feedback-ID: reset-v2:outbound:<server id>:<server name>, or with the servers' own value in the second field.
- On a transactional stream your app may set them in
Headers(the names in any case). They go out with these names and your values. List-Unsubscribe: one or more<https:...>or<mailto:...>URIs, separated by commas.List-Unsubscribe-Post: exactlyList-Unsubscribe=One-Click, and only beside aList-Unsubscribethat has anhttps:URI (one-click unsubscribe, RFC 8058).- A value that breaks these rules gets 400
invalid_request. The message says which rule. - On a broadcast stream AcornDispatch sets both headers itself. A message that sets either one gets 422
list_unsubscribe_not_allowed. Leave them out and put{{{ unsubscribe_url }}}in the body for the link.
"Headers": [
{ "Name": "List-Unsubscribe", "Value": "<https://acme.example/unsubscribe/abc>, <mailto:unsubscribe@acme.example>" },
{ "Name": "List-Unsubscribe-Post", "Value": "List-Unsubscribe=One-Click" }
]POST/
Needsemail:send
Sends 1 to 500 messages in one call. The body is a JSON array; each message takes the fields of Send an email, and MessageStream is required. The answer is a JSON array with one result per message, in request order.
- A body that is not an array, an empty array or more than 500 messages gets 400
invalid_requestfor the whole request. - Every message names its stream in
MessageStream. A message without it gets 422stream_required; the other messages go on. - Send
TemplateAlias, or at least one ofHtmlBodyandTextBody. Both, or neither, gets 400invalid_request. TemplateModel,IdentifiersandSendAtneedTemplateAlias. Without it they get 400invalid_request.- A template send refuses
TrackOpensandTrackLinkswith 422unsupported_field: the stream decides. - In a template send,
FromandSubjectare optional.
Body
A JSON array of 1 to 500 items. Each item:
| Field | Type | Required | Note |
|---|---|---|---|
From | string | Yes | One mailbox on your sending domain or a subdomain of it: addr or Name <addr>. See From address. Optional in a template send. |
To | string | Yes | Exactly one address: addr or Name <addr>, at most 320 characters. A list or a group gets 422 unsupported_field. Send one message per recipient. |
Cc | string or array | No | Not supported. A value gets 422 unsupported_field. null, "" and [] are ignored. |
Bcc | string or array | No | Not supported, as Cc. |
Subject | string | Yes | At most 2,000 characters, one line: no control characters except tab. Optional in a template send, where it replaces the template's subject. |
HtmlBody | string | One of | At least one of HtmlBody and TextBody, unless you send TemplateAlias. Sent as you wrote it: no template language runs on it, so braces are safe. |
TextBody | string | One of | Sent as you wrote it. |
ReplyTo | string | No | One address: addr or Name <addr>. In a template send it replaces the template's reply-to. |
Headers | array | No | At most 20 headers, each name once in any case. Some names are refused, and three have their own rules: see Headers AcornDispatch owns. |
Headers.Name | string | Yes | A letter or digit first, then letters, digits and hyphens. At most 64 characters. |
Headers.Value | string | Yes | At most 998 characters, no line breaks. |
Tag | string | No | At most 1,000 characters, one line. Stored on the message, read back on it and sent in webhooks. |
Metadata | object | No | A flat object of string values: at most 20 keys, each key 1 to 80 characters, each value at most 1,000 characters, one line each. Stored on the message, read back on it and sent in webhooks. |
MessageStream | string | Yes | A stream key, required on every message of a batch. Not sent: 422 stream_required for that message. Unknown: 422 stream_not_found. Archived: 422 stream_archived. The Mailings or Automations stream: 422 stream_reserved. |
TrackOpens | boolean | No | Not sent, or null: the stream's track_opens. Adds an open pixel to the HTML part only. A template send refuses it. |
TrackLinks | string: None, HtmlAndText, HtmlOnly or TextOnly | No | Not sent, or null: the stream's track_links. Links are rewritten in the HTML part only: HtmlAndText and TextOnly act as HtmlOnly, and links in TextBody are never tracked. A template send refuses it. |
Attachments | array | No | At most 20 files, 10 MB in all, decoded. |
Attachments.Name | string | Yes | The file name. Unique in the message, at most 255 characters, with no / or \. |
Attachments.Content | string | Yes | The file as base64. |
Attachments.ContentType | string | Yes | The media type, for example application/pdf. |
Attachments.ContentID | string | No | For an inline image. A cid: prefix is removed. |
DisableMessageRetention | boolean | No | true: the body is not kept. It is cleared when the send ends, and the message page never shows it. The message itself (recipient, subject, status, events) is kept as usual. Use it for email that carries a secret, such as a sign-in code. |
TemplateAlias | string | No | The key of a template the workspace keeps in AcornDispatch, at most 64 characters. Sends that template in place of a body: see Send with a template. |
TemplateModel | object | No | Template send only. The data the template reads. |
Identifiers | object | No | Template send only. Links the message to a person who exists in the workspace. Send id, email or both. |
Identifiers.id | string | One of | Your app's id of the person, 1 to 255 characters. |
Identifiers.email | string | One of | The person's address, 1 to 255 characters. |
SendAt | string | No | Template send only. An ISO 8601 time with a zone, within 90 days, for example 2026-11-20T09:00:00Z. A time in the past sends now. |
Topic | string | No | The topic key, 1 to 64 characters. It replaces the topics of the stream and the template for this email. Give each kind of email its own topic. Unknown: 422 topic_not_found. Archived: 422 topic_archived. Nothing is stored for either. |
Fromstring, requiredOne mailbox on your sending domain or a subdomain of it:addrorName <addr>. See From address. Optional in a template send.Tostring, requiredExactly one address:addrorName <addr>, at most 320 characters. A list or a group gets 422unsupported_field. Send one message per recipient.Ccstring or array, optionalNot supported. A value gets 422unsupported_field.null,""and[]are ignored.Bccstring or array, optionalNot supported, asCc.Subjectstring, requiredAt most 2,000 characters, one line: no control characters except tab. Optional in a template send, where it replaces the template's subject.HtmlBodystring, one of requiredAt least one ofHtmlBodyandTextBody, unless you sendTemplateAlias. Sent as you wrote it: no template language runs on it, so braces are safe.TextBodystring, one of requiredSent as you wrote it.ReplyTostring, optionalOne address:addrorName <addr>. In a template send it replaces the template's reply-to.Headersarray, optionalAt most 20 headers, each name once in any case. Some names are refused, and three have their own rules: see Headers AcornDispatch owns.Headers.Namestring, requiredA letter or digit first, then letters, digits and hyphens. At most 64 characters.Headers.Valuestring, requiredAt most 998 characters, no line breaks.Tagstring, optionalAt most 1,000 characters, one line. Stored on the message, read back on it and sent in webhooks.Metadataobject, optionalA flat object of string values: at most 20 keys, each key 1 to 80 characters, each value at most 1,000 characters, one line each. Stored on the message, read back on it and sent in webhooks.MessageStreamstring, requiredA stream key, required on every message of a batch. Not sent: 422stream_requiredfor that message. Unknown: 422stream_not_found. Archived: 422stream_archived. The Mailings or Automations stream: 422stream_reserved.TrackOpensboolean, optionalNot sent, ornull: the stream'strack_opens. Adds an open pixel to the HTML part only. A template send refuses it.TrackLinksstring, optionalNot sent, ornull: the stream'strack_links. Links are rewritten in the HTML part only:HtmlAndTextandTextOnlyact asHtmlOnly, and links inTextBodyare never tracked. A template send refuses it.string:None,HtmlAndText,HtmlOnlyorTextOnlyAttachmentsarray, optionalAt most 20 files, 10 MB in all, decoded.Attachments.Namestring, requiredThe file name. Unique in the message, at most 255 characters, with no/or\.Attachments.Contentstring, requiredThe file as base64.Attachments.ContentTypestring, requiredThe media type, for exampleapplication/pdf.Attachments.ContentIDstring, optionalFor an inline image. Acid:prefix is removed.DisableMessageRetentionboolean, optionaltrue: the body is not kept. It is cleared when the send ends, and the message page never shows it. The message itself (recipient, subject, status, events) is kept as usual. Use it for email that carries a secret, such as a sign-in code.TemplateAliasstring, optionalThe key of a template the workspace keeps in AcornDispatch, at most 64 characters. Sends that template in place of a body: see Send with a template.TemplateModelobject, optionalTemplate send only. The data the template reads.Identifiersobject, optionalTemplate send only. Links the message to a person who exists in the workspace. Sendid,emailor both.Identifiers.idstring, one of requiredYour app's id of the person, 1 to 255 characters.Identifiers.emailstring, one of requiredThe person's address, 1 to 255 characters.SendAtstring, optionalTemplate send only. An ISO 8601 time with a zone, within 90 days, for example2026-11-20T09:00:00Z. A time in the past sends now.Topicstring, optionalThe topic key, 1 to 64 characters. It replaces the topics of the stream and the template for this email. Give each kind of email its own topic. Unknown: 422topic_not_found. Archived: 422topic_archived. Nothing is stored for either.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
unsupported_field | 422 | Cc or Bcc has a value, To holds more than one address, or a template send sets TrackOpens or TrackLinks. |
from_invalid | 422 | From is not one valid mailbox. See From address. |
from_domain_not_allowed | 422 | The From domain is not the sending domain or a subdomain of it. |
sending_domain_taken | 409 | Another workspace uses the From domain. |
from_required | 422 | A template send has no From, the template has no sender, and the workspace has no default sender. |
template_not_found | 422 | TemplateAlias names no template of the workspace. |
template_archived | 422 | TemplateAlias names a template that is archived. Nothing is stored. |
topic_not_found | 422 | Topic names no topic of the workspace. Nothing is stored. |
topic_archived | 409 or 422 | The topic is archived. A send that names it gets 422, and nothing is stored. A change to it gets 409. |
stream_not_found | 422 | MessageStream, a stream value or a webhook's streams names no stream of the workspace. |
stream_archived | 422 | A send or a webhook's streams names an archived stream. A default stream is never archived. |
stream_reserved | 422 | A send, a PATCH, a pause or a resume names the Mailings or the Automations stream. Those two streams carry the workspace's mailings and automations. See Streams. |
link_domain_missing | 422 | The message needs the workspace link domain, and the workspace has none. See Unsubscribe links and tracking. |
list_unsubscribe_not_allowed | 422 | Headers sets List-Unsubscribe or List-Unsubscribe-Post on a broadcast stream. AcornDispatch sets both there. |
recipient_inactive | 422 | The recipient cannot get this message. error.reason is suppressed, address_not_found or unsubscribed. The message is stored as skipped, so the answer also has its MessageID, To and SubmittedAt. |
idempotency_conflict | 409 | The Idempotency-Key was used with a different request. See Idempotency. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
internal_error | 500 | Something failed on our side. Retry with the same Idempotency-Key. In a batch, only that entry has it. |
stream_required | 422 | A message of a batch has no MessageStream. A batch names the stream of every message; a single send without it uses the default transactional stream. |
invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.unsupported_field422CcorBcchas a value,Toholds more than one address, or a template send setsTrackOpensorTrackLinks.from_invalid422Fromis not one valid mailbox. See From address.from_domain_not_allowed422TheFromdomain is not the sending domain or a subdomain of it.sending_domain_taken409Another workspace uses theFromdomain.from_required422A template send has noFrom, the template has no sender, and the workspace has no default sender.template_not_found422TemplateAliasnames no template of the workspace.template_archived422TemplateAliasnames a template that is archived. Nothing is stored.topic_not_found422Topicnames no topic of the workspace. Nothing is stored.topic_archived409 or 422The topic is archived. A send that names it gets 422, and nothing is stored. A change to it gets 409.stream_not_found422MessageStream, astreamvalue or a webhook'sstreamsnames no stream of the workspace.stream_archived422A send or a webhook'sstreamsnames an archived stream. A default stream is never archived.stream_reserved422A send, aPATCH, a pause or a resume names the Mailings or the Automations stream. Those two streams carry the workspace's mailings and automations. See Streams.link_domain_missing422The message needs the workspace link domain, and the workspace has none. See Unsubscribe links and tracking.list_unsubscribe_not_allowed422HeaderssetsList-UnsubscribeorList-Unsubscribe-Poston a broadcast stream. AcornDispatch sets both there.recipient_inactive422The recipient cannot get this message.error.reasonissuppressed,address_not_foundorunsubscribed. The message is stored as skipped, so the answer also has itsMessageID,ToandSubmittedAt.idempotency_conflict409TheIdempotency-Keywas used with a different request. See Idempotency.payload_too_large413The body is over the route's limit. See Body size.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".internal_error500Something failed on our side. Retry with the sameIdempotency-Key. In a batch, only that entry has it.stream_required422A message of a batch has noMessageStream. A batch names the stream of every message; a single send without it uses the default transactional stream.
Example
curl -sS -X POST 'https://api.acorndispatch.com/api/v1/email/batch' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: batch:42' \
-d '[
{
"From": "",
"To": "",
"Subject": "Batch message 1",
"HtmlBody": "<p>Message 1 of the batch.</p>",
"TextBody": "Message 1 of the batch.",
"MessageStream": "",
"TrackLinks": "None"
},
{
"From": "",
"To": "",
"Subject": "Batch message 2",
"HtmlBody": "<p>Message 2 of the batch.</p>",
"TextBody": "Message 2 of the batch.",
"MessageStream": "",
"TrackLinks": "None"
}
]'[
{
"To": "person@example.com",
"SubmittedAt": "2026-11-11T09:30:00.000Z",
"MessageID": "0b6f2c1e-5d4a-4c8e-9f3b-2a1d7e6c5b4a",
"ErrorCode": 0,
"Message": "OK"
},
{
"To": "person@example.com",
"SubmittedAt": "2026-11-11T09:30:00.000Z",
"MessageID": "7c1e9a2b-3f4d-4e5a-8b6c-9d0e1f2a3b4c",
"ErrorCode": 0,
"Message": "OK"
}
]curl -sS -X POST 'https://api.acorndispatch.com/api/v1/email/batch' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: batch:42' \
-d '[
{
"From": "",
"To": "",
"Subject": "Batch message 1",
"HtmlBody": "<p>Message 1 of the batch.</p>",
"TextBody": "Message 1 of the batch.",
"MessageStream": "",
"TrackLinks": "None"
},
{
"From": "",
"To": "",
"Subject": "Batch message 2",
"HtmlBody": "<p>Message 2 of the batch.</p>",
"TextBody": "Message 2 of the batch.",
"MessageStream": "",
"TrackLinks": "None"
}
]'[
{
"To": "person@example.com",
"SubmittedAt": "2026-11-11T09:30:00.000Z",
"MessageID": "0b6f2c1e-5d4a-4c8e-9f3b-2a1d7e6c5b4a",
"ErrorCode": 0,
"Message": "OK"
},
{
"To": "person@example.com",
"SubmittedAt": "2026-11-11T09:30:00.000Z",
"MessageID": "7c1e9a2b-3f4d-4e5a-8b6c-9d0e1f2a3b4c",
"ErrorCode": 0,
"Message": "OK"
}
]Each message is accepted on its own, so one bad message never stops the others. HTTP 200 does not mean every message was accepted.
[
{ "To": "ana@example.com", "SubmittedAt": "2026-11-11T09:30:00.000Z", "MessageID": "0b6f2c1e-5d4a-4c8e-9f3b-2a1d7e6c5b4a", "ErrorCode": 0, "Message": "OK" },
{ "ErrorCode": 422, "Message": "To takes exactly one address. Send one message per recipient.", "error": { "code": "unsupported_field", "message": "To takes exactly one address. Send one message per recipient." } }
]- An accepted message has
ErrorCode0. - A refused message has
ErrorCodeset to the HTTP status the single send would answer, aMessage, and theerrorobject of Errors. Forrecipient_inactiveit also hasMessageID,ToandSubmittedAt. - An unexpected failure of one message gives that entry
ErrorCode500 andinternal_error. - With an
Idempotency-Key, the key counts per position: see Idempotency.
GET/
Needsemail:send
Lists the messages of the workspace, newest first by submitted_at. It lists every message, not only those your app sent. Each item is the message object without events.
Query
| Field | Type | Required | Note |
|---|---|---|---|
status | string: queued, sending, sent, delivered, bounced, complained, skipped, failed or unknown | No | One or more values, separated by commas: status=bounced,complained. |
stream | string | No | A stream key. Unknown: 422 stream_not_found. |
tag | string | No | An exact Tag. Only messages your app sent have one: api messages and template sends. |
since | string | No | An ISO 8601 date-time with Z or an offset, such as 2026-11-01T00:00:00Z. Filters on submitted_at, included. Must be before until. |
until | string | No | An ISO 8601 date-time with Z or an offset, such as 2026-11-01T00:00:00Z. Filters on submitted_at, not included. |
limit | integer | No | 1 to 100. Default 20. |
cursor | string | No | The next_cursor of the previous page. Send the same filters with it. See Pagination. |
statusstring, optionalOne or more values, separated by commas:status=bounced,complained.string:queued,sending,sent,delivered,bounced,complained,skipped,failedorunknownstreamstring, optionalA stream key. Unknown: 422stream_not_found.tagstring, optionalAn exactTag. Only messages your app sent have one:apimessages and template sends.sincestring, optionalAn ISO 8601 date-time withZor an offset, such as2026-11-01T00:00:00Z. Filters onsubmitted_at, included. Must be beforeuntil.untilstring, optionalAn ISO 8601 date-time withZor an offset, such as2026-11-01T00:00:00Z. Filters onsubmitted_at, not included.limitinteger, optional1 to 100. Default 20.cursorstring, optionalThenext_cursorof the previous page. Send the same filters with it. See Pagination.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
stream_not_found | 422 | MessageStream, a stream value or a webhook's streams names no stream of the workspace. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.stream_not_found422MessageStream, astreamvalue or a webhook'sstreamsnames no stream of the workspace.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.
Example
curl -sS -G 'https://api.acorndispatch.com/api/v1/messages' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
--data-urlencode 'status=delivered,bounced' \
--data-urlencode 'limit=20'{
"data": [
{
"message_id": "0b6f2c1e-5d4a-4c8e-9f3b-2a1d7e6c5b4a",
"source": "api",
"stream": "outbound",
"to": "ana@example.com",
"from": "Acme <notify@mail.acme.example>",
"subject": "Reset your password",
"tag": "password-reset",
"metadata": {
"user_id": "42"
},
"status": "delivered",
"skip_reason": null,
"failure": null,
"submitted_at": "2026-11-11T09:30:00.000Z",
"sent_at": "2026-11-11T09:30:01.000Z",
"delivered_at": "2026-11-11T09:30:03.000Z",
"first_open_at": null,
"first_click_at": null,
"bounced_at": null,
"complained_at": null,
"bounce": null
},
{
"message_id": "7c1e9a2b-3f4d-4e5a-8b6c-9d0e1f2a3b4c",
"source": "api",
"stream": "outbound",
"to": "ben@example.com",
"from": "Acme <notify@mail.acme.example>",
"subject": "Your receipt",
"tag": "receipt",
"metadata": {
"order_id": "1001"
},
"status": "bounced",
"skip_reason": null,
"failure": null,
"submitted_at": "2026-11-10T14:00:00.000Z",
"sent_at": "2026-11-10T14:00:01.000Z",
"delivered_at": null,
"first_open_at": null,
"first_click_at": null,
"bounced_at": "2026-11-10T14:00:04.000Z",
"complained_at": null,
"bounce": {
"type": "hard",
"smtp_code": "550 5.1.1"
}
}
],
"next_cursor": null
}curl -sS -G 'https://api.acorndispatch.com/api/v1/messages' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
--data-urlencode 'status=delivered,bounced' \
--data-urlencode 'limit=20'{
"data": [
{
"message_id": "0b6f2c1e-5d4a-4c8e-9f3b-2a1d7e6c5b4a",
"source": "api",
"stream": "outbound",
"to": "ana@example.com",
"from": "Acme <notify@mail.acme.example>",
"subject": "Reset your password",
"tag": "password-reset",
"metadata": {
"user_id": "42"
},
"status": "delivered",
"skip_reason": null,
"failure": null,
"submitted_at": "2026-11-11T09:30:00.000Z",
"sent_at": "2026-11-11T09:30:01.000Z",
"delivered_at": "2026-11-11T09:30:03.000Z",
"first_open_at": null,
"first_click_at": null,
"bounced_at": null,
"complained_at": null,
"bounce": null
},
{
"message_id": "7c1e9a2b-3f4d-4e5a-8b6c-9d0e1f2a3b4c",
"source": "api",
"stream": "outbound",
"to": "ben@example.com",
"from": "Acme <notify@mail.acme.example>",
"subject": "Your receipt",
"tag": "receipt",
"metadata": {
"order_id": "1001"
},
"status": "bounced",
"skip_reason": null,
"failure": null,
"submitted_at": "2026-11-10T14:00:00.000Z",
"sent_at": "2026-11-10T14:00:01.000Z",
"delivered_at": null,
"first_open_at": null,
"first_click_at": null,
"bounced_at": "2026-11-10T14:00:04.000Z",
"complained_at": null,
"bounce": {
"type": "hard",
"smtp_code": "550 5.1.1"
}
}
],
"next_cursor": null
}GET/
Needsemail:send
Reads one message of the workspace with its events. Read it after a send until status is delivered, or to learn why it is skipped, bounced or failed.
Path
| Field | Type | Required | Note |
|---|---|---|---|
id | string | Yes | The MessageID of a send (any case), or the message_id of any message of the workspace. An id of another workspace gets 404 not_found. |
idstring, requiredTheMessageIDof a send (any case), or themessage_idof any message of the workspace. An id of another workspace gets 404not_found.
Errors
| Code | HTTP | When |
|---|---|---|
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.
Example
curl -sS 'https://api.acorndispatch.com/api/v1/messages/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"message_id": "0b6f2c1e-5d4a-4c8e-9f3b-2a1d7e6c5b4a",
"source": "api",
"stream": "outbound",
"to": "ana@example.com",
"from": "Acme <notify@mail.acme.example>",
"subject": "Reset your password",
"tag": "password-reset",
"metadata": {
"user_id": "42"
},
"status": "delivered",
"skip_reason": null,
"failure": null,
"submitted_at": "2026-11-11T09:30:00.000Z",
"sent_at": "2026-11-11T09:30:01.000Z",
"delivered_at": "2026-11-11T09:30:03.000Z",
"first_open_at": null,
"first_click_at": null,
"bounced_at": null,
"complained_at": null,
"bounce": null,
"events": [
{
"type": "send",
"subtype": null,
"machine": false,
"occurred_at": "2026-11-11T09:30:01.000Z"
},
{
"type": "delivery",
"subtype": null,
"machine": false,
"occurred_at": "2026-11-11T09:30:03.000Z"
}
]
}curl -sS 'https://api.acorndispatch.com/api/v1/messages/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"message_id": "0b6f2c1e-5d4a-4c8e-9f3b-2a1d7e6c5b4a",
"source": "api",
"stream": "outbound",
"to": "ana@example.com",
"from": "Acme <notify@mail.acme.example>",
"subject": "Reset your password",
"tag": "password-reset",
"metadata": {
"user_id": "42"
},
"status": "delivered",
"skip_reason": null,
"failure": null,
"submitted_at": "2026-11-11T09:30:00.000Z",
"sent_at": "2026-11-11T09:30:01.000Z",
"delivered_at": "2026-11-11T09:30:03.000Z",
"first_open_at": null,
"first_click_at": null,
"bounced_at": null,
"complained_at": null,
"bounce": null,
"events": [
{
"type": "send",
"subtype": null,
"machine": false,
"occurred_at": "2026-11-11T09:30:01.000Z"
},
{
"type": "delivery",
"subtype": null,
"machine": false,
"occurred_at": "2026-11-11T09:30:03.000Z"
}
]
}| Field | Meaning |
|---|---|
message_id | The MessageID of a message your app sent, else the AcornDispatch id of the message. |
source | api, template, mailing, automation or test. api is a message your app sent with a body; a template send through this API is template. |
stream | The stream key. The Mailings and Automations streams show here too. A message with no stream shows the default stream of its kind. |
to | The recipient address. |
from, subject | Set for api messages only, else null. |
tag, metadata | Set for the messages your app sends: api messages and template sends through this API. Else null. |
status | queued, sending, sent, delivered, bounced, complained, skipped, failed or unknown. |
skip_reason | With status skipped: suppressed, address_not_found or unsubscribed (the recipient is blocked), or stream_paused (the stream stayed paused for 7 days). Other messages of the workspace can show other reasons, such as canceled. Else null. |
failure | With status failed: { "code", "message" }. See Failures. Else null. |
submitted_at, sent_at, delivered_at, first_open_at, first_click_at, bounced_at, complained_at | ISO 8601 times, or null until it happens. |
bounce | The latest bounce of the message, else null. { "type", "smtp_code" }: type is hard, soft, policy or undetermined; smtp_code holds the codes of the receiving server only (for example 550 5.1.1), or null. |
events | Read a message only. Oldest first, each { "type", "subtype", "machine", "occurred_at" }. type is send, delivery, bounce, complaint, reject, delay, open, click or unsubscribe. machine is true for an open or click that AcornDispatch judged to be made by a machine (for example a mail scanner), not a person. |
message_idTheMessageIDof a message your app sent, else the AcornDispatch id of the message.sourceapi,template,mailing,automationortest.apiis a message your app sent with a body; a template send through this API istemplate.streamThe stream key. The Mailings and Automations streams show here too. A message with no stream shows the default stream of its kind.toThe recipient address.from,subjectSet forapimessages only, elsenull.tag,metadataSet for the messages your app sends:apimessages and template sends through this API. Elsenull.statusqueued,sending,sent,delivered,bounced,complained,skipped,failedorunknown.skip_reasonWith statusskipped:suppressed,address_not_foundorunsubscribed(the recipient is blocked), orstream_paused(the stream stayed paused for 7 days). Other messages of the workspace can show other reasons, such ascanceled. Elsenull.failureWith statusfailed:{ "code", "message" }. See Failures. Elsenull.submitted_at,sent_at,delivered_at,first_open_at,first_click_at,bounced_at,complained_atISO 8601 times, ornulluntil it happens.bounceThe latest bounce of the message, elsenull.{ "type", "smtp_code" }:typeishard,soft,policyorundetermined;smtp_codeholds the codes of the receiving server only (for example550 5.1.1), ornull.eventsRead a message only. Oldest first, each{ "type", "subtype", "machine", "occurred_at" }.typeissend,delivery,bounce,complaint,reject,delay,open,clickorunsubscribe.machineistruefor an open or click that AcornDispatch judged to be made by a machine (for example a mail scanner), not a person.
There is no bounces endpoint. To list bounced messages, use GET /api/v1/messages with status=bounced. To see what blocks an address, check its suppressions.
A message that was accepted can still fail before it goes out. It then has status failed and a failure.code:
| failure.code | Meaning |
|---|---|
render_failed | The message could not be built. |
send_failed | The message could not be sent. |
attachments_lost | The attachments were lost before sending. |
from_domain_not_allowed | The From domain was no longer allowed at send time. |
sending_domain_taken | The From domain moved to another workspace before the send. |
link_domain_missing | The workspace link domain was gone at send time. |
render_failedThe message could not be built.send_failedThe message could not be sent.attachments_lostThe attachments were lost before sending.from_domain_not_allowedTheFromdomain was no longer allowed at send time.sending_domain_takenTheFromdomain moved to another workspace before the send.link_domain_missingThe workspace link domain was gone at send time.
GET/
Needsemail:send
Counts the messages of the workspace that were sent in a time window, per sending group and per stream, with the reputation rates of each group.
Query
| Field | Type | Required | Note |
|---|---|---|---|
since | string | No | An ISO 8601 date-time with Z or an offset, such as 2026-11-01T00:00:00Z. Filters on sent_at, included. Not sent: 30 days before until. Must be before until. |
until | string | No | An ISO 8601 date-time with Z or an offset, such as 2026-11-01T00:00:00Z. Filters on sent_at, not included. Not sent: now. |
stream | string | No | A stream key: count that stream only, in its group. Unknown: 422 stream_not_found. |
sincestring, optionalAn ISO 8601 date-time withZor an offset, such as2026-11-01T00:00:00Z. Filters onsent_at, included. Not sent: 30 days beforeuntil. Must be beforeuntil.untilstring, optionalAn ISO 8601 date-time withZor an offset, such as2026-11-01T00:00:00Z. Filters onsent_at, not included. Not sent: now.streamstring, optionalA stream key: count that stream only, in its group. Unknown: 422stream_not_found.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
stream_not_found | 422 | MessageStream, a stream value or a webhook's streams names no stream of the workspace. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.stream_not_found422MessageStream, astreamvalue or a webhook'sstreamsnames no stream of the workspace.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.
Example
curl -sS -G 'https://api.acorndispatch.com/api/v1/stats' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
--data-urlencode 'since=2026-11-01T00:00:00Z' \
--data-urlencode 'until=2026-11-08T00:00:00Z'{
"since": "2026-11-01T00:00:00.000Z",
"until": "2026-11-08T00:00:00.000Z",
"marketing": {
"sent": 50250,
"delivered": 50150,
"bounced": 120,
"complained": 4,
"opened": 9800,
"clicked": 760,
"reputation": {
"bounce_rate": 0.0016,
"complaint_rate": 0.0009,
"as_of": "2026-11-08T05:00:00.000Z"
}
},
"transactional": {
"sent": 3900,
"delivered": 3890,
"bounced": 12,
"complained": 0,
"opened": 1200,
"clicked": 300,
"reputation": {
"bounce_rate": 0.0038,
"complaint_rate": 0,
"as_of": "2026-11-08T05:00:00.000Z"
}
},
"streams": [
{
"stream": "newsletter",
"sent": 250,
"delivered": 248,
"bounced": 5,
"complained": 1,
"opened": 150,
"clicked": 40,
"bounce_rate": 0.02
},
{
"stream": "outbound",
"sent": 3900,
"delivered": 3890,
"bounced": 12,
"complained": 0,
"opened": 1200,
"clicked": 300,
"bounce_rate": 0.0031
},
{
"stream": "promotions",
"sent": 50000,
"delivered": 49902,
"bounced": 115,
"complained": 3,
"opened": 9650,
"clicked": 720,
"bounce_rate": 0.0023
}
]
}curl -sS -G 'https://api.acorndispatch.com/api/v1/stats' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
--data-urlencode 'since=2026-11-01T00:00:00Z' \
--data-urlencode 'until=2026-11-08T00:00:00Z'{
"since": "2026-11-01T00:00:00.000Z",
"until": "2026-11-08T00:00:00.000Z",
"marketing": {
"sent": 50250,
"delivered": 50150,
"bounced": 120,
"complained": 4,
"opened": 9800,
"clicked": 760,
"reputation": {
"bounce_rate": 0.0016,
"complaint_rate": 0.0009,
"as_of": "2026-11-08T05:00:00.000Z"
}
},
"transactional": {
"sent": 3900,
"delivered": 3890,
"bounced": 12,
"complained": 0,
"opened": 1200,
"clicked": 300,
"reputation": {
"bounce_rate": 0.0038,
"complaint_rate": 0,
"as_of": "2026-11-08T05:00:00.000Z"
}
},
"streams": [
{
"stream": "newsletter",
"sent": 250,
"delivered": 248,
"bounced": 5,
"complained": 1,
"opened": 150,
"clicked": 40,
"bounce_rate": 0.02
},
{
"stream": "outbound",
"sent": 3900,
"delivered": 3890,
"bounced": 12,
"complained": 0,
"opened": 1200,
"clicked": 300,
"bounce_rate": 0.0031
},
{
"stream": "promotions",
"sent": 50000,
"delivered": 49902,
"bounced": 115,
"complained": 3,
"opened": 9650,
"clicked": 720,
"bounce_rate": 0.0023
}
]
}- Every count is a number of messages.
sentcounts the messages sent in the window.deliveredandcomplainedcount those of them that were delivered or got a spam report. bouncedcounts the emails that could not be delivered for good: the address does not exist, or the receiving server refused the email for good. Emails with only a temporary problem are not in it.deliveredandbouncedcan overlap: a mail provider can accept an email and bounce it later. Do not add them up tosent.openedandclickedcount messages with at least one open or click by a person. Opens and clicks made by a machine are left out.- The answer has one object per sending group:
marketing(mailings, automations and broadcast streams) andtransactional(transactional streams). Each holds the counts of its group and itsreputation. reputationholds the rates mail providers use to judge your sending, per group, over a representative volume of recent email:bounce_rateandcomplaint_rate, fractions from 0 to 1.as_ofis the time of the figure. A quiet group keeps its last figure, with an oldas_of. All three arenullwhen there is no figure yet, or when the figure is not available.reputationuses the window of the mail providers, notsinceanduntil.- On a stream row,
bounce_rateisbounceddivided bysent, a fraction from 0 to 1,nullwhensentis 0. A stream row has noreputation, and a group object has no rate of its own.complainedis a count: the only spam report rate is the one inreputation. streamslists each stream with sends in the window, ordered by key. Withstream, it lists that stream, also when it has no sends. A message with no stream counts under the default stream of its kind.- With
stream, the answer holds only the group of that stream, with counts for that stream. Itsreputationstays for the whole group, because mail providers give no rate per stream. Withoutstream, the answer holds both groups, also with no sends. - Test sends and messages that were never sent (queued, skipped or failed) are not counted.
- List messages with
status=bouncedalso lists emails with a temporary problem, so it can list more thanbouncedcounts.
The answer for stream=newsletter:
{
"since": "2026-11-01T00:00:00.000Z",
"until": "2026-11-08T00:00:00.000Z",
"marketing": {
"sent": 250,
"delivered": 248,
"bounced": 5,
"complained": 1,
"opened": 150,
"clicked": 40,
"reputation": {
"bounce_rate": 0.0016,
"complaint_rate": 0.0009,
"as_of": "2026-11-08T05:00:00.000Z"
}
},
"streams": [
{
"stream": "newsletter",
"sent": 250,
"delivered": 248,
"bounced": 5,
"complained": 1,
"opened": 150,
"clicked": 40,
"bounce_rate": 0.02
}
]
}GET/
Needsstreams:writeoremail:send
Lists the active streams of the workspace. The Mailings and Automations streams are not listed.
Query
| Field | Type | Required | Note |
|---|---|---|---|
archived | boolean | No | true: the archived streams only. Not sent or false: the active ones. Any other value gets 400 invalid_request. |
archivedboolean, optionaltrue: the archived streams only. Not sent orfalse: the active ones. Any other value gets 400invalid_request.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.
Example
curl -sS 'https://api.acorndispatch.com/api/v1/streams' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"data": [
{
"key": "default_transactional",
"name": "Default transactional",
"description": null,
"kind": "transactional",
"is_default": true,
"track_opens": false,
"track_links": false,
"auto_pause": false,
"paused": null,
"archived_at": null,
"created_at": "2026-10-01T08:00:00.000Z",
"updated_at": "2026-10-01T08:00:00.000Z"
},
{
"key": "receipts",
"name": "Receipts",
"description": "Order receipts",
"kind": "transactional",
"is_default": false,
"track_opens": false,
"track_links": false,
"auto_pause": false,
"paused": null,
"archived_at": null,
"created_at": "2026-11-11T09:00:00.000Z",
"updated_at": "2026-11-11T09:00:00.000Z"
}
]
}curl -sS 'https://api.acorndispatch.com/api/v1/streams' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"data": [
{
"key": "default_transactional",
"name": "Default transactional",
"description": null,
"kind": "transactional",
"is_default": true,
"track_opens": false,
"track_links": false,
"auto_pause": false,
"paused": null,
"archived_at": null,
"created_at": "2026-10-01T08:00:00.000Z",
"updated_at": "2026-10-01T08:00:00.000Z"
},
{
"key": "receipts",
"name": "Receipts",
"description": "Order receipts",
"kind": "transactional",
"is_default": false,
"track_opens": false,
"track_links": false,
"auto_pause": false,
"paused": null,
"archived_at": null,
"created_at": "2026-11-11T09:00:00.000Z",
"updated_at": "2026-11-11T09:00:00.000Z"
}
]
}POST/
Needsstreams:write
Creates a stream and answers 201 with the stream object.
is_defaultis read only: a body with it gets 400invalid_request, as does any other field not listed.visible,default_subscribedandpositionare gone: what a recipient can choose is now set on topics.- Flags not sent take the defaults of the kind. A broadcast stream:
track_openson,track_linkson,auto_pauseon. A transactional stream:track_opensoff,track_linksoff,auto_pauseoff.
Body
| Field | Type | Required | Note |
|---|---|---|---|
key | string | Yes | The value for MessageStream. 1 to 40 lower-case letters, digits, hyphens or underscores. Fixed after create. |
name | string | Yes | The name recipients see on the unsubscribe and preference pages. |
kind | string: transactional or broadcast | Yes | Fixed after create. |
description | string or null | No | At most 500 characters. null clears it. |
track_opens | boolean | No | The default for TrackOpens and the tracking of template sends. |
track_links | boolean | No | The default for TrackLinks and the tracking of template sends. |
auto_pause | boolean | No | Broadcast streams only (422 stream_auto_pause_transactional on a transactional stream). Stored; automatic pausing is not active yet. |
keystring, requiredThe value forMessageStream. 1 to 40 lower-case letters, digits, hyphens or underscores. Fixed after create.namestring, requiredThe name recipients see on the unsubscribe and preference pages.kindstring, requiredFixed after create.string:transactionalorbroadcastdescriptionstring or null, optionalAt most 500 characters.nullclears it.track_opensboolean, optionalThe default forTrackOpensand the tracking of template sends.track_linksboolean, optionalThe default forTrackLinksand the tracking of template sends.auto_pauseboolean, optionalBroadcast streams only (422stream_auto_pause_transactionalon a transactional stream). Stored; automatic pausing is not active yet.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
stream_key_invalid | 422 | The stream key breaks the key rule. See the stream object. |
stream_key_taken | 409 | Another stream of the workspace has this key. Archived streams count. |
stream_auto_pause_transactional | 422 | Only a broadcast stream can have auto_pause. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.payload_too_large413The body is over the route's limit. See Body size.stream_key_invalid422The stream key breaks the key rule. See the stream object.stream_key_taken409Another stream of the workspace has this key. Archived streams count.stream_auto_pause_transactional422Only a broadcast stream can haveauto_pause.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.
Example
curl -sS -X POST 'https://api.acorndispatch.com/api/v1/streams' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"key": "receipts",
"name": "Receipts",
"kind": "transactional",
"description": "Order receipts"
}'{
"key": "receipts",
"name": "Receipts",
"description": "Order receipts",
"kind": "transactional",
"is_default": false,
"track_opens": false,
"track_links": false,
"auto_pause": false,
"paused": null,
"archived_at": null,
"created_at": "2026-11-11T09:00:00.000Z",
"updated_at": "2026-11-11T09:00:00.000Z"
}curl -sS -X POST 'https://api.acorndispatch.com/api/v1/streams' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"key": "receipts",
"name": "Receipts",
"kind": "transactional",
"description": "Order receipts"
}'{
"key": "receipts",
"name": "Receipts",
"description": "Order receipts",
"kind": "transactional",
"is_default": false,
"track_opens": false,
"track_links": false,
"auto_pause": false,
"paused": null,
"archived_at": null,
"created_at": "2026-11-11T09:00:00.000Z",
"updated_at": "2026-11-11T09:00:00.000Z"
}PATCH/
Needsstreams:write
Changes the fields you send and answers the stream object.
is_defaultis read only: a body with it gets 400invalid_request, as does any other field not listed.visible,default_subscribedandpositionare gone: what a recipient can choose is now set on topics.- The key and the kind never change. A different
keygets 422stream_key_immutable, a differentkind422stream_kind_immutable. The same value sent back is no change.
Path
| Field | Type | Required | Note |
|---|---|---|---|
key | string | Yes | The stream key. Unknown: 404 not_found. The Mailings or Automations stream: 422 stream_reserved. |
keystring, requiredThe stream key. Unknown: 404not_found. The Mailings or Automations stream: 422stream_reserved.
Body
| Field | Type | Required | Note |
|---|---|---|---|
key | string | No | Accepted only with the current key. Another key gets 422 stream_key_immutable. |
name | string | No | The name recipients see on the unsubscribe and preference pages. |
kind | string: transactional or broadcast | No | Accepted only with the current kind. Another kind gets 422 stream_kind_immutable. |
description | string or null | No | At most 500 characters. null clears it. |
track_opens | boolean | No | The default for TrackOpens and the tracking of template sends. |
track_links | boolean | No | The default for TrackLinks and the tracking of template sends. |
auto_pause | boolean | No | Broadcast streams only (422 stream_auto_pause_transactional on a transactional stream). Stored; automatic pausing is not active yet. |
keystring, optionalAccepted only with the current key. Another key gets 422stream_key_immutable.namestring, optionalThe name recipients see on the unsubscribe and preference pages.kindstring, optionalAccepted only with the current kind. Another kind gets 422stream_kind_immutable.string:transactionalorbroadcastdescriptionstring or null, optionalAt most 500 characters.nullclears it.track_opensboolean, optionalThe default forTrackOpensand the tracking of template sends.track_linksboolean, optionalThe default forTrackLinksand the tracking of template sends.auto_pauseboolean, optionalBroadcast streams only (422stream_auto_pause_transactionalon a transactional stream). Stored; automatic pausing is not active yet.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
stream_reserved | 422 | A send, a PATCH, a pause or a resume names the Mailings or the Automations stream. Those two streams carry the workspace's mailings and automations. See Streams. |
stream_key_immutable | 422 | The key of a stream never changes after the stream is created. |
stream_kind_immutable | 422 | A stream cannot change its kind. |
stream_auto_pause_transactional | 422 | Only a broadcast stream can have auto_pause. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.payload_too_large413The body is over the route's limit. See Body size.not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.stream_reserved422A send, aPATCH, a pause or a resume names the Mailings or the Automations stream. Those two streams carry the workspace's mailings and automations. See Streams.stream_key_immutable422The key of a stream never changes after the stream is created.stream_kind_immutable422A stream cannot change its kind.stream_auto_pause_transactional422Only a broadcast stream can haveauto_pause.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.
Example
curl -sS -X PATCH 'https://api.acorndispatch.com/api/v1/streams/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"name": "Order receipts"
}'{
"key": "receipts",
"name": "Order receipts",
"description": "Order receipts",
"kind": "transactional",
"is_default": false,
"track_opens": false,
"track_links": false,
"auto_pause": false,
"paused": null,
"archived_at": null,
"created_at": "2026-11-11T09:00:00.000Z",
"updated_at": "2026-11-12T10:00:00.000Z"
}curl -sS -X PATCH 'https://api.acorndispatch.com/api/v1/streams/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"name": "Order receipts"
}'{
"key": "receipts",
"name": "Order receipts",
"description": "Order receipts",
"kind": "transactional",
"is_default": false,
"track_opens": false,
"track_links": false,
"auto_pause": false,
"paused": null,
"archived_at": null,
"created_at": "2026-11-11T09:00:00.000Z",
"updated_at": "2026-11-12T10:00:00.000Z"
}POST/
Needsstreams:write
Pauses the stream and answers the stream object. No body. Calling it twice is safe.
Path
| Field | Type | Required | Note |
|---|---|---|---|
key | string | Yes | The stream key. Unknown: 404 not_found. The Mailings or Automations stream: 422 stream_reserved. |
keystring, requiredThe stream key. Unknown: 404not_found. The Mailings or Automations stream: 422stream_reserved.
Errors
| Code | HTTP | When |
|---|---|---|
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
stream_reserved | 422 | A send, a PATCH, a pause or a resume names the Mailings or the Automations stream. Those two streams carry the workspace's mailings and automations. See Streams. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.stream_reserved422A send, aPATCH, a pause or a resume names the Mailings or the Automations stream. Those two streams carry the workspace's mailings and automations. See Streams.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.
Example
curl -sS -X POST 'https://api.acorndispatch.com/api/v1/streams//pause' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"key": "receipts",
"name": "Receipts",
"description": "Order receipts",
"kind": "transactional",
"is_default": false,
"track_opens": false,
"track_links": false,
"auto_pause": false,
"paused": {
"at": "2026-11-12T10:00:00.000Z",
"reason": "manual"
},
"archived_at": null,
"created_at": "2026-11-11T09:00:00.000Z",
"updated_at": "2026-11-12T10:00:00.000Z"
}curl -sS -X POST 'https://api.acorndispatch.com/api/v1/streams//pause' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"key": "receipts",
"name": "Receipts",
"description": "Order receipts",
"kind": "transactional",
"is_default": false,
"track_opens": false,
"track_links": false,
"auto_pause": false,
"paused": {
"at": "2026-11-12T10:00:00.000Z",
"reason": "manual"
},
"archived_at": null,
"created_at": "2026-11-11T09:00:00.000Z",
"updated_at": "2026-11-12T10:00:00.000Z"
}POST/
Needsstreams:write
Resumes the stream and answers the stream object. No body. Calling it twice is safe.
Path
| Field | Type | Required | Note |
|---|---|---|---|
key | string | Yes | The stream key. Unknown: 404 not_found. The Mailings or Automations stream: 422 stream_reserved. |
keystring, requiredThe stream key. Unknown: 404not_found. The Mailings or Automations stream: 422stream_reserved.
Errors
| Code | HTTP | When |
|---|---|---|
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
stream_reserved | 422 | A send, a PATCH, a pause or a resume names the Mailings or the Automations stream. Those two streams carry the workspace's mailings and automations. See Streams. |
stream_under_review | 409 | A resume names a stream that AcornDispatch paused while it reviews delivery. Only AcornDispatch resumes it. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.stream_reserved422A send, aPATCH, a pause or a resume names the Mailings or the Automations stream. Those two streams carry the workspace's mailings and automations. See Streams.stream_under_review409A resume names a stream that AcornDispatch paused while it reviews delivery. Only AcornDispatch resumes it.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.
Example
curl -sS -X POST 'https://api.acorndispatch.com/api/v1/streams//resume' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"key": "receipts",
"name": "Receipts",
"description": "Order receipts",
"kind": "transactional",
"is_default": false,
"track_opens": false,
"track_links": false,
"auto_pause": false,
"paused": null,
"archived_at": null,
"created_at": "2026-11-11T09:00:00.000Z",
"updated_at": "2026-11-12T10:30:00.000Z"
}curl -sS -X POST 'https://api.acorndispatch.com/api/v1/streams//resume' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"key": "receipts",
"name": "Receipts",
"description": "Order receipts",
"kind": "transactional",
"is_default": false,
"track_opens": false,
"track_links": false,
"auto_pause": false,
"paused": null,
"archived_at": null,
"created_at": "2026-11-11T09:00:00.000Z",
"updated_at": "2026-11-12T10:30:00.000Z"
}| Field | Meaning |
|---|---|
key | The value for MessageStream. 1 to 40 lower-case letters, digits, hyphens or underscores. Fixed after create. |
name | The name recipients see on the unsubscribe and preference pages. |
description | Optional text, at most 500 characters. |
kind | transactional or broadcast. Fixed after create. |
is_default | The default stream of its kind: a send with no MessageStream goes to the default transactional stream. Fixed: one per kind, set when the workspace is created. It never moves and is never archived. Read only. |
track_opens, track_links | Defaults for TrackOpens and TrackLinks. |
auto_pause | Stored; automatic pausing is not active yet. |
paused | { "at", "reason" } while the stream is paused, else null. reason is manual for a pause by a person or a key, or provider_review while AcornDispatch reviews delivery. Only AcornDispatch resumes that one (409 stream_under_review). |
archived_at, created_at, updated_at | ISO 8601 times. archived_at is null for an active stream. |
keyThe value forMessageStream. 1 to 40 lower-case letters, digits, hyphens or underscores. Fixed after create.nameThe name recipients see on the unsubscribe and preference pages.descriptionOptional text, at most 500 characters.kindtransactionalorbroadcast. Fixed after create.is_defaultThe default stream of its kind: a send with noMessageStreamgoes to the default transactional stream. Fixed: one per kind, set when the workspace is created. It never moves and is never archived. Read only.track_opens,track_linksDefaults forTrackOpensandTrackLinks.auto_pauseStored; automatic pausing is not active yet.paused{ "at", "reason" }while the stream is paused, elsenull.reasonismanualfor a pause by a person or a key, orprovider_reviewwhile AcornDispatch reviews delivery. Only AcornDispatch resumes that one (409stream_under_review).archived_at,created_at,updated_atISO 8601 times.archived_atisnullfor an active stream.
- A workspace can have two more broadcast streams that hold the mail of its mailings and of its automations. Their keys are
mailingsandautomations, or the next free key when one was taken, such asmailings-2. GET /api/v1/streamsdoes not list them. A send, aPATCH, a pause or a resume that names one gets 422stream_reserved.- They show in the data you read: the
streamof a message, theMessageStreamof a webhook event, a row of stats and thestreamof a suppression entry carry their key, and?stream=filters by it. A webhook'sstreamsmay name them.
GET/
Needstopics:writeoremail:send
Lists the active topics of the workspace, in the order of the preferences page.
Query
| Field | Type | Required | Note |
|---|---|---|---|
archived | boolean | No | true: the archived topics only. Not sent or false: the active ones. Any other value gets 400 invalid_request. |
archivedboolean, optionaltrue: the archived topics only. Not sent orfalse: the active ones. Any other value gets 400invalid_request.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.
Example
curl -sS 'https://api.acorndispatch.com/api/v1/topics' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"data": [
{
"key": "weekly-summary",
"name": "Weekly summary",
"description": null,
"visible": false,
"default_subscribed": true,
"archived_at": null,
"created_at": "2026-11-20T08:00:00.000Z",
"updated_at": "2026-11-20T08:00:00.000Z"
},
{
"key": "product-tips",
"name": "Product tips",
"description": "Tips for getting more out of the product.",
"visible": true,
"default_subscribed": true,
"archived_at": null,
"created_at": "2026-11-21T09:30:00.000Z",
"updated_at": "2026-11-21T09:30:00.000Z"
}
]
}curl -sS 'https://api.acorndispatch.com/api/v1/topics' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"data": [
{
"key": "weekly-summary",
"name": "Weekly summary",
"description": null,
"visible": false,
"default_subscribed": true,
"archived_at": null,
"created_at": "2026-11-20T08:00:00.000Z",
"updated_at": "2026-11-20T08:00:00.000Z"
},
{
"key": "product-tips",
"name": "Product tips",
"description": "Tips for getting more out of the product.",
"visible": true,
"default_subscribed": true,
"archived_at": null,
"created_at": "2026-11-21T09:30:00.000Z",
"updated_at": "2026-11-21T09:30:00.000Z"
}
]
}POST/
Needstopics:write
Creates a topic and answers 201 with the topic object.
- A field not listed gets 400
invalid_request. What a topic covers (its streams, mailings, automations and templates) is set on the Topics page only. - Without
key, the key is made from the name, with a number when it is taken (product-tips-2). The answer carries it.
Body
| Field | Type | Required | Note |
|---|---|---|---|
key | string | No | The value for Topic on a send. 1 to 64 lower-case letters, digits, hyphens or underscores. Made from name when not sent. Fixed after create. |
name | string | Yes | 1 to 60 characters. Recipients see it on the preferences page when the topic is visible. |
description | string or null | No | At most 140 characters. null clears it. |
visible | boolean | No | Shown on the preferences page. Default true. |
default_subscribed | boolean | No | false makes an opt-in topic: email goes only to people who turned it on. Default true. Fixed once the topic covers email or a person has made a choice (409 topic_default_fixed). |
keystring, optionalThe value forTopicon a send. 1 to 64 lower-case letters, digits, hyphens or underscores. Made fromnamewhen not sent. Fixed after create.namestring, required1 to 60 characters. Recipients see it on the preferences page when the topic is visible.descriptionstring or null, optionalAt most 140 characters.nullclears it.visibleboolean, optionalShown on the preferences page. Defaulttrue.default_subscribedboolean, optionalfalsemakes an opt-in topic: email goes only to people who turned it on. Defaulttrue. Fixed once the topic covers email or a person has made a choice (409topic_default_fixed).
Errors
| Code | HTTP | When |
|---|---|---|
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
topic_key_invalid | 422 | The topic key breaks the key rule. See the topic object. |
topic_key_taken | 409 | Another topic of the workspace has this key. Archived topics count. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.payload_too_large413The body is over the route's limit. See Body size.topic_key_invalid422The topic key breaks the key rule. See the topic object.topic_key_taken409Another topic of the workspace has this key. Archived topics count.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.
Example
curl -sS -X POST 'https://api.acorndispatch.com/api/v1/topics' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"key": "product-tips",
"name": "Product tips",
"description": "Tips for getting more out of the product."
}'{
"key": "product-tips",
"name": "Product tips",
"description": "Tips for getting more out of the product.",
"visible": true,
"default_subscribed": true,
"archived_at": null,
"created_at": "2026-11-21T09:30:00.000Z",
"updated_at": "2026-11-21T09:30:00.000Z"
}curl -sS -X POST 'https://api.acorndispatch.com/api/v1/topics' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"key": "product-tips",
"name": "Product tips",
"description": "Tips for getting more out of the product."
}'{
"key": "product-tips",
"name": "Product tips",
"description": "Tips for getting more out of the product.",
"visible": true,
"default_subscribed": true,
"archived_at": null,
"created_at": "2026-11-21T09:30:00.000Z",
"updated_at": "2026-11-21T09:30:00.000Z"
}GET/
Needstopics:writeoremail:send
Answers the topic object, archived or not.
Path
| Field | Type | Required | Note |
|---|---|---|---|
key | string | Yes | The topic key. Unknown: 404 not_found. |
keystring, requiredThe topic key. Unknown: 404not_found.
Errors
| Code | HTTP | When |
|---|---|---|
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.
Example
curl -sS 'https://api.acorndispatch.com/api/v1/topics/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"key": "product-tips",
"name": "Product tips",
"description": "Tips for getting more out of the product.",
"visible": true,
"default_subscribed": true,
"archived_at": null,
"created_at": "2026-11-21T09:30:00.000Z",
"updated_at": "2026-11-21T09:30:00.000Z"
}curl -sS 'https://api.acorndispatch.com/api/v1/topics/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"key": "product-tips",
"name": "Product tips",
"description": "Tips for getting more out of the product.",
"visible": true,
"default_subscribed": true,
"archived_at": null,
"created_at": "2026-11-21T09:30:00.000Z",
"updated_at": "2026-11-21T09:30:00.000Z"
}PATCH/
Needstopics:write
Changes the fields you send and answers the topic object.
- A field not listed gets 400
invalid_request. What a topic covers (its streams, mailings, automations and templates) is set on the Topics page only. - The key never changes: your app sends it. The same
keysent back is no change. An archived topic does not change (409topic_archived).
Path
| Field | Type | Required | Note |
|---|---|---|---|
key | string | Yes | The topic key. Unknown: 404 not_found. |
keystring, requiredThe topic key. Unknown: 404not_found.
Body
| Field | Type | Required | Note |
|---|---|---|---|
key | string | No | Accepted only with the current key. Another key gets 409 topic_key_fixed. |
name | string | No | 1 to 60 characters. Recipients see it on the preferences page when the topic is visible. |
description | string or null | No | At most 140 characters. null clears it. |
visible | boolean | No | Shown on the preferences page. |
default_subscribed | boolean | No | false makes an opt-in topic: email goes only to people who turned it on. Fixed once the topic covers email or a person has made a choice (409 topic_default_fixed). |
keystring, optionalAccepted only with the current key. Another key gets 409topic_key_fixed.namestring, optional1 to 60 characters. Recipients see it on the preferences page when the topic is visible.descriptionstring or null, optionalAt most 140 characters.nullclears it.visibleboolean, optionalShown on the preferences page.default_subscribedboolean, optionalfalsemakes an opt-in topic: email goes only to people who turned it on. Fixed once the topic covers email or a person has made a choice (409topic_default_fixed).
Errors
| Code | HTTP | When |
|---|---|---|
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
topic_key_fixed | 409 | The key of a topic never changes after the topic is created. |
topic_default_fixed | 409 | default_subscribed cannot change once the topic covers email or a person has made a choice. |
topic_archived | 409 or 422 | The topic is archived. A send that names it gets 422, and nothing is stored. A change to it gets 409. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.payload_too_large413The body is over the route's limit. See Body size.not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.topic_key_fixed409The key of a topic never changes after the topic is created.topic_default_fixed409default_subscribedcannot change once the topic covers email or a person has made a choice.topic_archived409 or 422The topic is archived. A send that names it gets 422, and nothing is stored. A change to it gets 409.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.
Example
curl -sS -X PATCH 'https://api.acorndispatch.com/api/v1/topics/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"name": "Tips and tricks"
}'{
"key": "product-tips",
"name": "Tips and tricks",
"description": "Tips for getting more out of the product.",
"visible": true,
"default_subscribed": true,
"archived_at": null,
"created_at": "2026-11-21T09:30:00.000Z",
"updated_at": "2026-11-22T10:00:00.000Z"
}curl -sS -X PATCH 'https://api.acorndispatch.com/api/v1/topics/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"name": "Tips and tricks"
}'{
"key": "product-tips",
"name": "Tips and tricks",
"description": "Tips for getting more out of the product.",
"visible": true,
"default_subscribed": true,
"archived_at": null,
"created_at": "2026-11-21T09:30:00.000Z",
"updated_at": "2026-11-22T10:00:00.000Z"
}DELETE/
Needstopics:write
Archives the topic and answers the topic object. No body. Calling it twice is safe.
- An archived topic leaves the preferences page and cannot be turned back on. The people who turned it off stay off, and a send with it as
Topicis refused. Its key stays taken. There is no unarchive.
Path
| Field | Type | Required | Note |
|---|---|---|---|
key | string | Yes | The topic key. Unknown: 404 not_found. |
keystring, requiredThe topic key. Unknown: 404not_found.
Errors
| Code | HTTP | When |
|---|---|---|
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.
Example
curl -sS -X DELETE 'https://api.acorndispatch.com/api/v1/topics/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"key": "product-tips",
"name": "Product tips",
"description": "Tips for getting more out of the product.",
"visible": true,
"default_subscribed": true,
"archived_at": "2026-11-22T11:00:00.000Z",
"created_at": "2026-11-21T09:30:00.000Z",
"updated_at": "2026-11-22T11:00:00.000Z"
}curl -sS -X DELETE 'https://api.acorndispatch.com/api/v1/topics/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"key": "product-tips",
"name": "Product tips",
"description": "Tips for getting more out of the product.",
"visible": true,
"default_subscribed": true,
"archived_at": "2026-11-22T11:00:00.000Z",
"created_at": "2026-11-21T09:30:00.000Z",
"updated_at": "2026-11-22T11:00:00.000Z"
}| Field | Meaning |
|---|---|
key | The value for Topic on a send. 1 to 64 lower-case letters, digits, hyphens or underscores. Fixed after create. |
name | The name recipients see on the preferences page. |
description | Optional text under the name on the preferences page. |
visible | true: recipients can turn it on or off on the preferences page. false: hidden, for email a recipient should not choose, such as account email. |
default_subscribed | true: on until a person turns it off. false: off until a person turns it on. |
archived_at, created_at, updated_at | ISO 8601 times. archived_at is null for an active topic. |
keyThe value forTopicon a send. 1 to 64 lower-case letters, digits, hyphens or underscores. Fixed after create.nameThe name recipients see on the preferences page.descriptionOptional text under the name on the preferences page.visibletrue: recipients can turn it on or off on the preferences page.false: hidden, for email a recipient should not choose, such as account email.default_subscribedtrue: on until a person turns it off.false: off until a person turns it on.archived_at,created_at,updated_atISO 8601 times.archived_atisnullfor an active topic.
GET/
Needssuppressions:writeoremail:send
Tells you what blocks an address. A sending key may call it, so your app can check before it sends.
Query
| Field | Type | Required | Note |
|---|---|---|---|
email | string | Yes | The address. Percent-encode it (encodeURIComponent): a + must be sent as %2B, or it reads as a space and the address is refused (400 invalid_request). |
stream | string | No | A stream key: what blocks that stream only. Not sent: every stream. Unknown: 422 stream_not_found. |
emailstring, requiredThe address. Percent-encode it (encodeURIComponent): a+must be sent as%2B, or it reads as a space and the address is refused (400invalid_request).streamstring, optionalA stream key: what blocks that stream only. Not sent: every stream. Unknown: 422stream_not_found.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
stream_not_found | 422 | MessageStream, a stream value or a webhook's streams names no stream of the workspace. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.stream_not_found422MessageStream, astreamvalue or a webhook'sstreamsnames no stream of the workspace.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.
Example
curl -sS -G 'https://api.acorndispatch.com/api/v1/suppressions' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
--data-urlencode 'email='{
"email": "person@example.com",
"stream": null,
"active": true,
"suppressions": [
{
"reason": "hard_bounce",
"scope": "all",
"stream": null,
"created_at": "2026-10-02T08:00:00.000Z",
"liftable": true
}
]
}curl -sS -G 'https://api.acorndispatch.com/api/v1/suppressions' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
--data-urlencode 'email='{
"email": "person@example.com",
"stream": null,
"active": true,
"suppressions": [
{
"reason": "hard_bounce",
"scope": "all",
"stream": null,
"created_at": "2026-10-02T08:00:00.000Z",
"liftable": true
}
]
}POST/
Needssuppressions:write
Stops email to an address. The new entry has the reason api. The answer lists what blocks the address now.
- The body is strict: any other field gets 400
invalid_request. createdisfalsewhen a suppression already blocks what you asked for. Anallentry also covers amarketingadd.- A lift with Lift suppressions removes it again.
Body
| Field | Type | Required | Note |
|---|---|---|---|
email | string | Yes | The address. Not a valid address: 400 invalid_request. |
scope | string: all or marketing | No | all blocks every email. marketing blocks broadcast streams only. Not sent: all. |
emailstring, requiredThe address. Not a valid address: 400invalid_request.scopestring, optionalallblocks every email.marketingblocks broadcast streams only. Not sent:all.string:allormarketing
Errors
| Code | HTTP | When |
|---|---|---|
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.payload_too_large413The body is over the route's limit. See Body size.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.
Example
curl -sS -X POST 'https://api.acorndispatch.com/api/v1/suppressions' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"email": "",
"scope": "all"
}'{
"email": "person@example.com",
"scope": "all",
"created": true,
"suppressions": [
{
"reason": "api",
"scope": "all",
"stream": null,
"created_at": "2026-11-17T09:30:00.000Z",
"liftable": true
}
]
}curl -sS -X POST 'https://api.acorndispatch.com/api/v1/suppressions' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"email": "",
"scope": "all"
}'{
"email": "person@example.com",
"scope": "all",
"created": true,
"suppressions": [
{
"reason": "api",
"scope": "all",
"stream": null,
"created_at": "2026-11-17T09:30:00.000Z",
"liftable": true
}
]
}DELETE/
Needssuppressions:write
Lifts what may be lifted for an address and answers what was lifted and what remains.
- The body is strict: any other field gets 400
invalid_request.
Body
| Field | Type | Required | Note |
|---|---|---|---|
email | string | Yes | The address. Not a valid address: 400 invalid_request. |
stream | string or null | No | A stream key: what blocks that stream only. Not sent: every stream. Unknown: 422 stream_not_found. |
emailstring, requiredThe address. Not a valid address: 400invalid_request.streamstring or null, optionalA stream key: what blocks that stream only. Not sent: every stream. Unknown: 422stream_not_found.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
stream_not_found | 422 | MessageStream, a stream value or a webhook's streams names no stream of the workspace. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.payload_too_large413The body is over the route's limit. See Body size.stream_not_found422MessageStream, astreamvalue or a webhook'sstreamsnames no stream of the workspace.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.
Example
curl -sS -X DELETE 'https://api.acorndispatch.com/api/v1/suppressions' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"email": ""
}'{
"email": "person@example.com",
"stream": null,
"lifted": [
{
"reason": "hard_bounce",
"scope": "all",
"stream": null,
"created_at": "2026-10-02T08:00:00.000Z",
"liftable": true
}
],
"remaining": []
}curl -sS -X DELETE 'https://api.acorndispatch.com/api/v1/suppressions' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"email": ""
}'{
"email": "person@example.com",
"stream": null,
"lifted": [
{
"reason": "hard_bounce",
"scope": "all",
"stream": null,
"created_at": "2026-10-02T08:00:00.000Z",
"liftable": true
}
],
"remaining": []
}A check and a lift answer email (the address as AcornDispatch stores it) and stream (the key you sent, or null). An add answers email, scope, created and suppressions. A check adds active (true when anything blocks the address) and suppressions; a lift adds lifted and remaining. Each is a list of entries:
| Field | Meaning |
|---|---|
reason | hard_bounce, soft_bounce_repeat, repeated_block, complaint, manual, api, imported_bounce, imported_complaint, address_not_found or unsubscribed. address_not_found means the address does not exist. |
scope | all, marketing (broadcast streams), stream (one stream) or global. |
stream | The stream key of a stream entry, else null. |
created_at | An ISO 8601 time. null for a global entry and a stream opt-out. |
liftable | Whether a lift can remove it. |
reasonhard_bounce,soft_bounce_repeat,repeated_block,complaint,manual,api,imported_bounce,imported_complaint,address_not_foundorunsubscribed.address_not_foundmeans the address does not exist.scopeall,marketing(broadcast streams),stream(one stream) orglobal.streamThe stream key of astreamentry, elsenull.created_atAn ISO 8601 time.nullfor aglobalentry and a stream opt-out.liftableWhether a lift can remove it.
- A spam complaint, an unsubscribe and a stream opt-out are never lifted. Only the recipient can undo them, so they stay in
remaining. - A lift sends a
SubscriptionChangewebhook (OriginCustomer,MessageIDnull) for each stream the address can now receive again. Lifting theaddress_not_foundentry sends none.
PUT/
Needspeople:write
Adds the person, or updates the one this identifier names. Every key of the body other than email and unsubscribed is stored as an attribute.
- The body is a JSON object of at most 1 MB.
- Any other key is an attribute. A
nullvalue deletes that attribute. - The answer is
{}once the call is stored. AcornDispatch applies it within seconds, in the order the calls for one person arrive.
Path
| Field | Type | Required | Note |
|---|---|---|---|
identifier | string | Yes | The person's email address, or your app's own id for them. 1 to 255 characters. Percent-encode it (encodeURIComponent). It cannot start with cio_. See Identifiers. |
identifierstring, requiredThe person's email address, or your app's own id for them. 1 to 255 characters. Percent-encode it (encodeURIComponent). It cannot start withcio_. See Identifiers.
Body
| Field | Type | Required | Note |
|---|---|---|---|
email | string or null | No | Sets the person's address. null clears it. |
unsubscribed | boolean | No | true unsubscribes the person from marketing email. false is ignored: the API never subscribes a person again. |
emailstring or null, optionalSets the person's address.nullclears it.unsubscribedboolean, optionaltrueunsubscribes the person from marketing email.falseis ignored: the API never subscribes a person again.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.payload_too_large413The body is over the route's limit. See Body size.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.
Example
curl -sS -X PUT 'https://api.acorndispatch.com/api/v1/customers/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"email": "",
"first_name": "Sam",
"plan": "pro"
}'{}curl -sS -X PUT 'https://api.acorndispatch.com/api/v1/customers/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"email": "",
"first_name": "Sam",
"plan": "pro"
}'{}DELETE/
Needspeople:write
Deletes the person and their attributes and events. An identifier with no person changes nothing.
- The answer is
{}whether or not the person exists. AcornDispatch applies it within seconds.
Path
| Field | Type | Required | Note |
|---|---|---|---|
identifier | string | Yes | The person's email address, or your app's own id for them. 1 to 255 characters. Percent-encode it (encodeURIComponent). It cannot start with cio_. See Identifiers. |
identifierstring, requiredThe person's email address, or your app's own id for them. 1 to 255 characters. Percent-encode it (encodeURIComponent). It cannot start withcio_. See Identifiers.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
unauthorized | 401 | The API key is missing or wrong. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.unauthorized401The API key is missing or wrong.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.
Example
curl -sS -X DELETE 'https://api.acorndispatch.com/api/v1/customers/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{}curl -sS -X DELETE 'https://api.acorndispatch.com/api/v1/customers/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{}GET/
Needswebhooks:write
The workspace's webhooks, newest first.
Errors
| Code | HTTP | When |
|---|---|---|
unauthorized | 401 | The API key is missing or wrong. |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
unauthorized401The API key is missing or wrong.rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".
Example
curl -sS 'https://api.acorndispatch.com/api/v1/webhooks' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"data": [
{
"id": "whk_3Jd8sLq2Vn7Ry0Pe",
"url": "https://your-domain.com/hooks/acorndispatch",
"events": [
"Delivery",
"Bounce",
"SpamComplaint",
"Open",
"Click",
"SubscriptionChange"
],
"streams": null,
"http_auth": {
"username": "hook"
},
"headers": [
{
"name": "X-Source"
}
],
"enabled": true,
"disabled_reason": null,
"last_delivery": {
"at": "2026-11-15T09:42:07.000Z",
"status": "delivered"
},
"created_at": "2026-11-02T16:20:11.000Z"
}
]
}curl -sS 'https://api.acorndispatch.com/api/v1/webhooks' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"data": [
{
"id": "whk_3Jd8sLq2Vn7Ry0Pe",
"url": "https://your-domain.com/hooks/acorndispatch",
"events": [
"Delivery",
"Bounce",
"SpamComplaint",
"Open",
"Click",
"SubscriptionChange"
],
"streams": null,
"http_auth": {
"username": "hook"
},
"headers": [
{
"name": "X-Source"
}
],
"enabled": true,
"disabled_reason": null,
"last_delivery": {
"at": "2026-11-15T09:42:07.000Z",
"status": "delivered"
},
"created_at": "2026-11-02T16:20:11.000Z"
}
]
}POST/
Needswebhooks:write
Adds an endpoint. The answer holds signing_secret (whsec_ and 40 characters). It is shown only now: store it as a secret.
- A stream key that does not exist gets 422
stream_not_found. An archived one gets 422stream_archived. - An empty event list, an unknown event, more than 20 headers or an unknown field gets 400
invalid_request. - A refused URL, auth or header gets 422
validation_failed. So does a host that cannot be found or that is not public.
Body
| Field | Type | Required | Note |
|---|---|---|---|
url | string | Yes | https only, the standard port, a public host, at most 2,000 characters, no user name or password in it. AcornDispatch's own hosts are refused. |
events | array of strings: Delivery, Bounce, SpamComplaint, Open, Click or SubscriptionChange | Yes | One or more events. A repeat is dropped. |
streams | array of strings or null | No | Stream keys. Leave it out, or send null, for every stream. An empty list is refused. |
http_auth | object or null | No | Basic auth, sent with each request. |
http_auth.username | string | Yes | 1 to 200 characters, no :. |
http_auth.password | string | Yes | 1 to 200 characters. |
headers | array of objects | No | At most 20 extra headers, each name once. Not allowed: authorization, user-agent, content-type, content-length, host, connection, transfer-encoding, keep-alive, upgrade, te, expect, proxy-* and x-acorndispatch-*. Use http_auth for authorization. |
headers.name | string | Yes | A header name. |
headers.value | string | Yes | At most 1,000 characters, no line breaks. |
urlstring, requiredhttpsonly, the standard port, a public host, at most 2,000 characters, no user name or password in it. AcornDispatch's own hosts are refused.eventsarray of strings, requiredOne or more events. A repeat is dropped.array of strings:Delivery,Bounce,SpamComplaint,Open,ClickorSubscriptionChangestreamsarray of strings or null, optionalStream keys. Leave it out, or sendnull, for every stream. An empty list is refused.http_authobject or null, optionalBasic auth, sent with each request.http_auth.usernamestring, required1 to 200 characters, no:.http_auth.passwordstring, required1 to 200 characters.headersarray of objects, optionalAt most 20 extra headers, each name once. Not allowed:authorization,user-agent,content-type,content-length,host,connection,transfer-encoding,keep-alive,upgrade,te,expect,proxy-*andx-acorndispatch-*. Usehttp_authforauthorization.headers.namestring, requiredA header name.headers.valuestring, requiredAt most 1,000 characters, no line breaks.
Errors
| Code | HTTP | When |
|---|---|---|
unauthorized | 401 | The API key is missing or wrong. |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
validation_failed | 422 | A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule. |
stream_not_found | 422 | MessageStream, a stream value or a webhook's streams names no stream of the workspace. |
stream_archived | 422 | A send or a webhook's streams names an archived stream. A default stream is never archived. |
unauthorized401The API key is missing or wrong.rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.payload_too_large413The body is over the route's limit. See Body size.validation_failed422A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule.stream_not_found422MessageStream, astreamvalue or a webhook'sstreamsnames no stream of the workspace.stream_archived422A send or a webhook'sstreamsnames an archived stream. A default stream is never archived.
Example
curl -sS -X POST 'https://api.acorndispatch.com/api/v1/webhooks' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"url": "",
"events": [
"Delivery",
"Bounce",
"SpamComplaint",
"Open",
"Click",
"SubscriptionChange"
],
"http_auth": {
"username": "hook",
"password": ""
},
"headers": [
{
"name": "X-Source",
"value": "acorndispatch"
}
]
}'{
"id": "whk_3Jd8sLq2Vn7Ry0Pe",
"url": "https://your-domain.com/hooks/acorndispatch",
"events": [
"Delivery",
"Bounce",
"SpamComplaint",
"Open",
"Click",
"SubscriptionChange"
],
"streams": null,
"http_auth": {
"username": "hook"
},
"headers": [
{
"name": "X-Source"
}
],
"enabled": true,
"disabled_reason": null,
"last_delivery": null,
"created_at": "2026-11-15T10:03:52.000Z",
"signing_secret": "whsec_your_signing_secret"
}curl -sS -X POST 'https://api.acorndispatch.com/api/v1/webhooks' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"url": "",
"events": [
"Delivery",
"Bounce",
"SpamComplaint",
"Open",
"Click",
"SubscriptionChange"
],
"http_auth": {
"username": "hook",
"password": ""
},
"headers": [
{
"name": "X-Source",
"value": "acorndispatch"
}
]
}'{
"id": "whk_3Jd8sLq2Vn7Ry0Pe",
"url": "https://your-domain.com/hooks/acorndispatch",
"events": [
"Delivery",
"Bounce",
"SpamComplaint",
"Open",
"Click",
"SubscriptionChange"
],
"streams": null,
"http_auth": {
"username": "hook"
},
"headers": [
{
"name": "X-Source"
}
],
"enabled": true,
"disabled_reason": null,
"last_delivery": null,
"created_at": "2026-11-15T10:03:52.000Z",
"signing_secret": "whsec_your_signing_secret"
}PATCH/
Needswebhooks:write
Turns a webhook on or off, or rotates its signing secret. The answer is the webhook, plus signing_secret after a rotation.
- Send
enabled,rotate_signing_secret: true, or both. Both run together or not at all.
Path
| Field | Type | Required | Note |
|---|---|---|---|
id | string | Yes | The webhook id, from the list or the create answer. |
idstring, requiredThe webhook id, from the list or the create answer.
Body
| Field | Type | Required | Note |
|---|---|---|---|
enabled | boolean | No | false turns it off and drops its pending deliveries. true turns it on again, also after a turn-off for failures. |
rotate_signing_secret | boolean | No | true makes a new secret. The old one stops at once, with no overlap: deploy the new secret right after the call. |
enabledboolean, optionalfalseturns it off and drops its pending deliveries.trueturns it on again, also after a turn-off for failures.rotate_signing_secretboolean, optionaltruemakes a new secret. The old one stops at once, with no overlap: deploy the new secret right after the call.
Errors
| Code | HTTP | When |
|---|---|---|
unauthorized | 401 | The API key is missing or wrong. |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
unauthorized401The API key is missing or wrong.rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.payload_too_large413The body is over the route's limit. See Body size.not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.
Example
curl -sS -X PATCH 'https://api.acorndispatch.com/api/v1/webhooks/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"enabled": true
}'{
"id": "whk_3Jd8sLq2Vn7Ry0Pe",
"url": "https://your-domain.com/hooks/acorndispatch",
"events": [
"Delivery",
"Bounce",
"SpamComplaint",
"Open",
"Click",
"SubscriptionChange"
],
"streams": null,
"http_auth": {
"username": "hook"
},
"headers": [
{
"name": "X-Source"
}
],
"enabled": true,
"disabled_reason": null,
"last_delivery": {
"at": "2026-11-15T09:42:07.000Z",
"status": "delivered"
},
"created_at": "2026-11-02T16:20:11.000Z"
}curl -sS -X PATCH 'https://api.acorndispatch.com/api/v1/webhooks/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"enabled": true
}'{
"id": "whk_3Jd8sLq2Vn7Ry0Pe",
"url": "https://your-domain.com/hooks/acorndispatch",
"events": [
"Delivery",
"Bounce",
"SpamComplaint",
"Open",
"Click",
"SubscriptionChange"
],
"streams": null,
"http_auth": {
"username": "hook"
},
"headers": [
{
"name": "X-Source"
}
],
"enabled": true,
"disabled_reason": null,
"last_delivery": {
"at": "2026-11-15T09:42:07.000Z",
"status": "delivered"
},
"created_at": "2026-11-02T16:20:11.000Z"
}DELETE/
Needswebhooks:write
Deletes a webhook and its pending deliveries.
Path
| Field | Type | Required | Note |
|---|---|---|---|
id | string | Yes | The webhook id, from the list or the create answer. |
idstring, requiredThe webhook id, from the list or the create answer.
Errors
| Code | HTTP | When |
|---|---|---|
unauthorized | 401 | The API key is missing or wrong. |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
unauthorized401The API key is missing or wrong.rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.
Example
curl -sS -X DELETE 'https://api.acorndispatch.com/api/v1/webhooks/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"id": "whk_3Jd8sLq2Vn7Ry0Pe",
"deleted": true
}curl -sS -X DELETE 'https://api.acorndispatch.com/api/v1/webhooks/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"id": "whk_3Jd8sLq2Vn7Ry0Pe",
"deleted": true
}| Field | What it holds |
|---|---|
id | The webhook id. |
url | Where events go. |
events | The events it gets. |
streams | Stream keys, or null for every stream. |
http_auth | The Basic auth user name as { "username" }, or null. |
headers | The extra header names as [{ "name" }]. |
enabled | false when the webhook is off. |
disabled_reason | manual (turned off by you), failing (turned off after failed deliveries), or null. |
last_delivery | { "at", "status" } of the last attempt (delivered or failed), or null. |
created_at | ISO 8601 time. |
idThe webhook id.urlWhere events go.eventsThe events it gets.streamsStream keys, ornullfor every stream.http_authThe Basic auth user name as{ "username" }, ornull.headersThe extra header names as[{ "name" }].enabledfalsewhen the webhook is off.disabled_reasonmanual(turned off by you),failing(turned off after failed deliveries), ornull.last_delivery{ "at", "status" }of the last attempt (deliveredorfailed), ornull.created_atISO 8601 time.
A webhook never shows a password, a header value or the signing secret. The secret leaves only in the answer to a create or a rotation.
- Each request is a
POSTwith a JSON body of one event. Field names follow the common webhook names, so one handler can read every event byRecordType. - Events of every message of the workspace are sent: your app's, mailings and automations, filtered by the webhook's
streams. Test sends are not. - Opens and clicks judged to be made by a machine, for example a mail scanner, are not sent.
- An event can arrive more than once and out of order. Drop duplicates by
X-AcornDispatch-Deliveryand order by the time fields.
Each event and the fields of its body. One handler can read every event by RecordType.
| RecordType | Fields |
|---|---|
Delivery | RecordType, MessageStream, MessageID, Recipient, Tag, Metadata, DeliveredAt and Details |
Bounce | RecordType, MessageStream, MessageID, Recipient, Email, Tag, Metadata, Type, TypeCode, Name, Description, Details, Inactive and BouncedAt |
SpamComplaint | RecordType, MessageStream, MessageID, Recipient, Email, Tag, Metadata, Type, TypeCode, Name, Description, Details, Inactive, BouncedAt and TopicsTurnedOff |
Open | RecordType, MessageStream, MessageID, Recipient, Tag, Metadata, ReceivedAt, FirstOpen and UserAgent |
Click | RecordType, MessageStream, MessageID, Recipient, Tag, Metadata, ReceivedAt, OriginalLink, ClickLocation and UserAgent |
SubscriptionChange | RecordType, MessageStream, MessageID, Recipient, Tag, Metadata, ChangedAt, Origin, SuppressSending and SuppressionReason |
DeliveryRecordType,MessageStream,MessageID,Recipient,Tag,Metadata,DeliveredAtandDetailsBounceRecordType,MessageStream,MessageID,Recipient,Email,Tag,Metadata,Type,TypeCode,Name,Description,Details,InactiveandBouncedAtSpamComplaintRecordType,MessageStream,MessageID,Recipient,Email,Tag,Metadata,Type,TypeCode,Name,Description,Details,Inactive,BouncedAtandTopicsTurnedOffOpenRecordType,MessageStream,MessageID,Recipient,Tag,Metadata,ReceivedAt,FirstOpenandUserAgentClickRecordType,MessageStream,MessageID,Recipient,Tag,Metadata,ReceivedAt,OriginalLink,ClickLocationandUserAgentSubscriptionChangeRecordType,MessageStream,MessageID,Recipient,Tag,Metadata,ChangedAt,Origin,SuppressSendingandSuppressionReason
The receiving server took the message.
| Field | Type | Meaning |
|---|---|---|
RecordType | string: Delivery | The event name. |
MessageStream | string or null | The stream key. null when unknown. |
MessageID | string | The message id, as the send answer gave it. |
Recipient | string | The recipient's address. |
Tag | string | The message's tag, or "" when it had none. Only messages your app sends carry one. |
Metadata | object | The message's metadata, or {} when it had none. Only messages your app sends carry it. |
DeliveredAt | string | When the receiving server took it, as an ISO 8601 string. |
Details | string | The receiving server's answer, or "". |
RecordTypestring:DeliveryThe event name.MessageStreamstring or nullThe stream key.nullwhen unknown.MessageIDstringThe message id, as the send answer gave it.RecipientstringThe recipient's address.TagstringThe message's tag, or""when it had none. Only messages your app sends carry one.MetadataobjectThe message's metadata, or{}when it had none. Only messages your app sends carry it.DeliveredAtstringWhen the receiving server took it, as an ISO 8601 string.DetailsstringThe receiving server's answer, or"".
{
"RecordType": "Delivery",
"MessageStream": "default_transactional",
"MessageID": "6f1c2a9e-3b7d-4c55-9a0e-8d2f41b7c3e6",
"Recipient": "ana@example.com",
"Tag": "password-reset",
"Metadata": {
"user_id": "4821"
},
"DeliveredAt": "2026-11-15T09:42:07.000Z",
"Details": "250 2.0.0 OK"
}The receiving server refused the message, at once or later.
| Field | Type | Meaning |
|---|---|---|
RecordType | string: Bounce | The event name. |
MessageStream | string or null | The stream key. null when unknown. |
MessageID | string | The message id, as the send answer gave it. |
Recipient | string | The recipient's address. |
Email | string | The same address as Recipient. |
Tag | string | The message's tag, or "" when it had none. Only messages your app sends carry one. |
Metadata | object | The message's metadata, or {} when it had none. Only messages your app sends carry it. |
Type | string: HardBounce, SoftBounce, Blocked or Unknown | The bounce type. |
TypeCode | integer | HardBounce is 1, SoftBounce is 4096, Blocked is 100006, Unknown is 2048. |
Name | string | A short name of the type. |
Description | string | One sentence about the type. |
Details | string | The receiving server's answer, or "". |
Inactive | boolean | true when the address is now blocked on the message's stream. |
BouncedAt | string | When it bounced, as an ISO 8601 string. |
RecordTypestring:BounceThe event name.MessageStreamstring or nullThe stream key.nullwhen unknown.MessageIDstringThe message id, as the send answer gave it.RecipientstringThe recipient's address.EmailstringThe same address asRecipient.TagstringThe message's tag, or""when it had none. Only messages your app sends carry one.MetadataobjectThe message's metadata, or{}when it had none. Only messages your app sends carry it.Typestring:HardBounce,SoftBounce,BlockedorUnknownThe bounce type.TypeCodeintegerHardBounceis1,SoftBounceis4096,Blockedis100006,Unknownis2048.NamestringA short name of the type.DescriptionstringOne sentence about the type.DetailsstringThe receiving server's answer, or"".Inactivebooleantruewhen the address is now blocked on the message's stream.BouncedAtstringWhen it bounced, as an ISO 8601 string.
{
"RecordType": "Bounce",
"MessageStream": "default_transactional",
"MessageID": "6f1c2a9e-3b7d-4c55-9a0e-8d2f41b7c3e6",
"Recipient": "ana@example.com",
"Tag": "password-reset",
"Metadata": {
"user_id": "4821"
},
"Email": "ana@example.com",
"Type": "HardBounce",
"TypeCode": 1,
"Name": "Hard bounce",
"Description": "The address does not exist, or the receiving server refused it for good.",
"Details": "550 5.1.1 The email account that you tried to reach does not exist.",
"Inactive": true,
"BouncedAt": "2026-11-15T09:42:09.000Z"
}The recipient marked the message as spam.
| Field | Type | Meaning |
|---|---|---|
RecordType | string: SpamComplaint | The event name. |
MessageStream | string or null | The stream key. null when unknown. |
MessageID | string | The message id, as the send answer gave it. |
Recipient | string | The recipient's address. |
Email | string | The same address as Recipient. |
Tag | string | The message's tag, or "" when it had none. Only messages your app sends carry one. |
Metadata | object | The message's metadata, or {} when it had none. Only messages your app sends carry it. |
Type | string: SpamComplaint | Always SpamComplaint. |
TypeCode | integer | Always 100001. |
Name | string | A short name of the type. |
Description | string | One sentence about the type. |
Details | string | Always "". |
Inactive | boolean | true when a new send of this message to the address would now be skipped. |
BouncedAt | string | When the complaint came in, as an ISO 8601 string. |
TopicsTurnedOff | array of strings | The keys of the topics the complaint turned off for the address: the Topic of the send, else the topics of its mailing or automation, its template and its stream, in that order. [] when the message had no topic: the address then gets no more emails without a topic. |
RecordTypestring:SpamComplaintThe event name.MessageStreamstring or nullThe stream key.nullwhen unknown.MessageIDstringThe message id, as the send answer gave it.RecipientstringThe recipient's address.EmailstringThe same address asRecipient.TagstringThe message's tag, or""when it had none. Only messages your app sends carry one.MetadataobjectThe message's metadata, or{}when it had none. Only messages your app sends carry it.Typestring:SpamComplaintAlwaysSpamComplaint.TypeCodeintegerAlways100001.NamestringA short name of the type.DescriptionstringOne sentence about the type.DetailsstringAlways"".Inactivebooleantruewhen a new send of this message to the address would now be skipped.BouncedAtstringWhen the complaint came in, as an ISO 8601 string.TopicsTurnedOffarray of stringsThe keys of the topics the complaint turned off for the address: theTopicof the send, else the topics of its mailing or automation, its template and its stream, in that order.[]when the message had no topic: the address then gets no more emails without a topic.
{
"RecordType": "SpamComplaint",
"MessageStream": "default_broadcast",
"MessageID": "6f1c2a9e-3b7d-4c55-9a0e-8d2f41b7c3e6",
"Recipient": "ana@example.com",
"Tag": "",
"Metadata": {},
"Email": "ana@example.com",
"Type": "SpamComplaint",
"TypeCode": 100001,
"Name": "Spam complaint",
"Description": "The recipient marked the message as spam.",
"Details": "",
"Inactive": true,
"BouncedAt": "2026-11-15T11:03:40.000Z",
"TopicsTurnedOff": [
"newsletter"
]
}The recipient opened the message.
| Field | Type | Meaning |
|---|---|---|
RecordType | string: Open | The event name. |
MessageStream | string or null | The stream key. null when unknown. |
MessageID | string | The message id, as the send answer gave it. |
Recipient | string | The recipient's address. |
Tag | string | The message's tag, or "" when it had none. Only messages your app sends carry one. |
Metadata | object | The message's metadata, or {} when it had none. Only messages your app sends carry it. |
ReceivedAt | string | When it happened, as an ISO 8601 string. |
FirstOpen | boolean | true for the first open of the message. |
UserAgent | string | The recipient's user agent, or "". |
RecordTypestring:OpenThe event name.MessageStreamstring or nullThe stream key.nullwhen unknown.MessageIDstringThe message id, as the send answer gave it.RecipientstringThe recipient's address.TagstringThe message's tag, or""when it had none. Only messages your app sends carry one.MetadataobjectThe message's metadata, or{}when it had none. Only messages your app sends carry it.ReceivedAtstringWhen it happened, as an ISO 8601 string.FirstOpenbooleantruefor the first open of the message.UserAgentstringThe recipient's user agent, or"".
{
"RecordType": "Open",
"MessageStream": "default_transactional",
"MessageID": "6f1c2a9e-3b7d-4c55-9a0e-8d2f41b7c3e6",
"Recipient": "ana@example.com",
"Tag": "password-reset",
"Metadata": {
"user_id": "4821"
},
"ReceivedAt": "2026-11-15T09:47:31.000Z",
"FirstOpen": true,
"UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_1 like Mac OS X) AppleWebKit/605.1.15"
}The recipient clicked a link in the message.
| Field | Type | Meaning |
|---|---|---|
RecordType | string: Click | The event name. |
MessageStream | string or null | The stream key. null when unknown. |
MessageID | string | The message id, as the send answer gave it. |
Recipient | string | The recipient's address. |
Tag | string | The message's tag, or "" when it had none. Only messages your app sends carry one. |
Metadata | object | The message's metadata, or {} when it had none. Only messages your app sends carry it. |
ReceivedAt | string | When it happened, as an ISO 8601 string. |
OriginalLink | string | The link as your app wrote it. |
ClickLocation | string: HTML | Always HTML. |
UserAgent | string | The recipient's user agent, or "". |
RecordTypestring:ClickThe event name.MessageStreamstring or nullThe stream key.nullwhen unknown.MessageIDstringThe message id, as the send answer gave it.RecipientstringThe recipient's address.TagstringThe message's tag, or""when it had none. Only messages your app sends carry one.MetadataobjectThe message's metadata, or{}when it had none. Only messages your app sends carry it.ReceivedAtstringWhen it happened, as an ISO 8601 string.OriginalLinkstringThe link as your app wrote it.ClickLocationstring:HTMLAlwaysHTML.UserAgentstringThe recipient's user agent, or"".
{
"RecordType": "Click",
"MessageStream": "default_transactional",
"MessageID": "6f1c2a9e-3b7d-4c55-9a0e-8d2f41b7c3e6",
"Recipient": "ana@example.com",
"Tag": "password-reset",
"Metadata": {
"user_id": "4821"
},
"ReceivedAt": "2026-11-15T09:48:02.000Z",
"OriginalLink": "https://acme.example/reset?token=abc123",
"ClickLocation": "HTML",
"UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_1 like Mac OS X) AppleWebKit/605.1.15"
}An address was blocked or unblocked on a stream. One event per stream whose state changed.
| Field | Type | Meaning |
|---|---|---|
RecordType | string: SubscriptionChange | The event name. |
MessageStream | string | The stream whose state changed. |
MessageID | string or null | The message that caused the change, or null when none did: a suppression added or lifted by hand or by API. |
Recipient | string | The recipient's address. |
Tag | string | The message's tag, or "" when it had none. Only messages your app sends carry one. |
Metadata | object | The message's metadata, or {} when it had none. Only messages your app sends carry it. |
ChangedAt | string | When it changed, as an ISO 8601 string. |
Origin | string: Recipient or Customer | Recipient: the recipient acted. Customer: your workspace or your app acted, including a lift through DELETE /api/v1/suppressions. |
SuppressSending | boolean | true when the address is now blocked on that stream. |
SuppressionReason | string or null: HardBounce, SpamComplaint or ManualSuppression | Why it is blocked. null when SuppressSending is false. |
RecordTypestring:SubscriptionChangeThe event name.MessageStreamstringThe stream whose state changed.MessageIDstring or nullThe message that caused the change, ornullwhen none did: a suppression added or lifted by hand or by API.RecipientstringThe recipient's address.TagstringThe message's tag, or""when it had none. Only messages your app sends carry one.MetadataobjectThe message's metadata, or{}when it had none. Only messages your app sends carry it.ChangedAtstringWhen it changed, as an ISO 8601 string.Originstring:RecipientorCustomerRecipient: the recipient acted.Customer: your workspace or your app acted, including a lift throughDELETE /api/v1/suppressions.SuppressSendingbooleantruewhen the address is now blocked on that stream.SuppressionReasonstring or null:HardBounce,SpamComplaintorManualSuppressionWhy it is blocked.nullwhenSuppressSendingis false.
{
"RecordType": "SubscriptionChange",
"MessageStream": "default_broadcast",
"MessageID": null,
"Recipient": "ana@example.com",
"Tag": "",
"Metadata": {},
"ChangedAt": "2026-11-15T12:15:00.000Z",
"Origin": "Customer",
"SuppressSending": true,
"SuppressionReason": "ManualSuppression"
}Every request has these headers:
| Header | Value |
|---|---|
X-AcornDispatch-Signature | t=<unix>,v1=<hex>: t is the send time in Unix seconds, v1 the lower-case hex HMAC-SHA256 of <t>.<raw body>, keyed by the signing secret. |
X-AcornDispatch-Delivery | The delivery id. It is the same on every retry of one event: use it to drop duplicates. |
content-type | application/json |
user-agent | AcornDispatch-Webhooks/1.0 (+https://acorndispatch.com) |
authorization | Basic ..., when the webhook has http_auth. |
X-AcornDispatch-Signaturet=<unix>,v1=<hex>:tis the send time in Unix seconds,v1the lower-case hex HMAC-SHA256 of<t>.<raw body>, keyed by the signing secret.X-AcornDispatch-DeliveryThe delivery id. It is the same on every retry of one event: use it to drop duplicates.content-typeapplication/jsonuser-agentAcornDispatch-Webhooks/1.0 (+https://acorndispatch.com)authorizationBasic ..., when the webhook hashttp_auth.
- Check the signature over the raw body text, before you parse it.
- Refuse a
tmore than 300 seconds from your clock, either side. - Compare the HMAC in constant time.
The receivers below do all three, read the secret from ACORNDISPATCH_WEBHOOK_SECRET, and answer 200, or 400 when the check fails.
- Answer with a 2xx within 10 seconds. Do the work after you answer. AcornDispatch reads at most 64 KB of the answer and keeps none of it.
- A 408, a 429, a 5xx, a timeout or a connection error is retried after 1 minute, 5 minutes, 15 minutes, 30 minutes, 1 hour, 2 hours, 4 hours and 6 hours, then every 6 hours. 24 hours after the event, the delivery stops for good.
- A 3xx is not followed and is not retried. Any other 4xx is not retried. Neither is a host that no longer points to a public address.
- When every delivery to a webhook has failed for 48 hours, AcornDispatch turns the webhook off (
disabled_reasonfailing) and drops its pending deliveries. Turn it on again withPATCH /api/v1/webhooks/{id}and{ "enabled": true }.
A small server in each language. It checks the signature, reads the secret from ACORNDISPATCH_WEBHOOK_SECRET and answers 200, or 400 when the check fails.
Example
// Node.js 18 or later, no packages. Run: node receiver.mjs
import { createHmac, timingSafeEqual } from 'node:crypto'
import { createServer } from 'node:http'
const SECRET = process.env.ACORNDISPATCH_WEBHOOK_SECRET
if (!SECRET) throw new Error('Set ACORNDISPATCH_WEBHOOK_SECRET')
const TOLERANCE_SECONDS = 300
function verify(header, rawBody) {
const m = /^t=(\d+),v1=([0-9a-f]{64})$/.exec(header ?? '')
if (!m) return false
if (Math.abs(Date.now() / 1000 - Number(m[1])) > TOLERANCE_SECONDS) return false
const expected = createHmac('sha256', SECRET).update(`${m[1]}.`).update(rawBody).digest()
return timingSafeEqual(expected, Buffer.from(m[2], 'hex'))
}
createServer((req, res) => {
const chunks = []
req.on('data', (chunk) => chunks.push(chunk))
req.on('end', () => {
const rawBody = Buffer.concat(chunks)
if (req.method !== 'POST' || !verify(req.headers['x-acorndispatch-signature'], rawBody)) {
res.writeHead(400).end()
return
}
const event = JSON.parse(rawBody.toString('utf8'))
console.log(event.RecordType, event.MessageID, req.headers['x-acorndispatch-delivery'])
res.writeHead(200).end()
})
}).listen(Number(process.env.PORT ?? 3000)){
"RecordType": "Delivery",
"MessageStream": "default_transactional",
"MessageID": "6f1c2a9e-3b7d-4c55-9a0e-8d2f41b7c3e6",
"Recipient": "ana@example.com",
"Tag": "password-reset",
"Metadata": {
"user_id": "4821"
},
"DeliveredAt": "2026-11-15T09:42:07.000Z",
"Details": "250 2.0.0 OK"
}// Node.js 18 or later, no packages. Run: node receiver.mjs
import { createHmac, timingSafeEqual } from 'node:crypto'
import { createServer } from 'node:http'
const SECRET = process.env.ACORNDISPATCH_WEBHOOK_SECRET
if (!SECRET) throw new Error('Set ACORNDISPATCH_WEBHOOK_SECRET')
const TOLERANCE_SECONDS = 300
function verify(header, rawBody) {
const m = /^t=(\d+),v1=([0-9a-f]{64})$/.exec(header ?? '')
if (!m) return false
if (Math.abs(Date.now() / 1000 - Number(m[1])) > TOLERANCE_SECONDS) return false
const expected = createHmac('sha256', SECRET).update(`${m[1]}.`).update(rawBody).digest()
return timingSafeEqual(expected, Buffer.from(m[2], 'hex'))
}
createServer((req, res) => {
const chunks = []
req.on('data', (chunk) => chunks.push(chunk))
req.on('end', () => {
const rawBody = Buffer.concat(chunks)
if (req.method !== 'POST' || !verify(req.headers['x-acorndispatch-signature'], rawBody)) {
res.writeHead(400).end()
return
}
const event = JSON.parse(rawBody.toString('utf8'))
console.log(event.RecordType, event.MessageID, req.headers['x-acorndispatch-delivery'])
res.writeHead(200).end()
})
}).listen(Number(process.env.PORT ?? 3000)){
"RecordType": "Delivery",
"MessageStream": "default_transactional",
"MessageID": "6f1c2a9e-3b7d-4c55-9a0e-8d2f41b7c3e6",
"Recipient": "ana@example.com",
"Tag": "password-reset",
"Metadata": {
"user_id": "4821"
},
"DeliveredAt": "2026-11-15T09:42:07.000Z",
"Details": "250 2.0.0 OK"
}GET/
Needsmailings:read
Mailings, newest first, one page at a time.
Query
| Field | Type | Required | Note |
|---|---|---|---|
status | string: draft, scheduled, sending, sent, paused or canceled | No | One status, or a comma-separated list. |
limit | integer | No | 1 to 100 mailings per page. Default 20. |
cursor | string | No | next_cursor of the page before. |
statusstring, optionalOne status, or a comma-separated list.string:draft,scheduled,sending,sent,pausedorcanceledlimitinteger, optional1 to 100 mailings per page. Default 20.cursorstring, optionalnext_cursorof the page before.
Errors
| Code | HTTP | When |
|---|---|---|
unauthorized | 401 | The API key is missing or wrong. |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
unauthorized401The API key is missing or wrong.rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.
Example
curl -sS -G 'https://api.acorndispatch.com/api/v1/mailings' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
--data-urlencode 'status=draft'{
"data": [
{
"id": "brd_8fK2mQ9xLp3vT7wZ",
"name": "November newsletter",
"status": "draft",
"subject": "What is new in November",
"preheader": "Three new templates and a faster editor",
"sender_identity_id": null,
"reply_to": null,
"audience_id": "aud_N4tq8ZbW2rYc6Hkx",
"topic": null,
"html": "<h1>What is new in November</h1><p>Three new templates and a faster editor.</p>",
"template_version": 1,
"lint": {
"errors": [],
"warnings": []
},
"last_test_sent_at": null,
"scheduled_at": null,
"proposed_send_at": null,
"created_at": "2026-11-15T10:12:44.000Z",
"updated_at": "2026-11-15T10:12:44.000Z"
}
],
"next_cursor": null
}curl -sS -G 'https://api.acorndispatch.com/api/v1/mailings' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
--data-urlencode 'status=draft'{
"data": [
{
"id": "brd_8fK2mQ9xLp3vT7wZ",
"name": "November newsletter",
"status": "draft",
"subject": "What is new in November",
"preheader": "Three new templates and a faster editor",
"sender_identity_id": null,
"reply_to": null,
"audience_id": "aud_N4tq8ZbW2rYc6Hkx",
"topic": null,
"html": "<h1>What is new in November</h1><p>Three new templates and a faster editor.</p>",
"template_version": 1,
"lint": {
"errors": [],
"warnings": []
},
"last_test_sent_at": null,
"scheduled_at": null,
"proposed_send_at": null,
"created_at": "2026-11-15T10:12:44.000Z",
"updated_at": "2026-11-15T10:12:44.000Z"
}
],
"next_cursor": null
}POST/
Needsmailings:write
Creates a draft. It goes out on the Mailings stream.
- A mailing names no stream: a
streamfield gets 400invalid_request, as any unknown field does. - An unknown audience or sender, or a Reply-To that is not an address, gets 422
validation_failed.
Body
| Field | Type | Required | Note |
|---|---|---|---|
name | string | Yes | A name for your team. Recipients never see it. |
subject | string | Yes | The subject line. Not blank. |
html | string | Yes | The full HTML of the email. Not blank. Liquid works. |
preheader | string or null | No | The preview text after the subject in the inbox. |
audience_id | string or null | No | An audience id from GET /api/v1/audiences. null: no audience yet. Left out: the audience with the key newsletter, when there is one. |
sender_identity_id | string or null | No | A sender of this workspace. null: the workspace default when it sends. |
reply_to | string or null | No | A Reply-To address. null or "": none. |
topic | string or null | No | The key of a topic recipients can choose. null: none. An unknown, hidden or archived key gets 400 invalid_request. |
namestring, requiredA name for your team. Recipients never see it.subjectstring, requiredThe subject line. Not blank.htmlstring, requiredThe full HTML of the email. Not blank. Liquid works.preheaderstring or null, optionalThe preview text after the subject in the inbox.audience_idstring or null, optionalAn audience id fromGET /api/v1/audiences.null: no audience yet. Left out: the audience with the keynewsletter, when there is one.sender_identity_idstring or null, optionalA sender of this workspace.null: the workspace default when it sends.reply_tostring or null, optionalA Reply-To address.nullor"": none.topicstring or null, optionalThe key of a topic recipients can choose.null: none. An unknown, hidden or archived key gets 400invalid_request.
Errors
| Code | HTTP | When |
|---|---|---|
unauthorized | 401 | The API key is missing or wrong. |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
validation_failed | 422 | A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule. |
unauthorized401The API key is missing or wrong.rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.payload_too_large413The body is over the route's limit. See Body size.validation_failed422A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule.
Example
curl -sS -X POST 'https://api.acorndispatch.com/api/v1/mailings' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"name": "November newsletter",
"subject": "What is new in November",
"preheader": "Three new templates and a faster editor",
"html": "<h1>What is new in November</h1><p>Three new templates and a faster editor.</p>"
}'{
"id": "brd_8fK2mQ9xLp3vT7wZ",
"name": "November newsletter",
"status": "draft",
"subject": "What is new in November",
"preheader": "Three new templates and a faster editor",
"sender_identity_id": null,
"reply_to": null,
"audience_id": "aud_N4tq8ZbW2rYc6Hkx",
"topic": null,
"html": "<h1>What is new in November</h1><p>Three new templates and a faster editor.</p>",
"template_version": 1,
"lint": {
"errors": [],
"warnings": []
},
"last_test_sent_at": null,
"scheduled_at": null,
"proposed_send_at": null,
"created_at": "2026-11-15T10:12:44.000Z",
"updated_at": "2026-11-15T10:12:44.000Z"
}curl -sS -X POST 'https://api.acorndispatch.com/api/v1/mailings' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"name": "November newsletter",
"subject": "What is new in November",
"preheader": "Three new templates and a faster editor",
"html": "<h1>What is new in November</h1><p>Three new templates and a faster editor.</p>"
}'{
"id": "brd_8fK2mQ9xLp3vT7wZ",
"name": "November newsletter",
"status": "draft",
"subject": "What is new in November",
"preheader": "Three new templates and a faster editor",
"sender_identity_id": null,
"reply_to": null,
"audience_id": "aud_N4tq8ZbW2rYc6Hkx",
"topic": null,
"html": "<h1>What is new in November</h1><p>Three new templates and a faster editor.</p>",
"template_version": 1,
"lint": {
"errors": [],
"warnings": []
},
"last_test_sent_at": null,
"scheduled_at": null,
"proposed_send_at": null,
"created_at": "2026-11-15T10:12:44.000Z",
"updated_at": "2026-11-15T10:12:44.000Z"
}GET/
Needsmailings:read
One mailing, with its variants and A/B test when it has more than one variant.
Path
| Field | Type | Required | Note |
|---|---|---|---|
id | string | Yes | The mailing id. |
idstring, requiredThe mailing id.
Errors
| Code | HTTP | When |
|---|---|---|
unauthorized | 401 | The API key is missing or wrong. |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
unauthorized401The API key is missing or wrong.rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.
Example
curl -sS 'https://api.acorndispatch.com/api/v1/mailings/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"id": "brd_8fK2mQ9xLp3vT7wZ",
"name": "November newsletter",
"status": "draft",
"subject": "What is new in November",
"preheader": "Three new templates and a faster editor",
"sender_identity_id": null,
"reply_to": null,
"audience_id": "aud_N4tq8ZbW2rYc6Hkx",
"topic": null,
"html": "<h1>What is new in November</h1><p>Three new templates and a faster editor.</p>",
"template_version": 1,
"lint": {
"errors": [],
"warnings": []
},
"last_test_sent_at": null,
"scheduled_at": null,
"proposed_send_at": null,
"created_at": "2026-11-15T10:12:44.000Z",
"updated_at": "2026-11-15T10:12:44.000Z"
}curl -sS 'https://api.acorndispatch.com/api/v1/mailings/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"id": "brd_8fK2mQ9xLp3vT7wZ",
"name": "November newsletter",
"status": "draft",
"subject": "What is new in November",
"preheader": "Three new templates and a faster editor",
"sender_identity_id": null,
"reply_to": null,
"audience_id": "aud_N4tq8ZbW2rYc6Hkx",
"topic": null,
"html": "<h1>What is new in November</h1><p>Three new templates and a faster editor.</p>",
"template_version": 1,
"lint": {
"errors": [],
"warnings": []
},
"last_test_sent_at": null,
"scheduled_at": null,
"proposed_send_at": null,
"created_at": "2026-11-15T10:12:44.000Z",
"updated_at": "2026-11-15T10:12:44.000Z"
}PATCH/
Needsmailings:write
Changes a draft. Send only the fields you change.
- Drafts only. Any other status gets 409
conflict. statusorscheduled_atin the body gets 403forbidden: only a person schedules.- A content field saves a new
template_version.
Path
| Field | Type | Required | Note |
|---|---|---|---|
id | string | Yes | The mailing id. |
idstring, requiredThe mailing id.
Body
| Field | Type | Required | Note |
|---|---|---|---|
name | string | No | A name for your team. Recipients never see it. |
subject | string | No | The subject line. Not blank. |
html | string | No | The full HTML of the email. Not blank. Liquid works. |
preheader | string or null | No | The preview text after the subject in the inbox. |
audience_id | string or null | No | An audience id from GET /api/v1/audiences. null: no audience yet. |
sender_identity_id | string or null | No | A sender of this workspace. null: the workspace default when it sends. |
reply_to | string or null | No | A Reply-To address. null or "": none. |
topic | string or null | No | The key of a topic recipients can choose. null: none. An unknown, hidden or archived key gets 400 invalid_request. |
base_version | integer or null | No | The template_version you started from. When a newer version was saved since, the change gets 409 conflict. |
namestring, optionalA name for your team. Recipients never see it.subjectstring, optionalThe subject line. Not blank.htmlstring, optionalThe full HTML of the email. Not blank. Liquid works.preheaderstring or null, optionalThe preview text after the subject in the inbox.audience_idstring or null, optionalAn audience id fromGET /api/v1/audiences.null: no audience yet.sender_identity_idstring or null, optionalA sender of this workspace.null: the workspace default when it sends.reply_tostring or null, optionalA Reply-To address.nullor"": none.topicstring or null, optionalThe key of a topic recipients can choose.null: none. An unknown, hidden or archived key gets 400invalid_request.base_versioninteger or null, optionalThetemplate_versionyou started from. When a newer version was saved since, the change gets 409conflict.
Errors
| Code | HTTP | When |
|---|---|---|
unauthorized | 401 | The API key is missing or wrong. |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
validation_failed | 422 | A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule. |
conflict | 409 | The change does not fit the current state, for example an edit of a mailing that is no longer a draft. |
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
unauthorized401The API key is missing or wrong.rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.payload_too_large413The body is over the route's limit. See Body size.validation_failed422A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule.conflict409The change does not fit the current state, for example an edit of a mailing that is no longer a draft.not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.
Example
curl -sS -X PATCH 'https://api.acorndispatch.com/api/v1/mailings/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"subject": "Three new templates, one faster editor"
}'{
"id": "brd_8fK2mQ9xLp3vT7wZ",
"name": "November newsletter",
"status": "draft",
"subject": "Three new templates, one faster editor",
"preheader": "Three new templates and a faster editor",
"sender_identity_id": null,
"reply_to": null,
"audience_id": "aud_N4tq8ZbW2rYc6Hkx",
"topic": null,
"html": "<h1>What is new in November</h1><p>Three new templates and a faster editor.</p>",
"template_version": 2,
"lint": {
"errors": [],
"warnings": []
},
"last_test_sent_at": null,
"scheduled_at": null,
"proposed_send_at": null,
"created_at": "2026-11-15T10:12:44.000Z",
"updated_at": "2026-11-15T10:31:05.000Z"
}curl -sS -X PATCH 'https://api.acorndispatch.com/api/v1/mailings/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"subject": "Three new templates, one faster editor"
}'{
"id": "brd_8fK2mQ9xLp3vT7wZ",
"name": "November newsletter",
"status": "draft",
"subject": "Three new templates, one faster editor",
"preheader": "Three new templates and a faster editor",
"sender_identity_id": null,
"reply_to": null,
"audience_id": "aud_N4tq8ZbW2rYc6Hkx",
"topic": null,
"html": "<h1>What is new in November</h1><p>Three new templates and a faster editor.</p>",
"template_version": 2,
"lint": {
"errors": [],
"warnings": []
},
"last_test_sent_at": null,
"scheduled_at": null,
"proposed_send_at": null,
"created_at": "2026-11-15T10:12:44.000Z",
"updated_at": "2026-11-15T10:31:05.000Z"
}POST/
Needsmailings:write
Sends the current content to you and your team. The subject starts with [TEST], or [TEST B] for variant B of an A/B test. A test counts in no stats.
- Each address must be a workspace member or on the test allowlist. Anyone else gets 422
address_not_allowed. - A variant the mailing does not have gets 404
not_found.
Path
| Field | Type | Required | Note |
|---|---|---|---|
id | string | Yes | The mailing id. |
idstring, requiredThe mailing id.
Body
| Field | Type | Required | Note |
|---|---|---|---|
to | array of strings | Yes | 1 to 10 different addresses, in a list of at most 50. |
variant | string: A, B, C, D, E, F, G or H | No | The variant to test. Default A. |
toarray of strings, required1 to 10 different addresses, in a list of at most 50.variantstring, optionalThe variant to test. DefaultA.string:A,B,C,D,E,F,GorH
Errors
| Code | HTTP | When |
|---|---|---|
unauthorized | 401 | The API key is missing or wrong. |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
validation_failed | 422 | A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule. |
address_not_allowed | 422 | A mailing test send names an address that is not a workspace member or on the test list. The send routes never answer it. |
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
unauthorized401The API key is missing or wrong.rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.payload_too_large413The body is over the route's limit. See Body size.validation_failed422A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule.address_not_allowed422A mailing test send names an address that is not a workspace member or on the test list. The send routes never answer it.not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.
Example
curl -sS -X POST 'https://api.acorndispatch.com/api/v1/mailings//test' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"to": [
""
]
}'{
"sent": [
"you@your-domain.com"
]
}curl -sS -X POST 'https://api.acorndispatch.com/api/v1/mailings//test' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"to": [
""
]
}'{
"sent": [
"you@your-domain.com"
]
}POST/
Needsmailings:write
Runs the checks for a send time and stores it as a proposal. It never schedules: a person opens review_url and schedules there.
- Drafts only. Any other status gets 409
conflict. - A time in the past or too far ahead gets 422
validation_failed. - A failed check is data, not an error:
readyisfalseand the check has afix. The checks, in order:content,test,sending_domain,link_domain,sending_accountandaudience. - The answer holds at the time of the call only. The checks run again when a person schedules.
Path
| Field | Type | Required | Note |
|---|---|---|---|
id | string | Yes | The mailing id. |
idstring, requiredThe mailing id.
Body
| Field | Type | Required | Note |
|---|---|---|---|
send_at | string | Yes | An ISO 8601 time with an offset, after now and at most 90 days ahead. |
send_atstring, requiredAn ISO 8601 time with an offset, after now and at most 90 days ahead.
Errors
| Code | HTTP | When |
|---|---|---|
unauthorized | 401 | The API key is missing or wrong. |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
validation_failed | 422 | A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule. |
conflict | 409 | The change does not fit the current state, for example an edit of a mailing that is no longer a draft. |
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
unauthorized401The API key is missing or wrong.rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.payload_too_large413The body is over the route's limit. See Body size.validation_failed422A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule.conflict409The change does not fit the current state, for example an edit of a mailing that is no longer a draft.not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.
Example
curl -sS -X POST 'https://api.acorndispatch.com/api/v1/mailings//prepare-schedule' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"send_at": ""
}'{
"ready": false,
"checks": [
{
"key": "content",
"passed": true,
"fix": null
},
{
"key": "test",
"passed": false,
"fix": "Send a test of this version"
},
{
"key": "sending_domain",
"passed": true,
"fix": null
},
{
"key": "link_domain",
"passed": true,
"fix": null
},
{
"key": "sending_account",
"passed": true,
"fix": null
},
{
"key": "audience",
"passed": true,
"fix": null
}
],
"final_count": 45822,
"proposed_send_at": "2026-12-01T17:00:00.000Z",
"review_url": "https://app.acorndispatch.com/mailings/brd_8fK2mQ9xLp3vT7wZ/review"
}curl -sS -X POST 'https://api.acorndispatch.com/api/v1/mailings//prepare-schedule' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"send_at": ""
}'{
"ready": false,
"checks": [
{
"key": "content",
"passed": true,
"fix": null
},
{
"key": "test",
"passed": false,
"fix": "Send a test of this version"
},
{
"key": "sending_domain",
"passed": true,
"fix": null
},
{
"key": "link_domain",
"passed": true,
"fix": null
},
{
"key": "sending_account",
"passed": true,
"fix": null
},
{
"key": "audience",
"passed": true,
"fix": null
}
],
"final_count": 45822,
"proposed_send_at": "2026-12-01T17:00:00.000Z",
"review_url": "https://app.acorndispatch.com/mailings/brd_8fK2mQ9xLp3vT7wZ/review"
}GET/
Needsreports:read
How a mailing did: who it went to, deliveries, bounces, opens, clicks and links. Rates are fractions from 0 to 1, or null before there is anything to count.
Path
| Field | Type | Required | Note |
|---|---|---|---|
id | string | Yes | The mailing id. |
idstring, requiredThe mailing id.
Errors
| Code | HTTP | When |
|---|---|---|
unauthorized | 401 | The API key is missing or wrong. |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
unauthorized401The API key is missing or wrong.rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.
Example
curl -sS 'https://api.acorndispatch.com/api/v1/mailings//report' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"mailing_id": "brd_8fK2mQ9xLp3vT7wZ",
"status": "sent",
"started_at": "2026-11-18T17:00:00.000Z",
"finished_at": "2026-11-18T17:41:12.000Z",
"at_start": {
"audience": 48210,
"unsubscribed": 1310,
"topic_opted_out": 402,
"suppressed": 655,
"invalid_email": 21,
"final": 45822,
"ad_recipients": 45822
},
"skipped_at_send": [],
"pending": 0,
"attempted": 45822,
"delivered": 45390,
"bounced": {
"hard": 212,
"soft": 160,
"policy": 38,
"other": 4
},
"bounced_total": 236,
"no_result_yet": 18,
"failed": 0,
"complaints": 9,
"unique_opens": {
"all": 21480,
"human": 17312
},
"unique_clicks": {
"all": 3204,
"human": 2981
},
"unsubscribes": 97,
"archived": false,
"links": [
{
"url": "https://acme.example/templates",
"label": "See the new templates",
"unique_clicks": 2140,
"total_clicks": 2655
}
],
"delivered_rate": 0.9906,
"bounce_rate": 0.0052,
"skipped_rate": 0,
"failed_rate": 0,
"rates_over_delivered": {
"unique_opens_human": 0.3814,
"unique_opens_all": 0.4732,
"unique_clicks_human": 0.0657,
"unique_clicks_all": 0.0706,
"unsubscribes": 0.0021
},
"progress": {
"done": 45822,
"total": 45822,
"rate_per_second": null,
"estimated_finish_at": null,
"held": null
}
}curl -sS 'https://api.acorndispatch.com/api/v1/mailings//report' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"mailing_id": "brd_8fK2mQ9xLp3vT7wZ",
"status": "sent",
"started_at": "2026-11-18T17:00:00.000Z",
"finished_at": "2026-11-18T17:41:12.000Z",
"at_start": {
"audience": 48210,
"unsubscribed": 1310,
"topic_opted_out": 402,
"suppressed": 655,
"invalid_email": 21,
"final": 45822,
"ad_recipients": 45822
},
"skipped_at_send": [],
"pending": 0,
"attempted": 45822,
"delivered": 45390,
"bounced": {
"hard": 212,
"soft": 160,
"policy": 38,
"other": 4
},
"bounced_total": 236,
"no_result_yet": 18,
"failed": 0,
"complaints": 9,
"unique_opens": {
"all": 21480,
"human": 17312
},
"unique_clicks": {
"all": 3204,
"human": 2981
},
"unsubscribes": 97,
"archived": false,
"links": [
{
"url": "https://acme.example/templates",
"label": "See the new templates",
"unique_clicks": 2140,
"total_clicks": 2655
}
],
"delivered_rate": 0.9906,
"bounce_rate": 0.0052,
"skipped_rate": 0,
"failed_rate": 0,
"rates_over_delivered": {
"unique_opens_human": 0.3814,
"unique_opens_all": 0.4732,
"unique_clicks_human": 0.0657,
"unique_clicks_all": 0.0706,
"unsubscribes": 0.0021
},
"progress": {
"done": 45822,
"total": 45822,
"rate_per_second": null,
"estimated_finish_at": null,
"held": null
}
}POST/
Needsmailings:write
Adds a variant with the next free key and the name Variant <key>. The first one added also sets a default A/B test.
- Send
copy_ofwithfrom: copy, and only then. - Drafts only. Any other status gets 409
conflict. - A mailing with 8 variants gets 422
validation_failed.
Path
| Field | Type | Required | Note |
|---|---|---|---|
id | string | Yes | The mailing id. |
idstring, requiredThe mailing id.
Body
| Field | Type | Required | Note |
|---|---|---|---|
from | string: blank or copy | Yes | blank starts empty with the From and Reply-To of A. copy copies a variant. |
copy_of | string: A, B, C, D, E, F, G or H | No | The variant to copy. |
fromstring, requiredblankstarts empty with the From and Reply-To ofA.copycopies a variant.string:blankorcopycopy_ofstring, optionalThe variant to copy.string:A,B,C,D,E,F,GorH
Errors
| Code | HTTP | When |
|---|---|---|
unauthorized | 401 | The API key is missing or wrong. |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
validation_failed | 422 | A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule. |
conflict | 409 | The change does not fit the current state, for example an edit of a mailing that is no longer a draft. |
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
unauthorized401The API key is missing or wrong.rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.payload_too_large413The body is over the route's limit. See Body size.validation_failed422A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule.conflict409The change does not fit the current state, for example an edit of a mailing that is no longer a draft.not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.
Example
curl -sS -X POST 'https://api.acorndispatch.com/api/v1/mailings//variants' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"from": "copy",
"copy_of": "A"
}'{
"key": "B",
"name": "Variant B"
}curl -sS -X POST 'https://api.acorndispatch.com/api/v1/mailings//variants' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"from": "copy",
"copy_of": "A"
}'{
"key": "B",
"name": "Variant B"
}PATCH/
Needsmailings:write
Changes the content of one variant. Each change saves a new version.
- Drafts only. Any other status gets 409
conflict. - Send at least one content field. An empty change gets 422
validation_failed.
Path
| Field | Type | Required | Note |
|---|---|---|---|
id | string | Yes | The mailing id. |
key | string: A, B, C, D, E, F, G or H | Yes | The variant key, A to H. Any other key gets 404 not_found. |
idstring, requiredThe mailing id.keystring, requiredThe variant key, A to H. Any other key gets 404not_found.string:A,B,C,D,E,F,GorH
Body
| Field | Type | Required | Note |
|---|---|---|---|
subject | string | No | The subject line. Not blank. |
html | string | No | The full HTML of the email. Not blank. Liquid works. |
preheader | string or null | No | The preview text after the subject in the inbox. |
sender_identity_id | string or null | No | A sender of this workspace. null: the workspace default when it sends. |
reply_to | string or null | No | A Reply-To address. null or "": none. |
base_version | integer or null | No | The template_version you started from. When a newer version was saved since, the change gets 409 conflict. |
subjectstring, optionalThe subject line. Not blank.htmlstring, optionalThe full HTML of the email. Not blank. Liquid works.preheaderstring or null, optionalThe preview text after the subject in the inbox.sender_identity_idstring or null, optionalA sender of this workspace.null: the workspace default when it sends.reply_tostring or null, optionalA Reply-To address.nullor"": none.base_versioninteger or null, optionalThetemplate_versionyou started from. When a newer version was saved since, the change gets 409conflict.
Errors
| Code | HTTP | When |
|---|---|---|
unauthorized | 401 | The API key is missing or wrong. |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
validation_failed | 422 | A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule. |
conflict | 409 | The change does not fit the current state, for example an edit of a mailing that is no longer a draft. |
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
unauthorized401The API key is missing or wrong.rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.payload_too_large413The body is over the route's limit. See Body size.validation_failed422A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule.conflict409The change does not fit the current state, for example an edit of a mailing that is no longer a draft.not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.
Example
curl -sS -X PATCH 'https://api.acorndispatch.com/api/v1/mailings//variants/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"subject": "Your November update is here"
}'{
"key": "B",
"template_version": 2,
"lint": {
"errors": [],
"warnings": []
}
}curl -sS -X PATCH 'https://api.acorndispatch.com/api/v1/mailings//variants/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"subject": "Your November update is here"
}'{
"key": "B",
"template_version": 2,
"lint": {
"errors": [],
"warnings": []
}
}DELETE/
Needsmailings:write
Removes one variant. When it was the fallback, the fallback becomes leader.
- Drafts only. Any other status gets 409
conflict. - Variant
Acannot be removed: 422validation_failed.
Path
| Field | Type | Required | Note |
|---|---|---|---|
id | string | Yes | The mailing id. |
key | string: A, B, C, D, E, F, G or H | Yes | The variant key, A to H. Any other key gets 404 not_found. |
idstring, requiredThe mailing id.keystring, requiredThe variant key, A to H. Any other key gets 404not_found.string:A,B,C,D,E,F,GorH
Errors
| Code | HTTP | When |
|---|---|---|
unauthorized | 401 | The API key is missing or wrong. |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
validation_failed | 422 | A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule. |
conflict | 409 | The change does not fit the current state, for example an edit of a mailing that is no longer a draft. |
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
unauthorized401The API key is missing or wrong.rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".validation_failed422A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule.conflict409The change does not fit the current state, for example an edit of a mailing that is no longer a draft.not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.
Example
curl -sS -X DELETE 'https://api.acorndispatch.com/api/v1/mailings//variants/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"key": "B",
"removed": true
}curl -sS -X DELETE 'https://api.acorndispatch.com/api/v1/mailings//variants/' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"key": "B",
"removed": true
}PUT/
Needsmailings:write
Sets how the test runs. The answer is the saved settings; fields the mode does not use are null.
- Drafts only. Any other status gets 409
conflict. - Add a variant first. A mailing with one variant gets 409
conflict. - A value out of range, or a field the mode needs and did not get, gets 422
validation_failedwith the field named in the message.
Path
| Field | Type | Required | Note |
|---|---|---|---|
id | string | Yes | The mailing id. |
idstring, requiredThe mailing id.
Body
| Field | Type | Required | Note |
|---|---|---|---|
share | integer | Yes | The percent of the audience in the test group, 1 to 100. At 100, everyone gets a variant and there is no winner. |
winner_mode | string or null: auto or manual | Yes | auto picks the winner after the wait. manual: a person picks it in the app. Needed when share is under 100. |
metric | string or null: human_opens, all_opens or clicks | No | What the winner is judged on. Needed with auto. |
wait_minutes | integer or null | No | How long the test runs, 15 to 10,080 minutes. Needed with auto. |
fallback | string or null: leader, variant or wait | No | With no clear winner: leader sends the variant ahead, variant sends fallback_key, wait waits for a person. Needed with auto. |
fallback_key | string or null: A, B, C, D, E, F, G or H | No | A variant of this mailing. Needed with fallback: variant. |
shareinteger, requiredThe percent of the audience in the test group, 1 to 100. At 100, everyone gets a variant and there is no winner.winner_modestring or null, requiredautopicks the winner after the wait.manual: a person picks it in the app. Needed whenshareis under 100.string or null:autoormanualmetricstring or null, optionalWhat the winner is judged on. Needed withauto.string or null:human_opens,all_opensorclickswait_minutesinteger or null, optionalHow long the test runs, 15 to 10,080 minutes. Needed withauto.fallbackstring or null, optionalWith no clear winner:leadersends the variant ahead,variantsendsfallback_key,waitwaits for a person. Needed withauto.string or null:leader,variantorwaitfallback_keystring or null, optionalA variant of this mailing. Needed withfallback: variant.string or null:A,B,C,D,E,F,GorH
Errors
| Code | HTTP | When |
|---|---|---|
unauthorized | 401 | The API key is missing or wrong. |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
validation_failed | 422 | A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule. |
conflict | 409 | The change does not fit the current state, for example an edit of a mailing that is no longer a draft. |
not_found | 404 | The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too. |
unauthorized401The API key is missing or wrong.rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.payload_too_large413The body is over the route's limit. See Body size.validation_failed422A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule.conflict409The change does not fit the current state, for example an edit of a mailing that is no longer a draft.not_found404The message, stream, webhook or mailing does not exist in this workspace. An id of another workspace gets this too.
Example
curl -sS -X PUT 'https://api.acorndispatch.com/api/v1/mailings//ab-test' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"share": 20,
"winner_mode": "auto",
"metric": "human_opens",
"wait_minutes": 60,
"fallback": "leader"
}'{
"share": 20,
"winner_mode": "auto",
"metric": "human_opens",
"wait_minutes": 60,
"fallback": "leader",
"fallback_key": null
}curl -sS -X PUT 'https://api.acorndispatch.com/api/v1/mailings//ab-test' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"share": 20,
"winner_mode": "auto",
"metric": "human_opens",
"wait_minutes": 60,
"fallback": "leader"
}'{
"share": 20,
"winner_mode": "auto",
"metric": "human_opens",
"wait_minutes": 60,
"fallback": "leader",
"fallback_key": null
}| Field | What it holds |
|---|---|
id | The mailing id. |
name | The name your team sees. |
status | draft, scheduled, sending, sent, paused or canceled |
subject, preheader, html | The current content (of variant A in an A/B test). |
sender_identity_id, reply_to | The sender and Reply-To, or null. |
audience_id | The audience, or null. |
topic | The mailing's topic key, or null. |
template_version | The content version. Each content change saves a new one. |
lint | errors and warnings, each { code, message }. An error blocks scheduling. |
last_test_sent_at | When the last test went out, or null. |
scheduled_at | When it sends, once a person scheduled it. |
proposed_send_at | The time the last prepare-schedule proposed. |
created_at, updated_at | ISO 8601 times. |
idThe mailing id.nameThe name your team sees.statusdraft,scheduled,sending,sent,pausedorcanceledsubject,preheader,htmlThe current content (of variantAin an A/B test).sender_identity_id,reply_toThe sender and Reply-To, ornull.audience_idThe audience, ornull.topicThe mailing's topic key, ornull.template_versionThe content version. Each content change saves a new one.linterrorsandwarnings, each{ code, message }. An error blocks scheduling.last_test_sent_atWhen the last test went out, ornull.scheduled_atWhen it sends, once a person scheduled it.proposed_send_atThe time the last prepare-schedule proposed.created_at,updated_atISO 8601 times.
- A mailing can have up to 8 variants, A to H. Variant writes work on drafts only.
- With more than one variant, the mailing gets
variants(each withkey,name,subject,preheader,sender_identity_id,reply_to,html,version) andab_test. The report getsvariants,restanddecision, and prepare-schedule getsdifferences. A mailing with one variant has none of these fields. - No route picks the winner. With
winner_modeauto, the leader wins when it is ahead with 95% confidence; else the fallback decides. Withmanual, a person picks it in the app.
POST/
Needsassets:write
Stores one image and answers its public URL. The same file again gives the same URL.
- Send
multipart/form-datawith onefilefield. Anything else gets 400invalid_request. - The type comes from the bytes. An SVG, an empty file, a file that is not an image, or a declared type that does not match gets 422
validation_failed. - A file over 5 MB gets 422
validation_failed, or 413payload_too_largewhen the whole body is over the limit.
Body
A multipart form.
| Field | Type | Required | Note |
|---|---|---|---|
file | file | Yes | A PNG, JPEG, GIF or WebP image, at most 5 MB. |
filefile, requiredA PNG, JPEG, GIF or WebP image, at most 5 MB.
Errors
| Code | HTTP | When |
|---|---|---|
unauthorized | 401 | The API key is missing or wrong. |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
invalid_request | 400 | The body or a value breaks a rule: not JSON, an unknown field, a missing Subject, a bad Idempotency-Key, a bad query value. The message names the field. |
payload_too_large | 413 | The body is over the route's limit. See Body size. |
validation_failed | 422 | A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule. |
unauthorized401The API key is missing or wrong.rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".invalid_request400The body or a value breaks a rule: not JSON, an unknown field, a missingSubject, a badIdempotency-Key, a bad query value. The message names the field.payload_too_large413The body is over the route's limit. See Body size.validation_failed422A change breaks a rule of the resource, for example a webhook URL that is refused. The message says which rule.
Example
curl -sS -X POST 'https://api.acorndispatch.com/api/v1/assets' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-F 'file=@;type=image/png'{
"url": "https://assets.acorndispatch.com/acme/3f8a1c0e9b7d4e2f6a5c8b1d0e9f7a6c5b4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f.png",
"bytes": 18342,
"width": 600,
"height": 200,
"content_type": "image/png"
}curl -sS -X POST 'https://api.acorndispatch.com/api/v1/assets' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY" \
-F 'file=@;type=image/png'{
"url": "https://assets.acorndispatch.com/acme/3f8a1c0e9b7d4e2f6a5c8b1d0e9f7a6c5b4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f.png",
"bytes": 18342,
"width": 600,
"height": 200,
"content_type": "image/png"
}GET/
Needsaudiences:read
Every audience you can use, by name. count is how many people match now. An audience whose rule no longer works is left out.
Errors
| Code | HTTP | When |
|---|---|---|
unauthorized | 401 | The API key is missing or wrong. |
rate_limited | 429 | Over 60 requests per minute for this key, on a route with the limit. Wait the retry-after seconds, then retry. |
forbidden | 403 | The key lacks the scope the route needs. The message names it, for example "This API key needs the email:send scope". |
unauthorized401The API key is missing or wrong.rate_limited429Over 60 requests per minute for this key, on a route with the limit. Wait theretry-afterseconds, then retry.forbidden403The key lacks the scope the route needs. The message names it, for example "This API key needs theemail:sendscope".
Example
curl -sS 'https://api.acorndispatch.com/api/v1/audiences' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"data": [
{
"id": "aud_N4tq8ZbW2rYc6Hkx",
"name": "Newsletter",
"description": "Everyone who gets the weekly newsletter",
"count": 48210
},
{
"id": "aud_7Gm2Qx9Lr4Vw1Tc8",
"name": "Trial users",
"description": null,
"count": 1312
}
]
}curl -sS 'https://api.acorndispatch.com/api/v1/audiences' \
-H "Authorization: Bearer $ACORNDISPATCH_API_KEY"{
"data": [
{
"id": "aud_N4tq8ZbW2rYc6Hkx",
"name": "Newsletter",
"description": "Everyone who gets the weekly newsletter",
"count": 48210
},
{
"id": "aud_7Gm2Qx9Lr4Vw1Tc8",
"name": "Trial users",
"description": null,
"count": 1312
}
]
}