Send a visitor message to an agent and receive its reply as JSON. Each delivered message uses one message credit from the account plan. Conversations appear in the dashboard Inbox under the API channel. Requires the write:chat permission.
Authorization
BearerAuth write:chatIn: header
Scope: write:chat
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/agents/string/chat" \ -H "Content-Type: application/json" \ -d '{ "message": "What are your opening hours?", "sessionId": "crm-user-84213" }'{
"agentId": "a1b2c3d4e5",
"sessionId": "api_7f3f0c9a-6a5e-4a2b-9d1c-3d2f1e0a9b8c",
"reply": "We are open Monday to Friday, 9am to 6pm CET.",
"sources": [
{
"title": "Contact us",
"url": "https://acme.com/contact"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}Get an agent GET
Read one agent by ID. Returns 404 when the agent does not exist or is not accessible to this key. Requires the `read:agents` permission.
Get agent overview GET
One call answering "how is my agent doing": performance, demand, and items needing attention over the period (`7d`, `30d`, or `90d`). Requires the `read:analytics` permission.