Skip to content

Generate Inbox Draft

POST
/inbox/drafts/generate

Write or rewrite a message with the model. THIS SPENDS CREDITS.

DELIVERS NOTHING. It returns text; sending it is a separate, external call. Classified billable (inbox:run) because it charges - 402 when the organisation has no credits left.

ONE CHARGE PER CALL, including a multi-operation call: pass a LIST in operation to apply several transforms in a single generation rather than paying per transform.

generate_from_scratch is the only operation that does not need message_html; give it either a conversation_id + channel_type to ground the reply in the thread, or free-text instructions to write something with no thread at all.

Wider than the already-published GET /inbox/{reply_id}/draft, which only ever generates from scratch on an existing thread.

Authorizations

Parameters

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Ask the model to write or rewrite a message. THIS SPENDS CREDITS.

One charge per call, including a multi-operation call: pass a LIST in operation to apply several transforms in a single generation rather than paying for each.

Nothing here is delivered anywhere - it returns text. Sending it is a separate call.

object
channel_type
Any of:
string
Allowed values: email heyreach sms
conversation_id
Any of:
string
instructions
Any of:
string
linkedin_account_id
Any of:
integer
message_html

The text to transform. Required by every operation except generate_from_scratch.

string
""
objective
Any of:
string
Allowed values: book_meeting follow_up re_engage provide_value handle_objection close_deal
operation
required
Any of:
string
Allowed values: change_tone fix_grammar_spelling change_objective expand shorten change_persona generate_from_scratch
persona
Any of:
string
Allowed values: sdr growth_manager account_executive customer_success founder
tone
Any of:
string
Allowed values: professional friendly casual assertive empathetic urgent

Responses

200

Successful Response

object
data
required

An open envelope for a comment, an assignment or a workspace.

Open because a comment carries attachment refs and mention metadata that grow, and because an assignment result reports per-assignee outcomes.

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