Before you go, take 40% off annual plans

Leave your email and get 40% off any Zocton plan paid annually, for your first 2 years.

Applies to annual billing only. We only use your email to honour this discount.

Skip to content
Sign in
Entayo CRM API

Campaigns

Serverhttps://apac.zocton.com/entayo-crm/api

Email campaigns sent to people.


List campaigns

GET
https://apac.zocton.com/entayo-crm/api
/campaigns
Bearer (zk_… or entayo_…)

List campaigns › Headers

X-Entayo-Project
​integer · min: 1

The project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.

List campaigns › Responses

{ campaigns }.

No data returned

Create a campaign

POST
https://apac.zocton.com/entayo-crm/api
/campaigns
Bearer (zk_… or entayo_…)

A draft, with the people of a list or the given master ids (up to 50,000).

Create a campaign › Headers

X-Entayo-Project
​integer · min: 1

The project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.

Create a campaign › Request Body

name
​string
list_id
​integer
master_ids
​integer[]
sender_id
​string

A sender from List senders.

Create a campaign › Responses

The draft and who made it in.

No data returned

Get a campaign

GET
https://apac.zocton.com/entayo-crm/api
/campaigns/{id}
Bearer (zk_… or entayo_…)

Get a campaign › path Parameters

id
​integer · min: 1 · required

Get a campaign › Headers

X-Entayo-Project
​integer · min: 1

The project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.

Get a campaign › Responses

{ campaign, attachments, … }.

No data returned

Edit a campaign

PATCH
https://apac.zocton.com/entayo-crm/api
/campaigns/{id}
Bearer (zk_… or entayo_…)

Edit a campaign › path Parameters

id
​integer · min: 1 · required

Edit a campaign › Headers

X-Entayo-Project
​integer · min: 1

The project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.

Edit a campaign › Request Body

name
​string
subject
​string
preheader
​string
html
​string

The 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_id
​string
include_signature
​boolean
reply_to_mode
​string
reply_to
​string
​object[]

The 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 }.

No data returned

Delete a campaign

DELETE
https://apac.zocton.com/entayo-crm/api
/campaigns/{id}
Bearer (zk_… or entayo_…)

A sent campaign cannot be deleted (409).

Delete a campaign › path Parameters

id
​integer · min: 1 · required

Delete a campaign › Headers

X-Entayo-Project
​integer · min: 1

The project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.

Delete a campaign › Responses

{ ok: true }.

No data returned

List recipients

GET
https://apac.zocton.com/entayo-crm/api
/campaigns/{id}/recipients
Bearer (zk_… or entayo_…)

List recipients › path Parameters

id
​integer · min: 1 · required

List recipients › query Parameters

limit
​integer
offset
​integer

List recipients › Headers

X-Entayo-Project
​integer · min: 1

The project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.

List recipients › Responses

{ recipients, … }.

No data returned

Add recipients

POST
https://apac.zocton.com/entayo-crm/api
/campaigns/{id}/recipients
Bearer (zk_… or entayo_…)

Add recipients › path Parameters

id
​integer · min: 1 · required

Add recipients › Headers

X-Entayo-Project
​integer · min: 1

The project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.

Add recipients › Request Body

master_ids
​integer[] · required

Add recipients › Responses

{ audience, stats }.

No data returned

Remove recipients

DELETE
https://apac.zocton.com/entayo-crm/api
/campaigns/{id}/recipients
Bearer (zk_… or entayo_…)

Remove recipients › path Parameters

id
​integer · min: 1 · required

Remove recipients › Headers

X-Entayo-Project
​integer · min: 1

The project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.

Remove recipients › Request Body

recipient_ids
​integer[] · required

Remove recipients › Responses

{ removed, stats }.

No data returned

Preview the email for one recipient

POST
https://apac.zocton.com/entayo-crm/api
/campaigns/{id}/preview
Bearer (zk_… or entayo_…)

Preview the email for one recipient › path Parameters

id
​integer · min: 1 · required

Preview the email for one recipient › Headers

X-Entayo-Project
​integer · min: 1

The 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_id
​integer
index
​integer

Or the n-th recipient.

subject
​string
preheader
​string
html
​string

Preview the email for one recipient › Responses

{ subject, preheader, html, text, recipient }.

No data returned

Send a test email

POST
https://apac.zocton.com/entayo-crm/api
/campaigns/{id}/test-send
Bearer (zk_… or entayo_…)

Send a test email › path Parameters

id
​integer · min: 1 · required

Send a test email › Headers

X-Entayo-Project
​integer · min: 1

The project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.

Send a test email › Request Body

to
​string · email · required
subject
​string
html
​string
sender_id
​string

Send a test email › Responses

{ ok: true }.

No data returned

Launch a campaign

POST
https://apac.zocton.com/entayo-crm/api
/campaigns/{id}/launch
Bearer (zk_… or entayo_…)

