Update Conversation
Utilising this JSONPatch endpoint several key conversation fields can be changed. For a summary of fields and operations allowed check out the following table
Request
PATCH /v2/conversations/123 HTTP/1.1
Authorization: Bearer oauth_token
Content-Type: application/json
{
"op" : "replace",
"path" : "/subject",
"value" : "super cool new subject"
}
Path Parameters
/v2/conversations/{conversationId}
Request fields
Path | Type | Required | Description |
---|---|---|---|
op |
String |
Y | Patch operation to be carried out, one of: add move remove replace |
path |
String |
Y | Path of the value to be changed, one of: /assignTo /draft /mailboxId /primaryCustomer.id /status /subject |
value |
Varies |
N | Value to be used in operation, refer to table below for valid types |
Valid paths and operations
Functionality | Path value | Op value | Value type |
---|---|---|---|
Change subject | /subject |
replace |
String |
Change customer | /primaryCustomer.id |
replace |
Number |
Publish draft | /draft |
replace |
Boolean |
Move conversation to another inbox | /mailboxId |
move |
Number |
Change conversation status | /status |
replace |
String |
Change conversation owner | /assignTo |
replace |
Number |
Un-assign conversation | /assignTo |
remove |
Number |
Response
HTTP/1.1 204 No Content
Moved or merged conversations
When a conversation is merged with another conversation,
it is no longer accessible using the old ID. Get Conversation endpoint will return
a HTTP 301 Moved Permanently
status code and the response will contain a Location
header with
the URI of the new conversation.
This request will return a HTTP 404 Not Found
in such case. If you suspect the conversation you are trying to change was merged, call the Get Conversation
endpoint to get a new conversation location.