Custom Variable

You need the Manage Custom Variables to manage Custom Variables.

Custom Variables
- Custom Variables Manage
GET livechat/customVariables
GET livechat/customVariables/{id}
POST livechat/customVariables
PUT livechat/customVariables/{id}
DELETE livechat/customVariables/{id}
Model
Custom Variable JSON Format

Custom Variable is represented as simple flat JSON objects with the following keys:

Name Type Description
id guid Id of the custom variable.
name string Name of the custom variable.
value string Value of the custom variable.
hyperlink string Hyperlink of the custom variable.
type string Allowed values are "text", "integer", "decimal".
Endpoint
Get the list of Custom Variables

GET livechat/customVariables

Parameters:
No Parameters
Response:

An array of   Custom Variable

Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/customVariables \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

[{"id":"6BB15329-7C46-EB11-8100-00155D081D0B","name":"c_v_name","value":"c_v_value","hyperlink":"{!Visitor.IP}","type":"text"}]
Get a single Custom Variable

GET livechat/customVariables/{id}

Parameters:
No Parameters
Response:
Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/customVariables/6BB15329-7C46-EB11-8100-00155D081D0B \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

{"id":"6BB15329-7C46-EB11-8100-00155D081D0B","name":"c_v_name","value":"c_v_value","hyperlink":"{!Visitor.IP}","type":"text"}
Create a new Custom Variable

POST livechat/customVariables

Parameters:
Name Type In Required Description
name string body yes Name of the custom variable.
value string body no Value of the custom variable.
hyperlink string body no Hyperlink of the custom variable.
type string body yes Allowed values are "text", "integer", "decimal".
Response:
Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/customVariables \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"name":"c_v_name","value":"c_v_value","hyperlink":"{!Visitor.IP}","type":"text"}'

Response:

 HTTP/1.1 201 Created

{"id":"6BB15329-7C46-EB11-8100-00155D081D0B","name":"c_v_name","value":"c_v_value","hyperlink":"{!Visitor.IP}","type":"text"}
Update the Custom Variable

PUT livechat/customVariables/{id}

Parameters:
Name Type In Required Description
name string body yes Name of the custom variable.
value string body no Value of the custom variable.
hyperlink string body no Hyperlink of the custom variable.
type string body yes Allowed values are "text", "integer", "decimal".
Response:
Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/customVariables/6BB15329-7C46-EB11-8100-00155D081D0B \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"name":"c_v_name","value":"c_v_value","hyperlink":"{!Visitor.IP}","type":"text"}'

Response:

 HTTP/1.1 200 OK

{"id":"6BB15329-7C46-EB11-8100-00155D081D0B","name":"c_v_name","value":"c_v_value","hyperlink":"{!Visitor.IP}","type":"text"}
Remove the Custom Variable

DELETE livechat/customVariables/{id}

Parameters:
No Parameters
Response:

No Content

Example

Sample Request:

curl https://api11.comm100.io/v4/livechat/customVariables/6BB15329-7C46-EB11-8100-00155D081D0B \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 204 No Content