Skip to content
First requestVisit website ↗
Navigation

Send an outbound SMS or MMS message

Sends a text, image, or video message through the workspace phone number and saves the outbound message to LiveChat history.

POST
https://api.channelautomation.com/send-sms

Authorization

  • ApiKeyAuth
    API key in header
    required

Header parameters

  • X-Workspace-Id
    string
    required

    Workspace ID for data isolation

Request body JSON required

  • to
    string
    required

    Recipient phone number.

  • workspaceId
    string
    required

    Workspace identifier.

  • contactId
    string
    required

    Contact identifier.

    format: uuid
  • message
    optional
    string

    Message body.

  • mediaUrls
    optional
    array of
    string
    format: uri
  • messageType
    optional
    text
    or
    image
    or
    video
    default: "text"
  • mediaData
    optional
    object

Example requests

{
  "to": "+1234567890",
  "message": "Hello! This is a test message.",
  "workspaceId": "123e4567-e89b-12d3-a456-426614174000"
}

Returns

200

Message sent and saved successfully.

JSON
  • success
    optional
    boolean

    Whether the SMS was sent successfully

  • messageSid
    optional
    string

    Twilio message SID for tracking

  • message
    optional
    string

    Success or error message

  • cost
    optional
    string

    Message cost in USD

400

Missing or invalid request fields.
JSON
  • error
    optional
    string
  • details
    optional
    array of
    string

401

Authentication required
JSON
  • error
    optional
    string
  • success
    optional
    boolean

402

Insufficient balance or quota exceeded
JSON
  • success
    optional
    boolean
  • error
    optional
    string
  • balance
    optional
    string

    Current account balance

  • quota_remaining
    optional
    integer

    Remaining SMS quota for current period

403

Contact cannot receive messages

404

Workspace phone number or contact was not found.

500

Failed to send or save the message.
JSON
  • error
    optional
    string
  • details
    optional
    string
  • success
    optional
    boolean

Type to search…

↑↓ navigate↵ selectEsc close