Search docs ⌘K
esc
Type to search across all documentation pages
Messaging

Messages

Send, list, retrieve, edit, and delete messages within conversations.

Send a message

POST
/modules/messaging/conversations/{conversation_id}/messages
messaging:write

Send a message to a conversation.

curl
curl -X POST https://api.saasignal.saastemly.com/modules/messaging/conversations/{conversation_id}/messages \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"participant_id":"...","body":"..."}'
json — 201 Created
{ "status": "ok" }
Path param
Type
Description
conversation_id required
string
Body field
Type
Description
participant_id required
string
type
string
values: text, image, file, systemdefault text
body required
string
reply_to
string
metadata
object
Error responses
401 Unauthorized
402 Insufficient tokens
422 Unprocessable entity
429 Rate limited

List messages

GET
/modules/messaging/conversations/{conversation_id}/messages
messaging:read

List messages in a conversation.

curl
curl https://api.saasignal.saastemly.com/modules/messaging/conversations/{conversation_id}/messages \
  -H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
Path param
Type
Description
conversation_id required
string
Query param
Type
Description
before
string (ISO 8601)
pattern ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
after
string (ISO 8601)
pattern ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
limit
integer
range ≥1 .. ≤100default 50
cursor
string
Error responses
401 Unauthorized
402 Insufficient tokens
429 Rate limited

Get a message

GET
/modules/messaging/conversations/{conversation_id}/messages/{message_id}
messaging:read

Retrieve a single message.

curl
curl https://api.saasignal.saastemly.com/modules/messaging/conversations/{conversation_id}/messages/{message_id} \
  -H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
Path param
Type
Description
conversation_id required
string
message_id required
string
Error responses
401 Unauthorized
402 Insufficient tokens
404 Not found
429 Rate limited

Edit a message

PATCH
/modules/messaging/conversations/{conversation_id}/messages/{message_id}
messaging:write

Edit a message body.

curl
curl -X PATCH https://api.saasignal.saastemly.com/modules/messaging/conversations/{conversation_id}/messages/{message_id} \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"body":"..."}'
json — 200 OK
{ "status": "ok" }
Path param
Type
Description
conversation_id required
string
message_id required
string
Body field
Type
Description
body required
string
Error responses
401 Unauthorized
402 Insufficient tokens
404 Not found
429 Rate limited

Delete a message

DELETE
/modules/messaging/conversations/{conversation_id}/messages/{message_id}
messaging:write

Soft-delete a message.

curl
curl -X DELETE https://api.saasignal.saastemly.com/modules/messaging/conversations/{conversation_id}/messages/{message_id} \
  -H "Authorization: Bearer sk_live_..."
json — 200 OK
{ "status": "ok" }
Path param
Type
Description
conversation_id required
string
message_id required
string
Error responses
401 Unauthorized
402 Insufficient tokens
404 Not found
429 Rate limited