Skip to main content
POST
/
api
/
v1
/
messages
Send a message to a channel (channelId in body)
curl --request POST \
  --url https://api.example.com/api/v1/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "channelId": "<string>",
  "text": "<string>",
  "status": "info",
  "review": {
    "type": "<string>",
    "payload": {},
    "callback": {
      "url": "<string>",
      "method": "<string>",
      "headers": {}
    },
    "expiresAt": "<string>",
    "expiresInSeconds": 4503599627370495
  },
  "metadata": {},
  "webhookUrl": "<string>",
  "attachmentIds": [
    "<string>"
  ]
}
'
{
  "id": "clxyz111",
  "channelId": "clxyz456",
  "senderType": "agent",
  "senderId": "clxyz456",
  "createdAt": "2025-01-01T00:00:00.000Z",
  "attachments": [
    {
      "id": "clxyz789",
      "messageId": "clxyz123",
      "pluginType": "file",
      "filename": "report.pdf",
      "mimeType": "application/pdf",
      "size": 1024,
      "storageKey": "uploads/clxyz123/report.pdf",
      "createdAt": "2025-01-01T00:00:00.000Z"
    }
  ],
  "text": "Hello from agent",
  "status": "info",
  "review": {
    "type": "approval",
    "status": "pending"
  },
  "metadata": {
    "source": "automation"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
channelId
string
required
Minimum string length: 1
text
string
status
enum<string>
Available options:
info,
success,
warning,
error
review
object
metadata
object
webhookUrl
string<uri>
attachmentIds
string[]

Response

Message created

id
string
required
Example:

"clxyz111"

channelId
string
required
Example:

"clxyz456"

senderType
enum<string>
required
Available options:
agent,
user
Example:

"agent"

senderId
string
required
Example:

"clxyz456"

createdAt
string
required
Example:

"2025-01-01T00:00:00.000Z"

attachments
object[]
required
text
string
Example:

"Hello from agent"

status
enum<string>
Available options:
info,
success,
warning,
error
Example:

"info"

review
object

Review object (null if no review)

Example:
{ "type": "approval", "status": "pending" }
metadata
object

Arbitrary metadata

Example:
{ "source": "automation" }