Skip to content
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 (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 (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 (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 (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. {{first_name}}-style merge fields are filled per person.

sender_id
​string
include_signature
​boolean
reply_to_mode
​string
reply_to
​string

Edit a campaign › Responses

{ campaign, attachments, errors }.

No data returned

Delete a campaign

DELETE
https://apac.zocton.com/entayo-crm/api
/campaigns/{id}
Bearer (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 (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 (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 (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 (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 (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 (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 (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 (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 (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

List senders

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

The sending addresses set up on the Zocton Dashboard.

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

List suppressed addresses

GET
https://apac.zocton.com/entayo-crm/api
/marketing/suppressions
Bearer (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