Create a chat session
POST
/api/v1/projects/{projectId}/chat/sessions
const url = 'https://api.yggy.tech/api/v1/projects/example/chat/sessions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', '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://api.yggy.tech/api/v1/projects/example/chat/sessions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "example" }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” projectId
required
string
Request Body
Section titled “Request Body ” Media type application/json
object
title
string
Example generated
{ "title": "example"}Responses
Section titled “ Responses ”Session created
Media type application/json
object
success
required
boolean
session
required
object
id
required
string
userId
required
string | null
organizationId
required
string | null
projectId
required
string | null
title
required
string | null
createdAt
required
string
updatedAt
required
string
snippet
string
Example
{ "success": true}Bad request
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Unauthorized
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Forbidden
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Not found
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}