Create a chat session
POST
/api/v1/chat/sessions
const url = 'https://app.avera.io/api/v1/chat/sessions';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"title":"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://app.avera.io/api/v1/chat/sessions \ --header 'Content-Type: application/json' \ --data '{ "title": "example" }'The title is optional: a title is generated on the first message when absent.
Request Body
Section titled “Request Body”Media typeapplication/json
object
title
string | null
Example generated
{ "title": "example"}Responses
Section titled “Responses”OK
Media type*/*
object
id
required
string format: uuid
projectId
required
string format: uuid
branchId
required
string format: uuid
title
required
string
titleSource
required
string
createdBy
required
string format: uuid
createdAt
required
string format: date-time
lastMessageAt
required
string format: date-time
messageCount
required
integer format: int32
totalTokensUsed
required
integer format: int64
status
required
string