Core resources

Messages

Send direct messages, bulk messages, and message attachments.

Use messaging endpoints for direct sends, bulk sends, and attachment uploads.

Endpoints in this guide

  • POST /api/conversation/{conversationId}/send-message
  • POST /api/messages/quick-bulk-send
  • POST /api/messages/upload-attachment
  • GET /api/conversation/{conversationId}/messages

Send a message to a conversation

Messages are sent within a conversation. Look up the contact's conversation first (see Conversations), then post to it:

curl -X POST https://your-instance.example.com/api/conversation/507f1f77bcf86cd799439011/send-message \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "body": "Hello from API"
  }'

The request body also accepts isInternal for internal notes, and attachments for files already uploaded through the endpoint below. Each attachment carries the storage key in url, a required filename, and an optional contentType:

{
  "body": "Invoice attached",
  "attachments": [
    {
      "url": "<storageKey from the upload response>",
      "filename": "invoice.pdf",
      "contentType": "application/pdf"
    }
  ]
}

Upload an attachment

Uploads are multipart, with the file in a field named file:

curl -X POST https://your-instance.example.com/api/messages/upload-attachment \
  -H "Authorization: Bearer <token>" \
  -F "file=@./invoice.pdf"
{
  "success": true,
  "attachment": {
    "storageKey": "org123/msg456/invoice.pdf",
    "filename": "invoice.pdf",
    "contentType": "application/pdf",
    "size": 128374
  }
}

Pass attachment.storageKey back as the url of an entry in attachments when you send the message. On SMS, document attachments are delivered as a generated document link rather than the file itself; see Document links.

On this page