All developer pages

API reference

Messages

2 operations. Base URL: https://api.ringura.com/api/v1. Authenticate with a bearer token that carries the scope named on each operation.

GET /api/v1/conversations/{id}/messages

A conversation's messages across its threads, oldest first.

Scope
messages:read
Operation id
listMessages

Parameters

Parameters of GET /api/v1/conversations/{id}/messages
NameInTypeRequiredConstraints
idpathstring (uuid)Yes
limitqueryintegerNo1 to 200
cursorquerystringNoat most 400 characters

Response

200 JSON with these fields.

Response fields of GET /api/v1/conversations/{id}/messages
FieldTypeRequiredConstraints
dataarray of objectYes
data[].idstring (uuid)Yes
data[].conversationIdstring (uuid)Yes
data[].interactionIdstring (uuid)Yes
data[].directionstringYesone of "inbound", "outbound", "internal"
data[].kindstringYes
data[].bodystring or nullYes
data[].statusstringYes
data[].sentAtstring (date-time)Yes
data[].authorobjectYes
data[].author.kindstring or nullYes
data[].author.agentIdstring (uuid) or nullYes
data[].author.labelstring or nullYes
data[].aiGeneratedbooleanYes
data[].aiProvenanceobject or nullYesfree-form object
nextCursorstring or nullYes

Errors

400, 401, 403, 404, 409, 429. What each status means

Example request

curl -X GET 'https://api.ringura.com/api/v1/conversations/0192f5a0-7c1e-7d3a-9b2e-3f4a5b6c7d8e/messages' \
  -H "Authorization: Bearer $CC_TOKEN"

POST /api/v1/conversations/{id}/messages

Send a text or an approved WhatsApp template on one of the conversation's threads (web chat, WhatsApp, e-mail or SMS), under every rule the console applies.

Scope
messages:write
Operation id
sendMessage
Idempotent
Send Idempotency-Key to make a retry safe

Parameters

Parameters of POST /api/v1/conversations/{id}/messages
NameInTypeRequiredConstraints
idpathstring (uuid)Yes
Idempotency-KeyheaderstringNomatches ^[A-Za-z0-9_.:-]{8,100}$

Request body

JSON (Content-Type: application/json).

Request body of POST /api/v1/conversations/{id}/messages
FieldTypeRequiredConstraints
interactionIdstring (uuid)Yes
typestringYesone of "text", "template"
bodystringNo1-4096 characters
templateobjectNo
template.namestringYesat most 512 characters
template.languagestringYesat most 20 characters
template.parametersobjectNofree-form object

Response

201 JSON with these fields.

Response fields of POST /api/v1/conversations/{id}/messages
FieldTypeRequiredConstraints
messageIdstring (uuid)Yes
statusstringYes
replayedbooleanYes

Errors

400, 401, 403, 404, 409, 422, 429. What each status means

Example request

curl -X POST 'https://api.ringura.com/api/v1/conversations/0192f5a0-7c1e-7d3a-9b2e-3f4a5b6c7d8e/messages' \
  -H "Authorization: Bearer $CC_TOKEN" \
  -H 'Idempotency-Key: order-2027-0001' \
  -H 'Content-Type: application/json' \
  -d '{
  "interactionId": "0192f5a0-7c1e-7d3a-9b2e-3f4a5b6c7d8e",
  "type": "text"
}'