latestOpenAPI 3.0.02026-08-10416661.5 MB

e96b3e58b041

Messages

Send async SMS by conversation

REQUIRED SCOPES <code>['messages:write']</code><br>Send async SMS message via API. This API endpoint allows for sending an SMS by conversation that belongs to an authenticated account. <br><br>Messages are sent on behalf of a user, may include attachments. Actual links included in text messages will be sent as clickable hyperlinks.

post/async/messages/{conversation}

Path parameters

conversationinteger required

Conversation id

Request body

messagestring textarea required

Message

send_atstring date-time

Send At

media_urlstring[]

Url for media

enable_quiet_hoursboolean

Is enable quiet hours сheck

enable_realtime_updatesboolean

Emit realtime (WebSocket) updates for this message, so the Salesmsg inbox conversation list refreshes immediately instead of on the next reply or manual open. Disabled by default: for high-volume sending every message produces an extra realtime event, so enable it only when live inbox updates are needed.

Example request

{
  "message": "Test message",
  "send_at": "2023-05-25T17:30:15Z",
  "media_url": [
    {
      "url": "https://example.com/image1.png"
    },
    {
      "url": "https://example.com/image2.png"
    }
  ],
  "enable_quiet_hours": true,
  "enable_realtime_updates": true
}

Response

OK

uuidstring

Message UUID

messagestring

Success message

codeinteger

Code

Example response

{
  "uuid": "1111a111-11a1-11a1-1b11-11aa1aa11a11",
  "message": "The message was successfully processed"
}