Skip to content

Send Public Message

POST
/public/v1/text/sessions/{session_id}/messages
curl --request POST \
--url https://api.nuacem.dev/voice-gw/public/v1/text/sessions/example/messages \
--header 'Content-Type: application/json' \
--data '{ "text": "", "fileIds": [ "example" ], "replyTo": { "role": "assistant", "text": "example" }, "postback": { "blockId": "example", "value": "example" } }'
session_id
required
Session Id
string
/^[0-9a-f-]{36}$/
Media typeapplication/json
PublicMessage
object
text
Text
string
"" <= 4000 characters
fileIds
Fileids
Array<string>
<= 10 items
replyTo
Any of:
ReplyTo

What the visitor replied to, as the window shows it.

object
role
required
Role
string
Allowed values: assistant user
text
required
Text
string
>= 1 characters <= 2000 characters
postback
Any of:
Postback

A tap on a block’s button, list row, card, chip or slot.

object
blockId
required
Blockid
string
>= 1 characters <= 40 characters
value
required
Value
string
>= 1 characters <= 200 characters

Successful Response

Media typetext/event-stream

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}