Email campaigns sent to people.
Create a campaign
A draft, with the people of a list or the given master ids (up to 50,000).
Headers
X-Entayo-ProjectThe project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.
Create a campaign › Request Body
namelist_idmaster_idssender_idA sender from List senders.
Create a campaign › Responses
The draft and who made it in.
Edit a campaign
path Parameters
idHeaders
X-Entayo-ProjectThe project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.
Edit a campaign › Request Body
namesubjectpreheaderhtmlThe email body. Merge fields are filled per person: {{contact.first_name}} (or {{first_name}}), with a fallback after a pipe — {{contact.first_name | there}}.
sender_idinclude_signaturereply_to_modereply_toThe whole attachment list of the email (replaces the old one). Upload each file first with Upload a campaign attachment.
Edit a campaign › Responses
{ campaign, attachments, errors }.
Add recipients
Remove recipients
Preview the email for one recipient
path Parameters
idHeaders
X-Entayo-ProjectThe project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.
Preview the email for one recipient › Request Body
recipient_idindexOr the n-th recipient.
subjectpreheaderhtmlPreview the email for one recipient › Responses
{ subject, preheader, html, text, recipient }.
Send a test email
path Parameters
idHeaders
X-Entayo-ProjectThe project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.
Send a test email › Request Body
tosubjecthtmlsender_idSend a test email › Responses
{ ok: true }.
Launch a campaign
Sends it now, or spread over a time window. This sends real email.
path Parameters
idHeaders
X-Entayo-ProjectThe project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.
Launch a campaign › Request Body
modestart_atduration_hoursLaunch a campaign › Responses
{ queued, drained, campaign, stats }.
Get the campaign's email API URL
The secret address that lets another system (a build server, a CMS, a
script) set this campaign's email without a key: POST JSON
{ subject, html } to url, or a multipart file to
attachmentUrl. Only a draft takes it. The URL is the whole
credential — keep it like a password. Made the first time you ask.
path Parameters
idHeaders
X-Entayo-ProjectThe project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.
Get the campaign's email API URL › Responses
The two addresses.
urlattachmentUrlRegenerate the campaign's email API URL
A new secret address. The old one stops working at once — update anything that still uses it.
path Parameters
idHeaders
X-Entayo-ProjectThe project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.
Regenerate the campaign's email API URL › Responses
The new { url, attachmentUrl }.
Upload a campaign attachment
Stores one file for a campaign email and answers what to put in the
campaign's attachments (Edit a campaign). Not attached to anything
until a draft is saved with it. Executable file types are refused
(400); a file larger than an email can carry is 413.
Headers
X-Entayo-ProjectThe project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.
Upload a campaign attachment › Responses
The stored file.
Upload an inline image
Stores an image for an email body and answers its public address, to
use in <img src>. PNG, JPG, GIF or WebP only (no SVG). A very large
image is 413.
Headers
X-Entayo-ProjectThe project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.
Upload an inline image › Responses
The image's public address.
Add a sender (moved to the Zocton Dashboard)
Senders are added and changed only on the Zocton Dashboard → Senders. Always 410, with where to go.
Headers
X-Entayo-ProjectThe project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.
Add a sender (moved to the Zocton Dashboard) › Responses
No API key, or a key that is wrong or revoked.
Get a sender
One sender from the Zocton Dashboard. Editing, pausing, archiving,
testing and deleting a sender happen only there — PATCH, PUT,
POST and DELETE here answer 410.
path Parameters
idThe sender's id (List senders).
Headers
X-Entayo-ProjectThe project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.
Get a sender › Responses
{ sender }.