REST API v1
Conversations
Base URL https://your-site.com/wp-json/cliedesk-api/v1. See the overview for keys, scopes and errors.
List conversations
GET /conversations
Scope conversations:read · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
limit | query · integer | |
cursor | query · string | |
sort | query · string | |
fields | query · string | |
expand | query · string | |
filter | query · object | filter[field][op]=value. Fields: status_category, status, priority, channel, type, product_id, team_id, assignee_id, contact_id, tag, language. |
Create a conversation
POST /conversations
Scope conversations:write · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
Idempotency-Key | header · string |
Request body (JSON)
| Name | Type | Description |
|---|---|---|
product_id required | string | |
contact_id | string | |
email | string | |
name | string | |
subject required | string | |
html required | string | |
as_note | boolean | |
priority | string | One of: none, low, normal, high, urgent |
assignee_id | integer | |
type_id | integer | |
values | string |
Find a conversation by number
GET /conversations/number/{number}
Scope conversations:read · Cost 1
Parameters
| Name | Type | Description |
|---|---|---|
number required | path · integer |
Get a conversation
GET /conversations/{id}
Scope conversations:read · Cost 1
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string |
Move a conversation to Trash
DELETE /conversations/{id}
Scope conversations:delete · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string | |
Idempotency-Key | header · string |
Apply a saved reply
POST /conversations/{id}/apply-saved-reply
Scope conversations:write · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string | |
Idempotency-Key | header · string |
Request body (JSON)
| Name | Type | Description |
|---|---|---|
saved_reply_id required | string | |
as | string | One of: reply, note |
Assign the conversation
POST /conversations/{id}/assign
Scope conversations:write · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string | |
Idempotency-Key | header · string |
Request body (JSON)
| Name | Type | Description |
|---|---|---|
assignee_id | integer | |
team_id | string | |
queue_id | integer |
Start a new episode
POST /conversations/{id}/episodes
Scope conversations:write · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string | |
Idempotency-Key | header · string |
Timeline events
GET /conversations/{id}/events
Scope events:read · Cost 1
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string | |
after | query · string | |
limit | query · integer |
Merge into another conversation
POST /conversations/{id}/merge
Scope conversations:write · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string | |
Idempotency-Key | header · string |
Request body (JSON)
| Name | Type | Description |
|---|---|---|
source_ids required | array of string | |
choices | object | |
field_choices | array of object | |
note | object |
Mark as not spam
POST /conversations/{id}/not-spam
Scope conversations:write · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string | |
Idempotency-Key | header · string |
Change the priority
POST /conversations/{id}/priority
Scope conversations:write · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string | |
Idempotency-Key | header · string |
Request body (JSON)
| Name | Type | Description |
|---|---|---|
priority required | string | One of: none, low, normal, high, urgent |
Move to another product
POST /conversations/{id}/product
Scope conversations:write · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string | |
Idempotency-Key | header · string |
Request body (JSON)
| Name | Type | Description |
|---|---|---|
product_id required | string |
Restore a conversation from Trash
POST /conversations/{id}/restore
Scope conversations:delete · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string | |
Idempotency-Key | header · string |
Snooze the conversation
POST /conversations/{id}/snooze
Scope conversations:write · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string | |
Idempotency-Key | header · string |
Request body (JSON)
| Name | Type | Description |
|---|---|---|
hours required | integer |
Mark as spam
POST /conversations/{id}/spam
Scope conversations:write · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string | |
Idempotency-Key | header · string |
Split messages into a new conversation
POST /conversations/{id}/split
Scope conversations:write · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string | |
Idempotency-Key | header · string |
Request body (JSON)
| Name | Type | Description |
|---|---|---|
message_ids required | array of string | |
field_ids | array of integer | |
subject | string |
Change the status
POST /conversations/{id}/status
Scope conversations:write · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string | |
Idempotency-Key | header · string |
Request body (JSON)
| Name | Type | Description |
|---|---|---|
status_id | integer | |
status | string | |
snooze_until | string | |
snooze_mode | string | One of: if_no_reply, regardless |
Change the subject
POST /conversations/{id}/subject
Scope conversations:write · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string | |
Idempotency-Key | header · string |
Request body (JSON)
| Name | Type | Description |
|---|---|---|
subject required | string |
Change the type
POST /conversations/{id}/type
Scope conversations:write · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · string | |
Idempotency-Key | header · string |
Request body (JSON)
| Name | Type | Description |
|---|---|---|
type_id required | integer |