API Reference
Agent Chat Completion (GHL-Safe)
API Reference
Agent Chat Completion (GHL-Safe)
POST
/
v2
/
ghl-chat-completion
curl --request POST \
--url https://api.assistable.ai/v2/ghl-chat-completion \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"conversation_id": "<string>",
"contact_id": "<string>",
"last_message_id": "<string>",
"channel": "<string>",
"input": "<string>",
"location_id": "<string>",
"messages": [
{}
],
"assistant_id": "<string>"
}'
{
"run": {
"response": {
"messages": [
{
"role": "<string>",
"content": "<string>",
"refusal": "<string>",
"annotations": [
{}
]
}
],
"toolCalls": [
{}
],
"completionTimestamp": "2023-11-07T05:31:56Z"
},
"message": {
"conversationId": "<string>",
"messageId": "<string>",
"traceId": "<string>"
},
"knowledge_base": {
"matches": [
{
"id": "<string>",
"score": 123,
"values": [
{}
],
"metadata": {
"text": "<string>"
}
}
],
"namespace": "<string>",
"usage": {
"readUnits": 123
}
},
"input": "<string>",
"output": "<string>"
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200 - application/json
Chat completion successful
The response is of type object
.
curl --request POST \
--url https://api.assistable.ai/v2/ghl-chat-completion \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"conversation_id": "<string>",
"contact_id": "<string>",
"last_message_id": "<string>",
"channel": "<string>",
"input": "<string>",
"location_id": "<string>",
"messages": [
{}
],
"assistant_id": "<string>"
}'
{
"run": {
"response": {
"messages": [
{
"role": "<string>",
"content": "<string>",
"refusal": "<string>",
"annotations": [
{}
]
}
],
"toolCalls": [
{}
],
"completionTimestamp": "2023-11-07T05:31:56Z"
},
"message": {
"conversationId": "<string>",
"messageId": "<string>",
"traceId": "<string>"
},
"knowledge_base": {
"matches": [
{
"id": "<string>",
"score": 123,
"values": [
{}
],
"metadata": {
"text": "<string>"
}
}
],
"namespace": "<string>",
"usage": {
"readUnits": 123
}
},
"input": "<string>",
"output": "<string>"
}
}