Skip to content

Draft Email

POST
/sequencer/content/email/generate

Draft one contact’s email with an agent. SPENDS CREDITS per call.

Returns the subject and body; nothing is saved or sent. A 402 means the organisation is out of credits. Price it first with .../email/estimate.

Authorizations

Parameters

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Draft one contact’s email. Mirrors OnDemandPayload field for field.

object
agent_name
required

The textual agent whose voice and context are used.

string
contact_id
required
integer
contact_work_email
required
string
first_name
required
string
instructions
required

What the email should do - the step’s prompt.

string
last_name
required
string
lead_info
required

What is known about the contact, as free text.

string
model
Any of:
string
provider
Any of:
string
Allowed values: openai anthropic openrouter
sequence_id
Any of:
string
step_order
Any of:
integer
studio_campaign_id
Any of:
string

Responses

200

Successful Response

object
data
required

An open envelope around one sequencer record.

Open because templates, schedules and channels carry nested step data and configuration that grows as channels are added.

object
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string