Start Public Chat
POST
/public/v1/text/sessions
const url = 'https://api.nuacem.dev/voice-gw/public/v1/text/sessions';const options = { method: 'POST', headers: {'X-VoiceCX-Key': 'example', 'Content-Type': 'application/json'}, body: '{"agentId":"example","useCaseId":"example","language":"example","visitorId":"example","userId":"example","userHash":"example","profile":{"additionalProperty":"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 \ --header 'Content-Type: application/json' \ --header 'X-VoiceCX-Key: example' \ --data '{ "agentId": "example", "useCaseId": "example", "language": "example", "visitorId": "example", "userId": "example", "userHash": "example", "profile": { "additionalProperty": "example" } }'Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
PublicSessionRequest
object
Example generated
{ "agentId": "example", "useCaseId": "example", "language": "example", "visitorId": "example", "userId": "example", "userHash": "example", "profile": { "additionalProperty": "example" }}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
PublicSessionResponse
object
sessionId
required
Sessionid
string
token
required
Token
string
visitorId
required
Visitorid
string
language
required
Language
string
expiresIn
required
Expiresin
integer
maxMessageChars
required
Maxmessagechars
integer
voiceNotes
Voicenotes
boolean
attachmentMode
Attachmentmode
string
replies
Replies
boolean
richMessages
Richmessages
boolean
replyDelivery
Replydelivery
string
Example
{ "voiceNotes": false, "attachmentMode": "always", "replies": false, "richMessages": false, "replyDelivery": "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": {} } ]}