Skip to main content
POST
Schedule a message to a lead for a future time — either a manually typed message or one generated at send time by the conversation's last-responding AI agent.

Authorizations

X-CB-KEY
string
header
required

CloseBot API Key Authorization

Path Parameters

leadId
string
required

Body

kind
string | null
required

"manual" sends Body verbatim; "ai" generates the message at send time with the conversation's last-responding agent.

sendAt
string<date-time>
required
body
string | null

Required for manual messages; ignored for AI messages.

cancelOnReply
boolean | null

Cancel this message if the contact replies before it sends. Defaults to true for AI messages, false for manual.

channel
string | null

Response

OK

id
string | null
required
leadId
string | null
required
kind
string | null
required
sendAt
string<date-time>
required
cancelOnReply
boolean
required
status
string | null
required
createdByAccountId
string | null
required
createdAt
string<date-time>
required
sourceId
string | null
body
string | null
channel
string | null
botId
string | null
statusReason
string | null
createdByName
string | null
createdByIconUrl
string | null
sentMessageId
string | null