scheduledMessages

Create a draft DM

Changed on

Create a draft message for a contact. Pass status 'scheduled' to approve it at once: it is put in line and goes out once the person is connected. Nothing is sent at a set time.

post/scheduled-messages

Request

  • Base URL: https://api.bereach.ai
  • URL: https://api.bereach.ai/scheduled-messages
  • Auth: HTTP bearer

Request body

contactIdstring required

Internal contact ID

messagestring required

DM text

status'draft' | 'scheduled'

Default 'draft'. 'scheduled' means approve at once: the message is put in line and goes out once the person is connected, at the account's pace.

scheduledSendAtstring

A first message has no stored send time: the line decides when it goes out. A time within 10 minutes of now is read as an ask to approve and send at once, like status 'scheduled'; anything further out is ignored.

campaignSlugstring

Which list to file the draft under. Omit it: the draft is filed with the person it is for, which is what a chat turn wants.

Response

Message created, or an existing one returned instead

successtrue required
contactNamestring nullable
duplicateboolean

True when an existing message was returned rather than a new one created.

cooldownboolean

True when a recent message to this contact is holding a new one back.

cooldownReasonstring

Why the cooldown applies.

campaignNotestring

Present when the requested list matched nothing and the draft was filed with the person instead; names where it landed.

creditsUsedinteger required

Credits this call spent, net of anything given back. 0 when nothing was charged: a free read, a cached answer, nothing delivered.

retryAfterinteger required

Seconds to wait before another call of the same type. 0 means no wait is needed.

Changes

    • warning

      removed the optional property from the response with the status

    • warning

      added the new window enum value to the // response property for the response status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the required property // to the response with the status