POST
/
sessions
Create Chat Session
curl --request POST \
  --url https://api.callhq.ai/api/sessions \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "name": "<string>",
  "assistantId": "<string>"
}'
{
  "message": "<string>",
  "session": {
    "id": "<string>",
    "name": "<string>",
    "assistantId": "<string>",
    "status": "<string>",
    "messages": [
      {
        "role": "user",
        "content": "<string>"
      }
    ],
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

x-api-key
string
header
required

Body

application/json

Response

200
application/json

Session created successfully

The response is of type object.