REST API v1
AI agent
Base URL https://your-site.com/wp-json/cliedesk-api/v1. See the overview for keys, scopes and errors.
Hand a conversation from the AI agent to people
POST /ai/agent/conversations/{id}/escalate
Scope ai_agent:write · Cost 5
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string | |
Idempotency-Key | header · string |
Run an AI agent playbook on a conversation
POST /ai/agent/conversations/{id}/playbook
Scope ai_agent:write · Cost 5
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string | |
Idempotency-Key | header · string |
Send a customer message to the AI agent (the answer within wait seconds, else poll or stream)
POST /ai/agent/messages
Scope ai_agent:write · Cost 5
Parameters
| Name | Type | Description |
|---|---|---|
Idempotency-Key | header · string |
The AI agent's answer to a message (polling)
GET /ai/agent/messages/{id}
Scope ai_agent:read · Cost 1
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string |
The AI agent's answer to a message (Server-Sent Events)
GET /ai/agent/messages/{id}/stream
Scope ai_agent:read · Cost 1
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string |