Skip to main content
POST
Create a message draft

Authorizations

Authorization
string
header
required

Organization-scoped bearer credential: a customer API key (1club_sk_live_...) or an MCP OAuth access token.

Headers

Idempotency-Key
string

Retry-safe key; a repeat of the same request replays the first response

Maximum string length: 255

Body

application/json

A new draft. It is never sent through this API: a member of staff reviews and sends it in the admin app. Name the audience with exactly one of contactIds or segment.

type
enum<string>
required

The channel, fixed once drafted. Push notifications cannot be composed.

Available options:
email,
sms,
whatsapp
content
required

The body. A string is HTML for email (sanitized) and plain text for SMS and WhatsApp. Or an object with html and/or Editor.js blocks, the shape the admin composer saves.

Minimum string length: 1
subject
string

Required for email.

Required string length: 1 - 200
contactIds
integer[]

A hand-picked audience: contact ids, each in this organization. Mutually exclusive with segment.

Required array length: 1 - 5000 elements
segment
object

An audience resolved at the moment a member of staff sends the draft, so it includes whoever matches by then. Every criterion narrows it; an empty object is every contact in the organization. Mutually exclusive with contactIds.

Response

Draft created. Not sent.

An email, SMS or WhatsApp Message. This API writes drafts only; it never sends one.

id
integer
uuid
string<uuid>
type
string

email, sms or whatsapp

direction
enum<string>
Available options:
outbound,
inbound
status
enum<string>

draft: waiting for a member of staff to send it in the admin app; editable. sent: gone out (or received), read-only.

Available options:
draft,
sent
subject
string

Empty for SMS and WhatsApp.

content
object

The body as stored. On a single read and on writes; not in the list.

preview
string

The start of the body as plain text.

source
string | null

api for a draft written through this API or MCP; other values for Messages written in 1club; null when not recorded.

sender
object | null

The member of staff the Message is attributed to. For an API-key draft, the person who created the key.

audience
object
recipientCount
integer
recipients
object[]

On a single read and on writes; not in the list. Empty on a segment draft, whose audience is resolved when it is sent.

replyToMessageId
integer | null

The Message this one replies to, within a conversation.

sentAt
string<date-time> | null

When it went out; null for a draft.

createdAt
string<date-time>