Sends it now, or spread over a time window. This sends real email.

Launch a campaign › path Parameters

id
​integer · min: 1 · required

Launch a campaign › Headers

X-Entayo-Project
​integer · min: 1

The project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.

Launch a campaign › Request Body

mode
​string · enum
Enum values:
now
at_time
over_duration
batch
Default: now
start_at
​string · date-time
duration_hours
​number
​object
​object

Launch a campaign › Responses

{ queued, drained, campaign, stats }.

No data returned

Duplicate a campaign

POST
https://apac.zocton.com/entayo-crm/api
/campaigns/{id}/duplicate
Bearer (zk_… or entayo_…)

Duplicate a campaign › path Parameters

id
​integer · min: 1 · required

Duplicate a campaign › Headers

X-Entayo-Project
​integer · min: 1

The project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.

Duplicate a campaign › Responses

{ id, name, audience }.

No data returned

Reset a campaign to draft

POST
https://apac.zocton.com/entayo-crm/api
/campaigns/{id}/reset
Bearer (zk_… or entayo_…)

Reset a campaign to draft › path Parameters

id
​integer · min: 1 · required

Reset a campaign to draft › Headers

X-Entayo-Project
​integer · min: 1

The project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.

Reset a campaign to draft › Responses

{ ok, restored }.

No data returned

A campaign's history

GET
https://apac.zocton.com/entayo-crm/api
/campaigns/{id}/activity
Bearer (zk_… or entayo_…)

A campaign's history › path Parameters

id
​integer · min: 1 · required

A campaign's history › query Parameters

limit
​integer

A campaign's history › Headers

X-Entayo-Project
​integer · min: 1

The project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.

A campaign's history › Responses

{ entries }.

No data returned

Get the campaign's email API URL

GET
https://apac.zocton.com/entayo-crm/api
/campaigns/{id}/ingest
Bearer (zk_… or entayo_…)

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.

Get the campaign's email API URL › path Parameters

id
​integer · min: 1 · required

Get the campaign's email API URL › Headers

X-Entayo-Project
​integer · min: 1

The 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.

url
​string
attachmentUrl
​string

Regenerate the campaign's email API URL

POST
https://apac.zocton.com/entayo-crm/api
/campaigns/{id}/ingest
Bearer (zk_… or entayo_…)

A new secret address. The old one stops working at once — update anything that still uses it.

Regenerate the campaign's email API URL › path Parameters

id
​integer · min: 1 · required

Regenerate the campaign's email API URL › Headers

X-Entayo-Project
​integer · min: 1

The 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 }.

No data returned

Upload a campaign attachment

POST
https://apac.zocton.com/entayo-crm/api
/marketing/attachments
Bearer (zk_… or entayo_…)

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.

Upload a campaign attachment › Headers

X-Entayo-Project
​integer · min: 1

The project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.

Upload a campaign attachment › Request Body

file
​string · binary · required

Upload a campaign attachment › Responses

The stored file.

No data returned

Upload an inline image

POST
https://apac.zocton.com/entayo-crm/api
/marketing/images
Bearer (zk_… or entayo_…)

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.

Upload an inline image › Headers

X-Entayo-Project
​integer · min: 1

The project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.

Upload an inline image › Request Body

file
​string · binary · required

Upload an inline image › Responses

The image's public address.

No data returned

List senders

GET
https://apac.zocton.com/entayo-crm/api
/marketing/senders
Bearer (zk_… or entayo_…)

The sending addresses set up on the Zocton Dashboard. Never a relay password.

List senders › Headers

X-Entayo-Project
​integer · min: 1

The project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.

List senders › Responses

{ senders, available, manage_href }.

No data returned

deprecated

Add a sender (moved to the Zocton Dashboard)

POST
https://apac.zocton.com/entayo-crm/api
/marketing/senders
Bearer (zk_… or entayo_…)

Senders are added and changed only on the Zocton Dashboard → Senders. Always 410, with where to go.

Add a sender (moved to the Zocton Dashboard) › Headers

X-Entayo-Project
​integer · min: 1

The 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.

error
​string · required
code
​string

Get a sender

GET
https://apac.zocton.com/entayo-crm/api
/marketing/senders/{id}
Bearer (zk_… or entayo_…)

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.

Get a sender › path Parameters

id
​string · required

The sender's id (List senders).

Get a sender › Headers

X-Entayo-Project
​integer · min: 1

The project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.

Get a sender › Responses

{ sender }.

No data returned

List suppressed addresses

GET
https://apac.zocton.com/entayo-crm/api
/marketing/suppressions
Bearer (zk_… or entayo_…)

Addresses that are never emailed (unsubscribed, bounced, do-not-mail).

List suppressed addresses › Headers

X-Entayo-Project
​integer · min: 1

The project to work in (List projects → id). Left out → Default. Not yours → 404 project_not_found.

List suppressed addresses › Responses

{ suppressions }.

No data returned