Update Custom Fields

This endpoint allows for a single conversation’s custom fields to be updated. The entire list of custom fields for a conversation must be sent in the payload. Any custom fields existing on the conversation that are not part of the payload will be removed. To remove all custom fields, an empty list would be sent.

Request

PUT /v2/conversations/99/fields HTTP/1.1
Authorization: Bearer oauth_token
Content-Type: application/json

{
  "fields" : [ {
    "id" : 104,
    "value" : "168"
  } ]
}

Path Parameters

/v2/conversations/{conversationId}/fields

Request fields

Path Type Required Description
fields Array Y List of custom fields to be applied to the conversation, the whole state must be sent each time as the payload will replace whatever currently exists.
fields[0].id Number Y Id of the custom field
fields[0].value String Y The value of the custom field, see table below for additional information

Value types and formatting

Value type Format
Number Integer values <= 255 characters in length
Date fields Must be in YYYY-MM-DD format
Drop down fields Must contain the identifier of the option they represent (i.e. option.id)
Single line fields Must be less than or equal to 255 characters
Multi-line fields Must be less than or equal to 15’000 characters

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.