Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1.86 KB

send-an-array-of-livechat-custom-fields.md

File metadata and controls

43 lines (33 loc) · 1.86 KB

Send Array of Custom Field Values

Send an array of values for different custom fields.

HTTP MethodURLRequires Auth
POST/api/v1/livechat/custom.fieldsno

Body Parameters

KeyExample ValueDescription
token*iNKE8a6k6cjbqWhWdThe visitor token.
customFields*"customFields": [{ ... }] }The object in which you must enter the custom field information.
key*addressThe custom field.
value*Rocket.Chat AvenueThe value you want to set for the custom field.
overwrite*trueOverwrite the value of the custom field.

Example Call

curl -X POST \
     -H "Content-type:application/json" \
     http://localhost:3000/api/v1/livechat/custom.fields \
     -d '{"token": "iNKE8a6k6cjbqWhWd", 
     "customFields": [{
          "key": "address", 
          "value": "Rocket.Chat Avenue", 
          "overwrite": true}]}'

Example Response

{
  "fields": [
    {
      "Key": "address",
      "value": "Rocket.Chat Avenue",
      "overwrite": true
    }
  ],
  "success": true
}

Change Log

Version Description
0.70.0 Added