Send Public Message
POST
/public/v1/text/sessions/{session_id}/messages
const url = 'https://api.nuacem.dev/voice-gw/public/v1/text/sessions/example/messages';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"text":"","fileIds":["example"],"replyTo":{"role":"assistant","text":"example"},"postback":{"blockId":"example","value":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" } }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”session_id
required
Session Id
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
PublicMessage
object
text
Text
string
fileIds
Fileids
Array<string>
replyTo
Responses
Section titled “Responses”Successful Response
Media typetext/event-stream
Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
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": {} } ]}