Chats
Create a chat
Start a conversation with follow-up questions. The results are returned as a message in the chat.
POST
/
chats
Copy
curl --request POST \
--url https://api.vectorify.ai/v1/chats \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"text": "how many invoices are in draft status?",
"collections": [
"invoices"
],
"tenant": 235611,
"identifier": {
"id": "123",
"name": "John Doe",
"email": "john@example.com"
}
}'
Copy
{
"data": {
"id": "<string>",
"name": "<string>",
"tenant": 123,
"user": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"avatar": "<string>",
"created_at": "<string>"
},
"created_at": "<string>",
"messages": [
{
"id": "<string>",
"chat_id": "<string>",
"role": "<string>",
"user": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"avatar": "<string>",
"created_at": "<string>"
},
"text": "<string>",
"text_html": "<string>",
"identifier": "<string>",
"feedback": "<string>",
"created_at": "<string>"
}
]
}
}
Authorizations
Body
application/json
Response
201
application/json
Chat
The response is of type object
.
Was this page helpful?
Copy
curl --request POST \
--url https://api.vectorify.ai/v1/chats \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"text": "how many invoices are in draft status?",
"collections": [
"invoices"
],
"tenant": 235611,
"identifier": {
"id": "123",
"name": "John Doe",
"email": "john@example.com"
}
}'
Copy
{
"data": {
"id": "<string>",
"name": "<string>",
"tenant": 123,
"user": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"avatar": "<string>",
"created_at": "<string>"
},
"created_at": "<string>",
"messages": [
{
"id": "<string>",
"chat_id": "<string>",
"role": "<string>",
"user": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"avatar": "<string>",
"created_at": "<string>"
},
"text": "<string>",
"text_html": "<string>",
"identifier": "<string>",
"feedback": "<string>",
"created_at": "<string>"
}
]
}
}
Assistant
Responses are generated using AI and may contain mistakes.