Complete API reference

Data fields formats
Return messages formats
Error messages formats
Api v.1
    Agents
        Retrieves agent info and auth token
    Application
        Return application installation date and latest version
    Companies
        Retrieve list of companies
        Retrieve company info
    Conversations
        Transfer conversation to another department and/or agent
        Delete conversation
        Delete custom field value in conversation
        Add custom field value to conversation
        Retrieves all conversations
        Retrieves conversation info
        Retrieves all conversation messages
        Create new message in conversation
        Create new conversation
        Change status of the conversation
        Unassign a tag from a conversation
        Retrieve a list of tags assigned to a conversation
        Assign tag to a conversation
    Customers
        Delete custom field value in user contact
        Add custom field value to customer
        Retrieves all customers
        Retrieves customer info
        Remove customer from group
        Retrieve customer groups
        Add customer to group
        Register new customer
    Customers groups
        Delete customers group
        Retrieve customers group info
        Retrieve all groups of all customers
        Add customers group
        Change customers group
    Departments
        Retrieve all agents statuses in departmnet
        Retrieve list of departments
        Retrieve department info
    Files
        Retrieve file
        Add file
    Knowledgebase
        Retrieve a list of all knowledgebase articles (deprecated)
        Add knowledgebase article
        Change knowledgebase article
        Add knowledgebase category, suggestion category or forum
        Change knowledgebase category, suggestion category or forum
        Remove knowledgebase entry
        Retrieve a list of all knowledgebase entries
        Retrieve a list of all knowledgebases
        Knowledgebase search
    Online status
        Agents
        Departments
    Reports
        Agents report
        Channels report
        Departments report
        Performance report
        Tags report
        Tickets Agent availability report
        Tickets Load report
        Tickets SLA Compliance report
        Tickets SLA Log report
        Chats Agent availability report
        Chats availability report
        Chats Load report
        Chats SLA Compliance report
        Chats SLA log report
        Calls Agent availability report
        Calls availability report
        Calls Load report
        Calls SLA Compliance report
        Calls SLA log report
        Ranking agents report
    Suggestion categories
        Retrieves all suggestion categories
    Tags
        Remove tag
        Retrieve a list of all available tags
        Retrieve tag info
        Add tag
        Change tag
    Widgets
        Remove widget
        Retrieve all widgets
        Retrieve widget
        Add widget
        Change widget
    Overview
        Chats
        Phone calls

Datafield formats


TypeDescription
datetimevalid format: YYYY-MM-DD HH:MM:SS. Note: values are in "America/Los_Angeles" timezone by default.
textcould be any string or empty
constlistcould be only one instance of finite set. Possible values are named in specifice field description.
intinteger value greater or equal to zero.
arraylist of entities. All entities have the same column definition
listlist of entities. Every entity has its specific column definition.
opdatetimedatetime with operator. This field has the same format as 'datetime' except you can use various operators with it.
Possible operators:
eq: equals, example 'eq:2009-11-12 05:02:01' or just '2009-11-12 05:02:01'
neq: NOT equals, example 'neq:2009-11-12 05:02:01'
gt: greater than, example 'gt:2009-11-12 05:02:01'
lt: lower than, example 'lt:2009-11-12 05:02:01'
gte: greater or equals than, example 'gte:2009-11-12 05:02:01'
lte: lower or equals than, example 'lte:2009-11-12 05:02:01'
btw: between of, example 'btw:2009-11-12 05:02:01,2010-10-11 04:01:59'
lk: like, example 'lk:2009-11-12 05:02:01' or you can use wildcard characters '%' (for any number of characters) or ? (for one character) 'lk:2009-01-%' or 'lk:2011-12-01 ??:59:59'
note: if you do not enter any operator, 'eq' will be used as default.


Return messages formats


Return messages are in JSON format by default. But you can change this to XML by adding .xml at the end of call URL.This will give response in JSON:
GET
  http://example.com/api/agents/john@agent.com

We add .xml to call URL and we have response in XML format
GET
  http://example.com/api/agents/john@agent.com.xml

Note: if y ou have PHP YAML extension enabled in your PHP, you could also use .yaml to get response in YAML format.

Error messages formats


400 - Bad request error
You can get this in case your athentification with API key failed because of problem with API key in application.

401 - Forbidden
You can get this in case of failed authentification with wrong key

404 - Not found error
You can get this in case "agnet with email agent@email.com not found"

500 - Common porcessing error
This is the most common error type. You can get this in case "parameter message is missing" or "unable to load conversation"

503 - Service Unavailable
You can get this in case application is unavaliable to process requests - in case of updating and/or installing.

Error response example
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>ERROR</status>
 <statuscode>500</statuscode>
 <errormessage>Example error message</errormessage>
 <debugmessage>debug info</debugmessage>
</response>
{
  "response":{
    "status":"ERROR",
    "statuscode":500,
    "errormessage":"Example error message",
    "debugmessage":"debug info"
  }
}

API version 1


Agents


Retrieves agent info and auth token

Avaliable from application version: 2.8.2.1
Avaliable examples: WordPress plugin example

Example call
  • General
  • PHP
GET
  http://example.com/api/agents/[agentidentifier]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/agents/[agentidentifier]?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[agentidentifier]textAgent identifier. Can be email or userid.
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
contactidtextId of agent contact.
useridtextId of agent, also known as userid.
emailtextAgent email.
firstnametextAgent first name.
lastnametextAgent last name.
systemnametextAgent system name.
authtokentextAgent auth token.
browsercookienametextAgent browser cookie name.
genderconstlistAgent gender. (Possible values: M - Male, F - Female)
roleconstlistAgent role. (Possible values: D - Administrator, A - Agent, O - Owner)

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <contactid>d44t87a5</contactid>
 <userid>uid1234</userid>
 <email>example@agent.com</email>
 <firstname>John</firstname>
 <lastname>Williams</lastname>
 <systemname>system001</systemname>
 <authtoken>5ceef21647f1db39a18cafc0bc2de015</authtoken>
 <browsercookiename>A_auth</browsercookiename>
 <gender>F</gender>
 <role>D</role>
</response>
{
  "response":{
    "contactid":"d44t87a5",
    "userid":"uid1234",
    "email":"example@agent.com",
    "firstname":"John",
    "lastname":"Williams",
    "systemname":"system001",
    "authtoken":"5ceef21647f1db39a18cafc0bc2de015",
    "browsercookiename":"A_auth",
    "gender":"F",
    "role":"D"
  }
}



Application


Return application installation date and latest version

Avaliable from application version: 2.8.12.1

Example call
  • General
  • PHP
GET
  http://example.com/api/application/status
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/application/status?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
liveagentversiontextLatest application version
gpfversiontextLatest framework version
dateinstalleddatetimeDate of Application installation
datelatestupdatedatetimeDate of latest update
current_server_timedatetimeCurrent server time

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <liveagentversion>2.8.5.4</liveagentversion>
 <gpfversion>1.7.8.4</gpfversion>
 <dateinstalled>2012-04-05 11:22:31</dateinstalled>
 <datelatestupdate>2012-08-05 12:13:05</datelatestupdate>
 <current_server_time>2014-08-09 10:14:00</current_server_time>
</response>
{
  "response":{
    "liveagentversion":"2.8.5.4",
    "gpfversion":"1.7.8.4",
    "dateinstalled":"2012-04-05 11:22:31",
    "datelatestupdate":"2012-08-05 12:13:05",
    "current_server_time":"2014-08-09 10:14:00"
  }
}



Companies


Retrieve list of companies

Avaliable from application version: 4.23.0.0

Example call
  • General
  • PHP
GET
  http://example.com/api/companies
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/companies?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
companieslistlist of all companies
Field companies has 4 columns:
idtextunique identifier of company
nametextname of the company
emailstextemail addresses associated with the company
datecreateddatetimedate, when company was created

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <companies>
  <companie>
   <id>d8f6ba6d</id>
   <name>Company Co.</name>
   <emails>ceo@companyco.com</emails>
   <datecreated>2015-05-28 06:25:07</datecreated>
  </companie>
 </companies>
</response>
{
  "response":{
    "companies":[
      {
        "id":"d8f6ba6d",
        "name":"Company Co.",
        "emails":"ceo@companyco.com",
        "datecreated":"2015-05-28 06:25:07"
      }
    ]
  }
}


Retrieve company info

Avaliable from application version: 4.23.0.0

Example call
  • General
  • PHP
GET
  http://example.com/api/companies/[companyid]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/companies/[companyid]?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[companyid]textCompany ID
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
idtextId of the company
nametextCompany name
datecreatedtextDate, when company was created
languagetextLanguage associated with company
emailsarrayList of company emails
phonesarrayList of company phones
groupslistList of groups, which company is part of
Field groups has 2 columns:
groupidtextId of group
groupnametextName of group
custom_fieldslistCustom field values
Field custom_fields has 2 columns:
codetextCustom field code
valuetextCustom field value
unique_fieldslistUnique company identifiers
Field unique_fields has 2 columns:
codetextUnique field code.
valuetextUnique field value.

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <id>d8f6ba6d</id>
 <name>Company Co.</name>
 <datecreated>2015-05-28 06:25:07</datecreated>
 <language>en</language>
 <emails>
  <email>support@companyco.com</email>
  <email>boss@companyco.com</email>
 </emails>
 <phones>
  <phone>+214101254896</phone>
  <phone>0909 111 111</phone>
 </phones>
 <groups>
  <group>
   <groupid>456rs</groupid>
   <groupname>Super group</groupname>
  </group>
  <group>
   <groupid>orj5s</groupid>
   <groupname>Rito pls</groupname>
  </group>
 </groups>
 <custom_fields>
  <custom_field>
   <code>n. of people</code>
   <value>42</value>
  </custom_field>
  <custom_field>
   <code>favourite drink</code>
   <value>coffee</value>
  </custom_field>
 </custom_fields>
 <unique_fields>
  <unique_field>
   <code>email</code>
   <value>support@companyco.com</value>
  </unique_field>
  <unique_field>
   <code>email</code>
   <value>boss@companyco.com</value>
  </unique_field>
  <unique_field>
   <code>phone</code>
   <value>+19837987987</value>
  </unique_field>
 </unique_fields>
</response>
{
  "response":{
    "id":"d8f6ba6d",
    "name":"Company Co.",
    "datecreated":"2015-05-28 06:25:07",
    "language":"en",
    "emails":[
      "support@companyco.com",
      "boss@companyco.com"
    ],
    "phones":[
      "+214101254896",
      "0909 111 111"
    ],
    "groups":[
      {
        "groupid":"456rs",
        "groupname":"Super group"
      },
      {
        "groupid":"orj5s",
        "groupname":"Rito pls"
      }
    ],
    "custom_fields":[
      {
        "code":"n. of people",
        "value":"42"
      },
      {
        "code":"favourite drink",
        "value":"coffee"
      }
    ],
    "unique_fields":[
      {
        "code":"email",
        "value":"support@companyco.com"
      },
      {
        "code":"email",
        "value":"boss@companyco.com"
      },
      {
        "code":"phone",
        "value":"+19837987987"
      }
    ]
  }
}



Conversations


Transfer conversation to another department and/or agent

Avaliable from application version: 2.8.2.1

Example call
  • General
  • PHP
PUT
  http://example.com/api/conversations/[conversationid]/attendants
Note: You must send parameters for this call as PUT fields.
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/conversations/[conversationid]/attendants");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
$curl_put_data = array(
        /* These are mandatory params */
        'apikey' => '...',
        /* ...and these are optional */
        'agentidentifier' => '...',
        'useridentifier' => '...',
        'department' => '...',
        'note' => '...',
);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($curl_put_data));
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[conversationid]textConversation ID (eg. 12ab34cd) or code (eg. ABC-DEFGH-123) or public url code (eg. m6uoFJd2e4I8Z18q)
apikeytextAPI key

Optional parameters

NameTypeDescription
agentidentifiertextAgent identifier. Could be mail or userid.
useridentifiertextUser identifier (could be mail or userid) who will transfer the conversation. If undefined, user "System" will be used.
departmenttextId of the department.
notetextTransfer note.


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":0
  }
}


Delete conversation

Avaliable from application version: 2.8.2.1

Example call
  • General
  • PHP
DELETE
  http://example.com/api/conversations/[conversationid]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/conversations/[conversationid]");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
$curl_delete_data = array(
        /* These are mandatory params */
        'apikey' => '...',
        /* ...and these are optional */
        'note' => '...',
        'useridentifier' => '...',
);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($curl_delete_data));
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[conversationid]textConversation ID (eg. 12ab34cd) or code (eg. ABC-DEFGH-123) or public url code (eg. m6uoFJd2e4I8Z18q)
apikeytextAPI key

Optional parameters

NameTypeDescription
notetextDelete note
useridentifiertextAgent identifier. Could be mail or userid. If not set, user "System" will be used.


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":0
  }
}


Delete custom field value in conversation

Avaliable from application version: 4.16.4.1

Example call
  • General
  • PHP
DELETE
  http://example.com/api/conversations/[conversationid]/fields
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/conversations/[conversationid]/fields");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
$curl_delete_data = array(
        /* These are mandatory params */
        'apikey' => '...',
        /* ...and these are optional */
        'code' => '...',
);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($curl_delete_data));
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[conversationid]textConversation ID (eg. 12ab34cd) or code (eg. ABC-DEFGH-123) or public url code (eg. m6uoFJd2e4I8Z18q)
apikeytextAPI key

Optional parameters

NameTypeDescription
codetextCustom field name to be deleted from conversation. If not specified, all fields will be deleted from conversation.


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":0
  }
}


Add custom field value to conversation

Avaliable from application version: 4.16.4.1

Example call
  • General
  • PHP
POST
  http://example.com/api/conversations/[conversationid]/fields
Note: You must send parameters for this call as POST fields.
<?php
$ch = curl_init();
$curl_post_data = array(
        /* These are mandatory params */
        'customfields' => '...',
        'apikey' => '...',
);
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/conversations/[conversationid]/fields");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curl_post_data);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[conversationid]textConversation ID (eg. 12ab34cd) or code (eg. ABC-DEFGH-123) or public url code (eg. m6uoFJd2e4I8Z18q)
customfieldsjsonAdd custom field values (Same field can be added multiple times, if you need to update existing field value, delete it first). Json encoded array of custom fields. Example value: [{"code":"varsymbol","value":"43894209"},{"code":"anotherfield","value":"test value"}]
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":0
  }
}


Retrieves all conversations

Avaliable from application version: 2.8.2.1

Example call
  • General
  • PHP
GET
  http://example.com/api/conversations
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/conversations?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
owneridentifiertextConversations owner identifier. Could be mail.
departmenttextDepartment identifier
agenttextAgent identifier. Could be userid or mail.
statustextLoad only conversations with given status. It can contain one specific status, or multiple statuses separated by comma. Example: status=R,T,C. This parameter is avaliable from version 2.8.12.1
datefromdatetimeLoad only conversations older than this date (valid format: YYYY-MM-DD HH:MM:SS).
datetodatetimeLoad only conversations younger than this date (valid format: YYYY-MM-DD HH:MM:SS).
datechangedopdatetimeDate of last conversation change
subjecttextLoad only conversations with specific subject - avail. from version 3.0.1.2
limitintLimit number of returned rows. Default value: 100, Max value: 1000
offsetintReturn articles from defined row number. Default value 0.
channel_typetextLoad only conversations with given channel type. It can contain one specific channel type, or multiple channel types separated by comma. Example: channel_type=E,F,T. This parameter is available from version 4.25.5.1


Call response description

Return fields

NameTypeDescription
conversationslistConversations list
Field conversations has 15 columns:
conversationidtextId of conversation
codetextConversation code
datecreateddatetimeDate created
datechangeddatetimeDate of last change
dateduedatetimeDue date (if sla is set)
departmentnametextDepartment name
departmentidtextDepartment id
statusconstlistConversation status (Possible values: A - Answered, P - Calling, T - Chatting, X - Deleted, B - Spam, I - Init, C - Open, R - Resolved, N - New, W - Postponed)
ownernametextName of conversation owner
owneremailtextEmail of conversation owner
subjecttextConversation subject
previewtextConversation preview
publicurlcodetextPublic URL code
tagstextTags assigned to ticket.
channel_typeconstlistConversation channel (Possible values: E - Email, B - Contact button, M - Contact form, I - Invitation, C - Call, W - Call button, F - Facebook, A - Facebook message, T - Twitter, H - Weibo, J - Weibo private, D - Tencent, N - Tencent private, Q - Forum, S - Suggestion)

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <conversations>
  <conversation>
   <conversationid>s4y7t5s7</conversationid>
   <code>AX4-B4T-FD8</code>
   <datecreated>2012-03-02 11:21:04</datecreated>
   <datechanged>2012-03-02 11:21:05</datechanged>
   <departmentname>Department 1</departmentname>
   <departmentid>a5j9t4d8</departmentid>
   <status>A</status>
   <ownername>John Owner</ownername>
   <owneremail>john@owner.com</owneremail>
   <subject>Test ticket</subject>
   <preview>this is test ticket</preview>
   <publicurlcode>bI5fR3oN40708G65</publicurlcode>
   <tags>tagid1,tagid2</tags>
   <channel_type>E</channel_type>
  </conversation>
  <conversation>
   <conversationid>5h7t58d9</conversationid>
   <code>D5S-55S-A9A</code>
   <datecreated>2012-03-02 12:21:04</datecreated>
   <datechanged>2012-03-02 12:21:05</datechanged>
   <departmentname>Department 1</departmentname>
   <departmentid>a5j9t4d8</departmentid>
   <status>A</status>
   <ownername>John Silver</ownername>
   <owneremail>john@silver.com</owneremail>
   <subject>My ticet</subject>
   <preview>this my ticket</preview>
   <publicurlcode>xU6fR3zN40708G65</publicurlcode>
   <tags>tagid1,tagid2</tags>
   <channel_type>F</channel_type>
  </conversation>
 </conversations>
</response>
{
  "response":{
    "conversations":[
      {
        "conversationid":"s4y7t5s7",
        "code":"AX4-B4T-FD8",
        "datecreated":"2012-03-02 11:21:04",
        "datechanged":"2012-03-02 11:21:05",
        "departmentname":"Department 1",
        "departmentid":"a5j9t4d8",
        "status":"A",
        "ownername":"John Owner",
        "owneremail":"john@owner.com",
        "subject":"Test ticket",
        "preview":"this is test ticket",
        "publicurlcode":"bI5fR3oN40708G65",
        "tags":"tagid1,
        tagid2",
        "channel_type":"E"
      },
      {
        "conversationid":"5h7t58d9",
        "code":"D5S-55S-A9A",
        "datecreated":"2012-03-02 12:21:04",
        "datechanged":"2012-03-02 12:21:05",
        "departmentname":"Department 1",
        "departmentid":"a5j9t4d8",
        "status":"A",
        "ownername":"John Silver",
        "owneremail":"john@silver.com",
        "subject":"My ticet",
        "preview":"this my ticket",
        "publicurlcode":"xU6fR3zN40708G65",
        "tags":"tagid1,
        tagid2",
        "channel_type":"F"
      }
    ]
  }
}


Retrieves conversation info

Avaliable from application version: 2.8.2.1

Example call
  • General
  • PHP
GET
  http://example.com/api/conversations/[conversationid]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/conversations/[conversationid]?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[conversationid]textConversation ID (eg. 12ab34cd) or code (eg. ABC-DEFGH-123) or public url code (eg. m6uoFJd2e4I8Z18q)
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
conversationidtextId of conversation
codetextConversation code
datecreateddatetimeDate created
datechangeddatetimeDate of last change
dateduedatetimeDue date (if sla is set)
departmentnametextDepartment name
departmentidtextDepartment id
statusconstlistConversation status (Possible values: A - Answered, P - Calling, T - Chatting, X - Deleted, B - Spam, I - Init, C - Open, R - Resolved, N - New, W - Postponed)
ownernametextName of conversation owner
owneremailtextEmail of conversation owner
subjecttextConversation subject
ownernotetextConversation owner note - avail. from version 2.8.12.X+
previewtextConversation preview
publicurlcodetextPublic URL code
assignedtotextIdentifier of agent which is this conversation assigned to
tagstextTags assigned to ticket
channel_typeconstlistConversation channel (Possible values: E - Email, B - Contact button, M - Contact form, I - Invitation, C - Call, W - Call button, F - Facebook, A - Facebook message, T - Twitter, H - Weibo, J - Weibo private, D - Tencent, N - Tencent private, Q - Forum, S - Suggestion)
customfieldslistCustom field values
Field customfields has 2 columns:
codetextCustom field code.
valuetextCustom field value.

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <conversationid>a1b2c3d4</conversationid>
 <code>ABC-DEFGH-123</code>
 <datecreated>2012-04-01 00:15:11</datecreated>
 <datechanged>2012-04-01 00:15:21</datechanged>
 <datedue/>
 <departmentname>Department 1</departmentname>
 <departmentid>dep1s5a4</departmentid>
 <status>R</status>
 <ownername>John Doe</ownername>
 <owneremail>owner@example.com</owneremail>
 <subject>My first ticket</subject>
 <ownernote/>
 <preview>Hello, this is my first ticket...</preview>
 <publicurlcode>bI5fR3oN40708G65</publicurlcode>
 <assignedto/>
 <tags>tagid1</tags>
 <channel_type>F</channel_type>
 <customfields>
  <customfield>
   <code>varsymbol</code>
   <value>423874698</value>
  </customfield>
  <customfield>
   <code>other_var</code>
   <value>Example value of custom field</value>
  </customfield>
 </customfields>
</response>
{
  "response":{
    "conversationid":"a1b2c3d4",
    "code":"ABC-DEFGH-123",
    "datecreated":"2012-04-01 00:15:11",
    "datechanged":"2012-04-01 00:15:21",
    "datedue":null,
    "departmentname":"Department 1",
    "departmentid":"dep1s5a4",
    "status":"R",
    "ownername":"John Doe",
    "owneremail":"owner@example.com",
    "subject":"My first ticket",
    "ownernote":null,
    "preview":"Hello,
     this is my first ticket...",
    "publicurlcode":"bI5fR3oN40708G65",
    "assignedto":null,
    "tags":"tagid1",
    "channel_type":"F",
    "customfields":[
      {
        "code":"varsymbol",
        "value":"423874698"
      },
      {
        "code":"other_var",
        "value":"Example value of custom field"
      }
    ]
  }
}


Retrieves all conversation messages

Avaliable from application version: 2.8.2.1

Example call
  • General
  • PHP
GET
  http://example.com/api/conversations/[conversationid]/messages
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/conversations/[conversationid]/messages?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[conversationid]textConversation ID (eg. 12ab34cd) or code (eg. ABC-DEFGH-123) or public url code (eg. m6uoFJd2e4I8Z18q)
apikeytextAPI key

Optional parameters

NameTypeDescription
datefromdatetimeLoad messages only older than this date (valid format: YYYY-MM-DD HH:MM:SS).
datetodatetimeLoad messages only newer than this date (valid format: YYYY-MM-DD HH:MM:SS).


Call response description

Return fields

NameTypeDescription
groupslistMessage groups list.
Field groups has 7 columns:
messagegroupidtextId of the group.
useridtextId of the user who created the group.
rtypeconstlistType of the group. (Possible values: P - Type call, V - Type outgoing call, 1 - Type internal call, C - Type chat, X - Type delete, F - Type facebook, I - Type internal, Z - Type internal (collapsed by default), K - Type knowledgebase, A - Type knowledgebase start, M - Type offline, U - Type internal offline, R - Type resolve, Y - Type retweet, S - Type startinfo, G - Type tag, T - Type transfer, W - Type twitter, O - Type forwarded, Q - Type reply to forward, J - Type postpone, B - Type spam, H - Type weibo, E - Type weibo comment, D - Type tencent, N - Type tencent comment, L - Type split, 2 - Type merged)
rstatusconstlistStatus of the group (Possible values: D - Status deleted, P - Status promoted, V - Status visible, S - Status splitted, M - Status merged)
datecreateddatetimeDate of creation
datefinisheddatetimeDate ofter latest message
messageslistList of messages
Field messages has 5 columns:
messageidtextId of the message
useridtextId of the message user
rtypeconstlistType of the message (Possible values: D - Type disconnected, E - Type end, F - Type file, Z - Type formfield, H - Type header, I - Type internal, M - Type message, B - Type split, X - Type mixed message, N - Type note, L - Type note file, Q - Type quoted text, C - Type ranking comment, P - Type ranking rebuke, W - Type ranking reward, J - Type status, S - Type system, G - Type tag, O - Type footer, A - Type header, T - Type title, R - Type transfer, U - Type useragent, V - Type voice, 2 - Type merged, 0 - Type error footer, Y - Type message legacy, K - Type system public)
datecreateddatetimeDate of message creation
messagetextMessage body

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <groups>
  <group>
   <userid>uid12345</userid>
   <rtype>M</rtype>
   <rstatus>V</rstatus>
   <datecreated>2012-04-03 12:21:21</datecreated>
   <datefinished>2012-04-03 12:31:21</datefinished>
   <messages>
    <message>
     <messageid>mid00003</messageid>
     <userid>uid00001</userid>
     <rtype>M</rtype>
     <datecreated>2012-04-03 12:25:21</datecreated>
     <message>hello, this is example message</message>
    </message>
   </messages>
  </group>
  <group>
   <userid>uid12346</userid>
   <rtype>M</rtype>
   <rstatus>V</rstatus>
   <datecreated>2012-04-03 12:41:21</datecreated>
   <datefinished>2012-04-03 13:21:21</datefinished>
   <messages>
    <message>
     <messageid>mid00004</messageid>
     <userid>uid00001</userid>
     <rtype>M</rtype>
     <datecreated>2012-04-03 18:21:21</datecreated>
     <message>hello, this is example message</message>
    </message>
    <message>
     <messageid>mid00005</messageid>
     <userid>uid00001</userid>
     <rtype>M</rtype>
     <datecreated>2012-04-03 19:21:21</datecreated>
     <message>hello, this is example message</message>
    </message>
   </messages>
  </group>
 </groups>
</response>
{
  "response":{
    "groups":[
      {
        "userid":"uid12345",
        "rtype":"M",
        "rstatus":"V",
        "datecreated":"2012-04-03 12:21:21",
        "datefinished":"2012-04-03 12:31:21",
        "messages":[
          {
            "messageid":"mid00003",
            "userid":"uid00001",
            "rtype":"M",
            "datecreated":"2012-04-03 12:25:21",
            "message":"hello,
             this is example message"
          }
        ]
      },
      {
        "userid":"uid12346",
        "rtype":"M",
        "rstatus":"V",
        "datecreated":"2012-04-03 12:41:21",
        "datefinished":"2012-04-03 13:21:21",
        "messages":[
          {
            "messageid":"mid00004",
            "userid":"uid00001",
            "rtype":"M",
            "datecreated":"2012-04-03 18:21:21",
            "message":"hello,
             this is example message"
          },
          {
            "messageid":"mid00005",
            "userid":"uid00001",
            "rtype":"M",
            "datecreated":"2012-04-03 19:21:21",
            "message":"hello,
             this is example message"
          }
        ]
      }
    ]
  }
}


Create new message in conversation

Avaliable from application version: 2.8.2.1

Example call
  • General
  • PHP
POST
  http://example.com/api/conversations/[conversationid]/messages
Note: You must send parameters for this call as POST fields.
<?php
$ch = curl_init();
$curl_post_data = array(
        /* These are mandatory params */
        'message' => '...',
        'apikey' => '...',
        /* ...and these are optional */
        'useridentifier' => '...',
        'type' => '...',
        'mail_messsage_id' => '...',
        'do_not_send_mail' => '...',
        'is_html_message' => '...',
        'use_template' => '...',
        'attachments' => '...',
);
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/conversations/[conversationid]/messages");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curl_post_data);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[conversationid]textConversation ID (eg. 12ab34cd) or code (eg. ABC-DEFGH-123) or public url code (eg. m6uoFJd2e4I8Z18q)
messagetextMessage body (must be UTF-8)
apikeytextAPI key

Optional parameters

NameTypeDescription
useridentifiertextAgent identifier. Could be mail or userid. If not set, user "System" will be used.
typeconstlistMessage type. (Possible values: M - Message, N - Note)
mail_messsage_idtextMail message id. If specified, all reply emails which will have given mail message id in in-reply-to header will be assigned to this conversation.
do_not_send_mailconstlistDisables sending mail to customer. Can be used when mail was already sent by an external system (Possible values: Y - Yes, N - No)
is_html_messageconstlistSet this to Y is the message text is formatted in html (Possible values: Y - Yes, N - No)
use_templateconstlistUse department mail template and add message into mail template text. (Default Yes) (Possible values: Y - Yes, N - No)
attachmentstextMessage attachments. Comma separated file identifiers of files uploaded using files API. Example value: "3a1d0a821ea3a63594ba826efad0a379, 001908318230609832c2c07b7bac3658". Available from version 4.29


Note: When useridentifier is emtpy only notes are created - even when type="M"

Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":0
  }
}


Create new conversation

Avaliable from application version: 2.8.2.1

Example call
  • General
  • PHP
POST
  http://example.com/api/conversations
Note: You must send parameters for this call as POST fields.
<?php
$ch = curl_init();
$curl_post_data = array(
        /* These are mandatory params */
        'message' => '...',
        'useridentifier' => '...',
        'department' => '...',
        'subject' => '...',
        'recipient' => '...',
        'apikey' => '...',
        /* ...and these are optional */
        'recipient_name' => '...',
        'cc' => '...',
        'status' => '...',
        'mail_messsage_id' => '...',
        'do_not_send_mail' => '...',
        'use_template' => '...',
        'is_html_message' => '...',
        'customfields' => '...',
        'attachments' => '...',
);
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/conversations");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curl_post_data);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
messagetextMessage body
useridentifiertextTicket creator identifier - can be userid or email of an existing agent or visitor. It can not be email of a LiveAgent mail account.
departmenttextDepartment identifier - id of the department (not its name)
subjecttextMessage subject
recipienttextRecipient email. If useridentifier is visitor, recipient must be LiveAgent mail account. If useridentifier is agent, recipient must be visitor.
apikeytextAPI key

Optional parameters

NameTypeDescription
recipient_nametextRecipient name in format "Firstname Lastname"
cctextCC recipients emails separated by comma.
statusconstlistStatus of created conversation. If not set, conversation status will be "N" - new. (Possible values: A - Answered, P - Calling, T - Chatting, X - Deleted, B - Spam, I - Init, C - Open, R - Resolved, N - New, W - Postponed)
mail_messsage_idtextMail message id. If specified, all reply emails which will have given mail message id in in-reply-to header will be assigned to this conversation.
do_not_send_mailconstlistDisables sending a mail to customer. Can be used when mail was already sent by an external system (Possible values: Y - Yes, N - No)
use_templateconstlistUse department mail template and add message into mail template text. (Default Yes) (Possible values: Y - Yes, N - No)
is_html_messageconstlistSet this to Y is the message text is formatted in html (Possible values: Y - Yes, N - No)
customfieldsjsonSet custom field values. Json encoded array of custom fields. Example value: [{"code":"varsymbol","value":"43894209"},{"code":"another_field","value":"test value"}]
attachmentstextMessage attachments. Comma separated file identifiers of files uploaded using files API. Example value: "3a1d0a821ea3a63594ba826efad0a379, 001908318230609832c2c07b7bac3658". Available from version 4.29


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request
conversationidtextId of conversation
codetextCode of conversation
publicurlcodetextPublic URL code of conversation

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
 <conversationid>a1b2c3d4</conversationid>
 <code>ABC-DEFGH-123</code>
 <publicurlcode>bI5fR3oN40708G65</publicurlcode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":"0",
    "conversationid":"a1b2c3d4",
    "code":"ABC-DEFGH-123",
    "publicurlcode":"bI5fR3oN40708G65"
  }
}


Change status of the conversation

Avaliable from application version: 2.8.2.1

Example call
  • General
  • PHP
PUT
  http://example.com/api/conversations/[conversationid]/status
Note: You must send parameters for this call as PUT fields.
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/conversations/[conversationid]/status");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
$curl_put_data = array(
        /* These are mandatory params */
        'status' => '...',
        'apikey' => '...',
        /* ...and these are optional */
        'useridentifier' => '...',
        'note' => '...',
);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($curl_put_data));
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[conversationid]textConversation ID (eg. 12ab34cd) or code (eg. ABC-DEFGH-123) or public url code (eg. m6uoFJd2e4I8Z18q)
statusconstlistConversation status. (Possible values: A - Answered, R - Resolved, C - Open)
apikeytextAPI key

Optional parameters

NameTypeDescription
useridentifiertextAgent identifier. Could be mail or userid. If not set, user "System" will be used.
notetextNote


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":0
  }
}


Unassign a tag from a conversation

Avaliable from application version: 4.0.36.0

Example call
  • General
  • PHP
DELETE
  http://example.com/api/conversations/[conversationid]/tags
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/conversations/[conversationid]/tags");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
$curl_delete_data = array(
        /* These are mandatory params */
        'apikey' => '...',
        /* ...and these are optional */
        'id' => '...',
        'name' => '...',
);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($curl_delete_data));
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[conversationid]textConversation ID (eg. 12ab34cd) or code (eg. ABC-DEFGH-123) or public url code (eg. m6uoFJd2e4I8Z18q)
apikeytextAPI key

Optional parameters

NameTypeDescription
idtextIdentifier of the tag. Either id or name must be specified.
nametextName of the tag. Either id or name must be specified.


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":0
  }
}


Retrieve a list of tags assigned to a conversation

Avaliable from application version: 4.0.30.6

Example call
  • General
  • PHP
GET
  http://example.com/api/conversations/[conversationid]/tags
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/conversations/[conversationid]/tags?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[conversationid]textConversation ID (eg. 12ab34cd) or code (eg. ABC-DEFGH-123) or public url code (eg. m6uoFJd2e4I8Z18q)
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
tagslistThe list of tags assigned.
Field tags has 2 columns:
idtextThe identifier of the tag.
nametextName of the tag.

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <tags>
  <tag>
   <id>sh3j</id>
   <name>VIP</name>
  </tag>
  <tag>
   <id>8sd5</id>
   <name>Support</name>
  </tag>
 </tags>
</response>
{
  "response":{
    "tags":[
      {
        "id":"sh3j",
        "name":"VIP"
      },
      {
        "id":"8sd5",
        "name":"Support"
      }
    ]
  }
}


Assign tag to a conversation

Avaliable from application version: 4.0.30.6

Example call
  • General
  • PHP
POST
  http://example.com/api/conversations/[conversationid]/tags
Note: You must send parameters for this call as POST fields.
<?php
$ch = curl_init();
$curl_post_data = array(
        /* These are mandatory params */
        'apikey' => '...',
        /* ...and these are optional */
        'id' => '...',
        'name' => '...',
);
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/conversations/[conversationid]/tags");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curl_post_data);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[conversationid]textConversation ID (eg. 12ab34cd) or code (eg. ABC-DEFGH-123) or public url code (eg. m6uoFJd2e4I8Z18q)
apikeytextAPI key

Optional parameters

NameTypeDescription
idtextIdentifier of the tag.
nametextName of the tag.


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":0
  }
}



Customers


Delete custom field value in user contact

Avaliable from application version: 4.16.4.1

Example call
  • General
  • PHP
DELETE
  http://example.com/api/customers/[customeridentifier]/fields
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/customers/[customeridentifier]/fields");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
$curl_delete_data = array(
        /* These are mandatory params */
        'apikey' => '...',
        /* ...and these are optional */
        'code' => '...',
);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($curl_delete_data));
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[customeridentifier]textCustomer identifier (email or contactid)
apikeytextAPI key

Optional parameters

NameTypeDescription
codetextCustom field name to be deleted from contact. If not specified, all custom fields will be deleted from contact.


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":0
  }
}


Add custom field value to customer

Avaliable from application version: 4.16.4.1

Example call
  • General
  • PHP
POST
  http://example.com/api/customers/[customeridentifier]/fields
Note: You must send parameters for this call as POST fields.
<?php
$ch = curl_init();
$curl_post_data = array(
        /* These are mandatory params */
        'customfields' => '...',
        'apikey' => '...',
);
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/customers/[customeridentifier]/fields");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curl_post_data);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[customeridentifier]textCustomer identifier (email or contactid)
customfieldsjsonAdd custom field values (Same field can be added multiple times, if you need to update existing field value, delete it first). Json encoded array of custom fields. Example value: [{"code":"varsymbol","value":"43894209"},{"code":"another_field","value":"test value"}]
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":0
  }
}


Retrieves all customers

Avaliable from application version: 2.8.2.1

Example call
  • General
  • PHP
GET
  http://example.com/api/customers
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/customers?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
emailtextMatch email address like *string*
phonetextExact match of contacts with given phone.
facebooktextExact match of contacts with given Facebook user ID.
twittertextExact match of contacts with given Twitter handle.
weibotextExact match of contacts with given Weibo user ID.
tencenttextExact match of contacts with given Tencent user ID.
firstnametextMatch first name like *string*
lastnametextMatch last name like *string*
companyidtextReturn contacts by company ID [exact match].
datecreatedfromdatetimeLoad only customers created after this date (valid format: YYYY-MM-DD HH:MM:SS).
datecreatedtodatetimeLoad only customers created before this date (valid format: YYYY-MM-DD HH:MM:SS).
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number


Call response description

Return fields

NameTypeDescription
customerslistCustomers list
Field customers has 10 columns:
contactidtextId of customer contact
emailtextCustomer email
firstnametextCustomer first name
lastnametextCustomer last name
systemnametextCustomer system name
useridtextCustomer userid
datecreateddatetimeDate created
roleconstlistCustomer role (Possible values: V - Visitor, R - Registered visitor)
genderconstlistCustomer gender (Possible values: M - Male, F - Female)
companyidtextCompany id

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <customers>
  <customer>
   <contactid>cid00001</contactid>
   <email>john@example.com</email>
   <firstname>John</firstname>
   <lastname>Doe</lastname>
   <systemname>system001</systemname>
   <userid>uid00001</userid>
   <datecreated>2012-03-02 11:21:04</datecreated>
   <gender>M</gender>
   <companyid>d22537s9</companyid>
  </customer>
  <customer>
   <contactid>cid00002</contactid>
   <email>Janet@example.com</email>
   <firstname>Janet</firstname>
   <lastname>Doe</lastname>
   <systemname>system002</systemname>
   <userid>uid00002</userid>
   <datecreated>2013-05-02 10:23:02</datecreated>
   <gender>M</gender>
   <companyid>d11533s4</companyid>
  </customer>
 </customers>
</response>
{
  "response":{
    "customers":[
      {
        "contactid":"cid00001",
        "email":"john@example.com",
        "firstname":"John",
        "lastname":"Doe",
        "systemname":"system001",
        "userid":"uid00001",
        "datecreated":"2012-03-02 11:21:04",
        "gender":"M",
        "companyid":"d22537s9"
      },
      {
        "contactid":"cid00002",
        "email":"Janet@example.com",
        "firstname":"Janet",
        "lastname":"Doe",
        "systemname":"system002",
        "userid":"uid00002",
        "datecreated":"2013-05-02 10:23:02",
        "gender":"M",
        "companyid":"d11533s4"
      }
    ]
  }
}


Retrieves customer info

Avaliable from application version: 2.9.5.0

Example call
  • General
  • PHP
GET
  http://example.com/api/customers/[customeridentifier]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/customers/[customeridentifier]?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[customeridentifier]textCustomer identifier (email or contactid)
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
contactidtextId of customer contact
emailtextCustomer email
firstnametextCustomer first name
lastnametextCustomer last name
systemnametextCustomer system name
authtokentextCustomer browser cookie identification
browsercookienameconstlistCustomer browser cookie name (Possible values: V_auth - Registerd visitor cookie name, LaVisitorId - Not yet registered visitor cookie name)
roleconstlistCustomer role. (Possible values: V - Visitor, R - Registered visitor)
genderconstlistCustomer gender (Possible values: M - Male, F - Female)
companyidtextCompany id
useridtextCustomer userid
datecreateddatetimeDate created
notetextCustomer note
customfieldslistCustom field values
Field customfields has 2 columns:
codetextCustom field code.
valuetextCustom field value.
uniquefieldslistUnique customer identifiers
Field uniquefields has 2 columns:
codetextUnique field code.
valuetextUnique field value.

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <contactid>cid00001</contactid>
 <email>john@example.com</email>
 <firstname>John</firstname>
 <lastname>Doe</lastname>
 <systemname>system001</systemname>
 <authtoken>4fsd5f4s6f4s56f4s56f4s56f4sd56</authtoken>
 <browsercookiename>V_auth</browsercookiename>
 <role>V</role>
 <gender>M</gender>
 <companyid>d22537s9</companyid>
 <userid>uid00001</userid>
 <datecreated>2012-03-02 11:21:04</datecreated>
 <note/>
 <customfields>
  <customfield>
   <code>varsymbol</code>
   <value>423874698</value>
  </customfield>
  <customfield>
   <code>other_var</code>
   <value>Example value of custom field</value>
  </customfield>
 </customfields>
 <uniquefields>
  <uniquefield>
   <code>phone</code>
   <value>+1985457398709</value>
  </uniquefield>
  <uniquefield>
   <code>email</code>
   <value>john@example.com</value>
  </uniquefield>
  <uniquefield>
   <code>email</code>
   <value>john@example.com</value>
  </uniquefield>
 </uniquefields>
</response>
{
  "response":{
    "contactid":"cid00001",
    "email":"john@example.com",
    "firstname":"John",
    "lastname":"Doe",
    "systemname":"system001",
    "authtoken":"4fsd5f4s6f4s56f4s56f4s56f4sd56",
    "browsercookiename":"V_auth",
    "role":"V",
    "gender":"M",
    "companyid":"d22537s9",
    "userid":"uid00001",
    "datecreated":"2012-03-02 11:21:04",
    "note":null,
    "customfields":[
      {
        "code":"varsymbol",
        "value":"423874698"
      },
      {
        "code":"other_var",
        "value":"Example value of custom field"
      }
    ],
    "uniquefields":[
      {
        "code":"phone",
        "value":"+1985457398709"
      },
      {
        "code":"email",
        "value":"john@example.com"
      },
      {
        "code":"email",
        "value":"john@example.com"
      }
    ]
  }
}


Remove customer from group

Avaliable from application version: 2.9.5.0

Example call
  • General
  • PHP
DELETE
  http://example.com/api/customers/[customeridentifier]/groups?name=[value]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/customers/[customeridentifier]/groups");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
$curl_delete_data = array(
        /* These are mandatory params */
        'name' => '...',
        'apikey' => '...',
);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($curl_delete_data));
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[customeridentifier]textCustomer identifier (email or contactid)
nametextCustomer group name
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":0
  }
}


Retrieve customer groups

Avaliable from application version: 2.9.5.0

Example call
  • General
  • PHP
GET
  http://example.com/api/customers/[customeridentifier]/groups
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/customers/[customeridentifier]/groups?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[customeridentifier]textCustomer identifier (email or contactid)
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
groupslistList of all customer groups
Field groups has 2 columns:
groupidtextGroup id
groupnametextGroup name

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <groups>
  <group>
   <groupid>ag0h</groupid>
   <groupname>VIP</groupname>
  </group>
  <group>
   <groupid>2kt8</groupid>
   <groupname>Premium</groupname>
  </group>
 </groups>
</response>
{
  "response":{
    "groups":[
      {
        "groupid":"ag0h",
        "groupname":"VIP"
      },
      {
        "groupid":"2kt8",
        "groupname":"Premium"
      }
    ]
  }
}


Add customer to group

Avaliable from application version: 2.9.5.0

Example call
  • General
  • PHP
POST
  http://example.com/api/customers/[customeridentifier]/groups
Note: You must send parameters for this call as POST fields.
<?php
$ch = curl_init();
$curl_post_data = array(
        /* These are mandatory params */
        'name' => '...',
        'apikey' => '...',
);
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/customers/[customeridentifier]/groups");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curl_post_data);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[customeridentifier]textCustomer identifier (email or contactid)
nametextCustomer group name
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":0
  }
}


Register new customer

Avaliable from application version: 2.9.5.0

Example call
  • General
  • PHP
POST
  http://example.com/api/customers
Note: You must send parameters for this call as POST fields.
<?php
$ch = curl_init();
$curl_post_data = array(
        /* These are mandatory params */
        'apikey' => '...',
        /* ...and these are optional */
        'email' => '...',
        'phone' => '...',
        'name' => '...',
        'gender' => '...',
        'role' => '...',
        'password' => '...',
        'customfields' => '...',
        'uniquefields' => '...',
        'note' => '...',
        'send_registration_mail' => '...',
);
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/customers");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curl_post_data);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
emailtextCustomer email (email or phone or name is mandatory)
phonetextCustomer phone (email or phone or name is mandatory)
nametextCustomer name in format "Firstname Lastname"
genderconstlistGender (Possible values: M - Male, F - Female)
roleconstlistRole (Possible values: V - Visitor, R - Registered visitor)
passwordtextSets password for registerred visitor only. If empty, standard email notification is send to visitor with request to set his password.
customfieldsjsonSet custom field values. Json encoded array of custom fields.
Example value: [{"code":"varsymbol","value":"43894209"},{"code":"another_field","value":"test value"}]
uniquefieldsjsonSet additional unique field values. Json encoded array of unique fields. Supported field codes: email, phone, facebook, twitter, weibo, tencent.
Example value: [{"code":"phone","value":"+1800333444"},{"code":"phone","value":"+1800222222"},{"code":"email","value":"second@email.com"}]
notetextCustomer note
send_registration_mailconstlistSend registration email (Possible values: Y - Yes, N - No)


Call response description

Return fields

NameTypeDescription
contactidtextId of customer contact
emailtextCustomer email
firstnametextCustomer first name
lastnametextCustomer last name
systemnametextCustomer system name
authtokentextCustomer browser cookie identification
browsercookienameconstlistCustomer browser cookie name (Possible values: V_auth - Registerd visitor cookie name, LaVisitorId - Not yet registered visitor cookie name)
roleconstlistCustomer role. (Possible values: V - Visitor, R - Registered visitor)
genderconstlistCustomer gender (Possible values: M - Male, F - Female)
companyidtextCompany id
useridtextCustomer userid
datecreateddatetimeDate created
notetextCustomer note
customfieldslistCustom field values
Field customfields has 2 columns:
codetextCustom field code.
valuetextCustom field value.
uniquefieldslistUnique customer identifiers
Field uniquefields has 2 columns:
codetextUnique field code.
valuetextUnique field value.

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <contactid>cid00001</contactid>
 <email>john@example.com</email>
 <firstname>John</firstname>
 <lastname>Doe</lastname>
 <systemname>system001</systemname>
 <authtoken>4fsd5f4s6f4s56f4s56f4s56f4sd56</authtoken>
 <browsercookiename>V_auth</browsercookiename>
 <role>V</role>
 <gender>M</gender>
 <companyid>d22537s9</companyid>
 <userid>uid00001</userid>
 <datecreated>2012-03-02 11:21:04</datecreated>
 <note/>
 <customfields>
  <customfield>
   <code>varsymbol</code>
   <value>423874698</value>
  </customfield>
  <customfield>
   <code>other_var</code>
   <value>Example value of custom field</value>
  </customfield>
 </customfields>
 <uniquefields>
  <uniquefield>
   <code>phone</code>
   <value>+1985457398709</value>
  </uniquefield>
  <uniquefield>
   <code>email</code>
   <value>john@example.com</value>
  </uniquefield>
  <uniquefield>
   <code>email</code>
   <value>john@example.com</value>
  </uniquefield>
 </uniquefields>
</response>
{
  "response":{
    "contactid":"cid00001",
    "email":"john@example.com",
    "firstname":"John",
    "lastname":"Doe",
    "systemname":"system001",
    "authtoken":"4fsd5f4s6f4s56f4s56f4s56f4sd56",
    "browsercookiename":"V_auth",
    "role":"V",
    "gender":"M",
    "companyid":"d22537s9",
    "userid":"uid00001",
    "datecreated":"2012-03-02 11:21:04",
    "note":null,
    "customfields":[
      {
        "code":"varsymbol",
        "value":"423874698"
      },
      {
        "code":"other_var",
        "value":"Example value of custom field"
      }
    ],
    "uniquefields":[
      {
        "code":"phone",
        "value":"+1985457398709"
      },
      {
        "code":"email",
        "value":"john@example.com"
      },
      {
        "code":"email",
        "value":"john@example.com"
      }
    ]
  }
}



Customers groups


Delete customers group

Avaliable from application version: 4.17.1.3

Example call
  • General
  • PHP
DELETE
  http://example.com/api/customersgroups/[groupid]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/customersgroups/[groupid]");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
$curl_delete_data = array(
        /* These are mandatory params */
        'apikey' => '...',
);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($curl_delete_data));
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[groupid]textCustomers group ID
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":0
  }
}


Retrieve customers group info

Avaliable from application version: 4.17.1.3

Example call
  • General
  • PHP
GET
  http://example.com/api/customersgroups/[groupid]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/customersgroups/[groupid]?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[groupid]textCustomers group ID
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
idtextId of customers group
nametextName of the customers group
colortextColor for title
bg_colortextColor for background

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <id>sh3j</id>
 <name>VIP</name>
 <color>FFFFFF</color>
 <bg_color>0000FF</bg_color>
</response>
{
  "response":{
    "id":"sh3j",
    "name":"VIP",
    "color":"FFFFFF",
    "bg_color":"0000FF"
  }
}


Retrieve all groups of all customers

Avaliable from application version: 4.0.19.1

Example call
  • General
  • PHP
GET
  http://example.com/api/customersgroups
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/customersgroups?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
groupslistList all groups of all customers
Field groups has 2 columns:
idtextGroup id
nametextGroup name

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <groups>
  <group>
   <id>ag0h</id>
   <name>VIP</name>
  </group>
  <group>
   <id>2kt8</id>
   <name>Premium</name>
  </group>
 </groups>
</response>
{
  "response":{
    "groups":[
      {
        "id":"ag0h",
        "name":"VIP"
      },
      {
        "id":"2kt8",
        "name":"Premium"
      }
    ]
  }
}


Add customers group

Avaliable from application version: 4.17.1.3

Example call
  • General
  • PHP
POST
  http://example.com/api/customersgroups
Note: You must send parameters for this call as POST fields.
<?php
$ch = curl_init();
$curl_post_data = array(
        /* These are mandatory params */
        'name' => '...',
        'apikey' => '...',
        /* ...and these are optional */
        'color' => '...',
        'bg_color' => '...',
);
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/customersgroups");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curl_post_data);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
nametextName of the customers group
apikeytextAPI key

Optional parameters

NameTypeDescription
colortextColor for name
bg_colortextColor for background


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request
idtextId of tag
nametextName of tag
colortextColor for name
bg_colortextColor for background

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
 <id>sh3j</id>
 <name>VIP</name>
 <color>FFFFFF</color>
 <bg_color>0000FF</bg_color>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":"0",
    "id":"sh3j",
    "name":"VIP",
    "color":"FFFFFF",
    "bg_color":"0000FF"
  }
}


Change customers group

Avaliable from application version: 4.17.1.3

Example call
  • General
  • PHP
PUT
  http://example.com/api/customersgroups/[groupid]
Note: You must send parameters for this call as PUT fields.
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/customersgroups/[groupid]");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
$curl_put_data = array(
        /* These are mandatory params */
        'apikey' => '...',
        /* ...and these are optional */
        'name' => '...',
        'color' => '...',
        'bg_color' => '...',
);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($curl_put_data));
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[groupid]textCustomers group ID
apikeytextAPI key

Optional parameters

NameTypeDescription
nametextName of the customers group
colortextColor for name
bg_colortextColor for background


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":0
  }
}



Departments


Retrieve all agents statuses in departmnet

Avaliable from application version: 2.8.2.1
Avaliable examples: Wordpress widget example

Example call
  • General
  • PHP
GET
  http://example.com/api/departments/[departmentid]/agents
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/departments/[departmentid]/agents?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[departmentid]textDepartment ID
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
agentslistList of all agents in department
Field agents has 6 columns:
useridtextAgent userid
firstnametextAgent first name
lastnametextAgent last name
emailtextAgent email
onlinestatustextAgent online status in department. Combination of values T, P, M (T - chat, P - phone, M - automatic ticket solving)
presetstatustextAgent preset status in department - agent available status. Combination of values T, P, M (T - chat, P - phone, M - automatic ticket solving)

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <agents>
  <agent>
   <userid>ag0h45s</userid>
   <firstname>John</firstname>
   <lastname>Doe</lastname>
   <email>john@agent.com</email>
   <onlinestatus>M</onlinestatus>
   <presetstatus>M</presetstatus>
  </agent>
  <agent>
   <userid>bc0s45s</userid>
   <firstname>Any</firstname>
   <lastname>Johnason</lastname>
   <email>any@agent.com</email>
   <onlinestatus>M</onlinestatus>
   <presetstatus>M</presetstatus>
  </agent>
 </agents>
</response>
{
  "response":{
    "agents":[
      {
        "userid":"ag0h45s",
        "firstname":"John",
        "lastname":"Doe",
        "email":"john@agent.com",
        "onlinestatus":"M",
        "presetstatus":"M"
      },
      {
        "userid":"bc0s45s",
        "firstname":"Any",
        "lastname":"Johnason",
        "email":"any@agent.com",
        "onlinestatus":"M",
        "presetstatus":"M"
      }
    ]
  }
}


Retrieve list of departments

Avaliable from application version: 2.8.2.1
Avaliable examples: Wordpress widget example

Example call
  • General
  • PHP
GET
  http://example.com/api/departments
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/departments?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
departmentslistlist of all departments
Field departments has 6 columns:
departmentidtextid of the department
nametextName of the department
descriptiontextDepartment description
onlinestatustextOnline status of department - services online in department. Combination of values T, P, M (T - chat, P - phone, M - automatic ticket solving)
presetstatustextPreset status of department - services available in department. Combination of values T, P, M (T - chat, P - phone, M - automatic ticket solving)
deletedconstlistIf department was deleted (Possible values: Y - Yes, N - No)

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <departments>
  <department>
   <departmentid>d1s58gs4</departmentid>
   <name>Department 1</name>
   <description>This is first deaprtment</description>
   <onlinestatus>M</onlinestatus>
   <presetstatus>M</presetstatus>
   <deleted>N</deleted>
  </department>
  <department>
   <departmentid>d2s58gs4</departmentid>
   <name>Department 2</name>
   <description>This is second deaprtment</description>
   <onlinestatus>R</onlinestatus>
   <presetstatus>MRT</presetstatus>
   <deleted>N</deleted>
  </department>
 </departments>
</response>
{
  "response":{
    "departments":[
      {
        "departmentid":"d1s58gs4",
        "name":"Department 1",
        "description":"This is first deaprtment",
        "onlinestatus":"M",
        "presetstatus":"M",
        "deleted":"N"
      },
      {
        "departmentid":"d2s58gs4",
        "name":"Department 2",
        "description":"This is second deaprtment",
        "onlinestatus":"R",
        "presetstatus":"MRT",
        "deleted":"N"
      }
    ]
  }
}


Retrieve department info

Avaliable from application version: 2.8.2.1
Avaliable examples: Wordpress widget example

Example call
  • General
  • PHP
GET
  http://example.com/api/departments/[departmentid]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/departments/[departmentid]?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[departmentid]textDepartment ID
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
departmentidtextId of the department
nametextName of the department
descriptiontextDescription of the department
onlinestatustextDepartment online status - services online in department. Combination of values T, P, M (T - chat, P - phone, M - automatic ticket solving)
presetstatustextDepartment preset status - services available in department. Combination of values T, P, M (T - chat, P - phone, M - automatic ticket solving)
deletedconstlistIf department was deleted (Possible values: Y - Yes, N - No)

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <departmentid>e4y7g8s8</departmentid>
 <name>Support</name>
 <description>General support department</description>
 <onlinestatus>M</onlinestatus>
 <presetstatus>M</presetstatus>
 <deleted>N</deleted>
</response>
{
  "response":{
    "departmentid":"e4y7g8s8",
    "name":"Support",
    "description":"General support department",
    "onlinestatus":"M",
    "presetstatus":"M",
    "deleted":"N"
  }
}



Files


Retrieve file

Avaliable from application version: 4.25.2.4

Example call
  • General
  • PHP
GET
  http://example.com/api/files/[fileid]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/files/[fileid]?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[fileid]text
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
fileidtextFile identifier
createddatetimeFile creation date
filenametextFile name
filesizeintFile size (in bytes)
filetypetextFile MIME type (e.g. "image/jpeg" or "application/pdf")
downloadsintCount of file downloads
downloadUrltextUrl to download the file. Note: From version 4.47 to download the file, you have to add 'apikey' either as GET or POST parameter.

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <fileid>1234567890abcdef1234567890abcdef</fileid>
 <created>2017-06-02 06:08:21</created>
 <filename>image1.jpg</filename>
 <filesize>12456</filesize>
 <filetype>image/jpg</filetype>
 <downloads>5</downloads>
 <downloadUrl>//yourdomain.com/scripts/file.php?view=Y&amp;file=1234567890abcdef1234567890abcdef</downloadUrl>
</response>
{
  "response":{
    "fileid":"1234567890abcdef1234567890abcdef",
    "created":"2017-06-02 06:08:21",
    "filename":"image1.jpg",
    "filesize":"12456",
    "filetype":"image\/jpg",
    "downloads":"5",
    "downloadUrl":"\/\/yourdomain.com\/scripts\/file.php?view=Y&file=1234567890abcdef1234567890abcdef"
  }
}


Add file

Avaliable from application version: 4.25.2.4

Example call
  • General
  • PHP
POST
  http://example.com/api/files
Note: You must send parameters for this call as POST fields.
<?php
$ch = curl_init();
$curl_post_data = array(
        /* These are mandatory params */
        'apikey' => '...',
        /* ...and these are optional */
        'name' => '...',
        'type' => '...',
        'data' => '...',
        'downloadUrl' => '...',
);
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/files");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curl_post_data);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
nametextFile name
typetextFile type
datatextFile data, base64 encoded. If data is set, name and type must also be set, and downloadUrl is ignored.
downloadUrltextFile download URL, from where the API will download the file content. This parameter is used only if data is not set. Name and type are optional.


Note: Be aware that if file is not used (e.g. as a message attachment or in a contact widget, etc.), the file will be automatically deleted after 2 weeks.

Call response description

Return fields

NameTypeDescription
fileidtextFile identifier
createddatetimeFile creation date
filenametextFile name
filesizeintFile size (in bytes)
filetypetextFile MIME type (e.g. "image/jpeg" or "application/pdf")
downloadsintCount of file downloads
downloadUrltextUrl to download the file. Note: From version 4.47 to download the file, you have to add 'apikey' either as GET or POST parameter.

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <fileid>1234567890abcdef1234567890abcdef</fileid>
 <created>2017-06-02 06:08:21</created>
 <filename>image1.jpg</filename>
 <filesize>12456</filesize>
 <filetype>image/jpg</filetype>
 <downloads>5</downloads>
 <downloadUrl>//yourdomain.com/scripts/file.php?view=Y&amp;file=1234567890abcdef1234567890abcdef</downloadUrl>
</response>
{
  "response":{
    "fileid":"1234567890abcdef1234567890abcdef",
    "created":"2017-06-02 06:08:21",
    "filename":"image1.jpg",
    "filesize":"12456",
    "filetype":"image\/jpg",
    "downloads":"5",
    "downloadUrl":"\/\/yourdomain.com\/scripts\/file.php?view=Y&file=1234567890abcdef1234567890abcdef"
  }
}



Knowledgebase


Retrieve a list of all knowledgebase articles (deprecated)

Avaliable from application version: 4.16.3.2

Example call
  • General
  • PHP
GET
  http://example.com/api/knowledgebase/articles
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/knowledgebase/articles?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
kb_idtextKnowledgebase ID.
limitintLimit number of returned rows. Default value: 10, Max value: 500
offsetintReturn articles from defined row number. Default value 0.
tree_pathtextReturn just articles with tree path starting with selected value (e.g. if you need to return all sub-articles of specific category). Example value: 0|23|
parent_idtextReturn just articles with specific parent ID (e.g. if you need to return just first level of sub-articles of specific category). Example value: 288
article_idtextReturn just specific article with given ID. Example value: 288


Note: This API is deprecated. Please use GET Knowledgebase/Entries

Call response description

Return fields

NameTypeDescription
articleslistThe list of all knowledgebase articles.
Field articles has 22 columns:
kb_idtextKnowledge base ID.
kb_entry_idtextArticle ID.
parent_entry_idtextParent article ID.
rtypeconstlistArticle type. (Possible values: H - Home, C - Category, A - Article, Q - Forum, R - Topic, G - Suggestion category, S - Suggestion)
rstatusconstlistStatus. (Possible values: N - New, C - Completed, P - Published, D - Draft, R - Deleted, I - Init, U - Review, L - Planned, S - Started, X - Declined)
accessconstlistArticle access level. (Possible values: I - Internal, P - Public)
access_inheritedconstlistInherited access level. (Possible values: I - Internal, P - Public)
urlcodetextURL Code.
treepathtextTree path.
rorderintOrder.
titletextArticle Title.
metadescriptiontextHTML Meta description.
keywordstextHTML Meta Keywords.
contenthtmlArticle Content.
conversationidtextConversation ID.
departmentidtextDepartment ID.
viewsintNumber of views.
votesintNumber of votes.
datecreateddatetimeDate when was article created.
datechangeddatetimeDate of last change.
deletedconstlistIs article deleted? (Possible values: Y - Yes, N - No)
descriptiontextDescription.

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <articles>
  <article>
   <kb_entry_id>15</kb_entry_id>
   <parent_entry_id/>
   <rtype>C</rtype>
   <rstatus>P</rstatus>
   <access>P</access>
   <access_inherited>P</access_inherited>
   <urlcode>376829</urlcode>
   <treepath>0</treepath>
   <rorder>9</rorder>
   <title>General Questions</title>
   <metadescription>General Questions not related to Quality Unit products</metadescription>
   <keywords>faq, questions</keywords>
   <content>
    <![CDATA[Article content]]>
   </content>
   <conversationid/>
   <departmentid/>
   <views>1244</views>
   <votes>0</votes>
   <datecreated>2007-08-02 12:24:51</datecreated>
   <datechanged>2011-12-22 16:33:40</datechanged>
   <deleted>N</deleted>
   <description/>
  </article>
  <article>
   <kb_entry_id>132</kb_entry_id>
   <parent_entry_id/>
   <rtype>C</rtype>
   <rstatus>P</rstatus>
   <access>P</access>
   <access_inherited>P</access_inherited>
   <urlcode>376118</urlcode>
   <treepath>0</treepath>
   <rorder>10</rorder>
   <title>Another article</title>
   <metadescription/>
   <keywords>test article</keywords>
   <content>
    <![CDATA[This is test content that can contain html and because of that it is in construct]]>
   </content>
   <conversationid/>
   <departmentid/>
   <views>66</views>
   <votes>0</votes>
   <datecreated>2004-02-02 12:24:11</datecreated>
   <datechanged>2014-11-22 16:33:40</datechanged>
   <deleted>N</deleted>
   <description/>
  </article>
 </articles>
</response>
{
  "response":{
    "articles":[
      {
        "kb_entry_id":"15",
        "parent_entry_id":"",
        "rtype":"C",
        "rstatus":"P",
        "access":"P",
        "access_inherited":"P",
        "urlcode":"376829",
        "treepath":"0",
        "rorder":"9",
        "title":"General Questions",
        "metadescription":"General Questions not related to Quality Unit products",
        "keywords":"faq,
         questions",
        "content":"Article content",
        "conversationid":"",
        "departmentid":"",
        "views":"1244",
        "votes":"0",
        "datecreated":"2007-08-02 12:24:51",
        "datechanged":"2011-12-22 16:33:40",
        "deleted":"N",
        "description":""
      },
      {
        "kb_entry_id":"132",
        "parent_entry_id":"",
        "rtype":"C",
        "rstatus":"P",
        "access":"P",
        "access_inherited":"P",
        "urlcode":"376118",
        "treepath":"0",
        "rorder":"10",
        "title":"Another article",
        "metadescription":"",
        "keywords":"test article",
        "content":"This is test content that can contain html and because of that it is in construct",
        "conversationid":"",
        "departmentid":"",
        "views":"66",
        "votes":"0",
        "datecreated":"2004-02-02 12:24:11",
        "datechanged":"2014-11-22 16:33:40",
        "deleted":"N",
        "description":""
      }
    ]
  }
}


Add knowledgebase article

Avaliable from application version: 4.26.0.1

Example call
  • General
  • PHP
POST
  http://example.com/api/knowledgebase/articles
Note: You must send parameters for this call as POST fields.
<?php
$ch = curl_init();
$curl_post_data = array(
        /* These are mandatory params */
        'content' => '...',
        'title' => '...',
        'apikey' => '...',
        /* ...and these are optional */
        'kb_id' => '...',
        'parent_entry_id' => '...',
        'rstatus' => '...',
        'access' => '...',
        'rorder' => '...',
        'keywords' => '...',
        'full_preview' => '...',
);
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/knowledgebase/articles");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curl_post_data);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
contenttextArticle content HTML
titletextTitle
apikeytextAPI key

Optional parameters

NameTypeDescription
kb_idtextKnowledgebase identifier, default value: kb_defa
parent_entry_idtextParent category identifier
rstatusconstlistStatus (Possible values: P - Published, D - Draft)
accessconstlistAccess (Possible values: I - Internal, P - Public)
rorderintOrder of article within category
keywordstextKeywords
full_previewconstlistDisplay whole article in list of articles (Possible values: Y - Yes, N - No)


Call response description

Return fields

NameTypeDescription
kb_idtextKnowledgebase identifier
kb_entry_idtextKnowledgebase article identifier
parent_entry_idtextParent article identifier
urlcodetextURL Code
titletextArticle title
contenthtmlArticle content HTML
content_texttextArticle content converted to text
content_simple_htmlhtmlArticle content HTML with images removed
treepathtextTree path
rstatusconstlistStatus (Possible values: N - New, C - Completed, P - Published, D - Draft, R - Deleted, I - Init, U - Review, L - Planned, S - Started, X - Declined)
accessconstlistArticle access level (Possible values: I - Internal, P - Public)
access_inheritedconstlistInherited access level (Possible values: I - Internal, P - Public)
rorderintOrder of article within category
keywordstextHTML Meta Keywords
datecreateddatetimeDate when was article created
datechangeddatetimeDate of last change
viewsintNumber of views

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <kb_id>kb_defa</kb_id>
 <kb_entry_id>38</kb_entry_id>
 <parent_entry_id>16</parent_entry_id>
 <urlcode>376829</urlcode>
 <title>General Questions</title>
 <content>
  <![CDATA[Article <b>content</b>
  <img src="pix.gif">]]>
  </content>
   <content_text>Article content</content_text>
   <content_simple_html>
    <![CDATA[Article <b>content</b>]]>
   </content_simple_html>
   <treepath>0|7|16</treepath>
   <rstatus>P</rstatus>
   <access>P</access>
   <access_inherited>P</access_inherited>
   <rorder>0</rorder>
   <keywords>faq, questions</keywords>
   <datecreated>2015-08-02 12:24:51</datecreated>
   <datechanged>2015-10-22 16:33:40</datechanged>
   <views>1244</views>
  </response>
{
  "response":{
    "kb_id":"kb_defa",
    "kb_entry_id":"38",
    "parent_entry_id":"16",
    "urlcode":"376829",
    "title":"General Questions",
    "content":"Article <b>content<\/b><img src=\"pix.gif\">",
    "content_text":"Article content",
    "content_simple_html":"Article <b>content<\/b>",
    "treepath":"0|7|16",
    "rstatus":"P",
    "access":"P",
    "access_inherited":"P",
    "rorder":"0",
    "keywords":"faq,
     questions",
    "datecreated":"2015-08-02 12:24:51",
    "datechanged":"2015-10-22 16:33:40",
    "views":"1244"
  }
}


Change knowledgebase article

Avaliable from application version: 4.26.0.1

Example call
  • General
  • PHP
PUT
  http://example.com/api/knowledgebase/articles/[kb_entry_id]
Note: You must send parameters for this call as PUT fields.
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/knowledgebase/articles/[kb_entry_id]");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
$curl_put_data = array(
        /* These are mandatory params */
        'apikey' => '...',
        /* ...and these are optional */
        'kb_id' => '...',
        'parent_entry_id' => '...',
        'content' => '...',
        'title' => '...',
        'rstatus' => '...',
        'access' => '...',
        'rorder' => '...',
        'keywords' => '...',
        'full_preview' => '...',
);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($curl_put_data));
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[kb_entry_id]text
apikeytextAPI key

Optional parameters

NameTypeDescription
kb_idtextKnowledgebase identifier, default value: kb_defa
parent_entry_idtextParent category identifier
contenttextArticle content HTML
titletextTitle
rstatustextStatus
accesstextAccess
rorderintOrder of article within category
keywordstextKeywords
full_previewtextDisplay whole article in list of articles


Call response description

Return fields

NameTypeDescription
kb_idtextKnowledgebase identifier
kb_entry_idtextKnowledgebase article identifier
parent_entry_idtextParent article identifier
urlcodetextURL Code
titletextArticle title
contenthtmlArticle content HTML
content_texttextArticle content converted to text
content_simple_htmlhtmlArticle content HTML with images removed
treepathtextTree path
rstatusconstlistStatus (Possible values: N - New, C - Completed, P - Published, D - Draft, R - Deleted, I - Init, U - Review, L - Planned, S - Started, X - Declined)
accessconstlistArticle access level (Possible values: I - Internal, P - Public)
access_inheritedconstlistInherited access level (Possible values: I - Internal, P - Public)
rorderintOrder of article within category
keywordstextHTML Meta Keywords
datecreateddatetimeDate when was article created
datechangeddatetimeDate of last change
viewsintNumber of views

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <kb_id>kb_defa</kb_id>
 <kb_entry_id>38</kb_entry_id>
 <parent_entry_id>16</parent_entry_id>
 <urlcode>376829</urlcode>
 <title>General Questions</title>
 <content>
  <![CDATA[Article <b>content</b>
  <img src="pix.gif">]]>
  </content>
   <content_text>Article content</content_text>
   <content_simple_html>
    <![CDATA[Article <b>content</b>]]>
   </content_simple_html>
   <treepath>0|7|16</treepath>
   <rstatus>P</rstatus>
   <access>P</access>
   <access_inherited>P</access_inherited>
   <rorder>0</rorder>
   <keywords>faq, questions</keywords>
   <datecreated>2015-08-02 12:24:51</datecreated>
   <datechanged>2015-10-22 16:33:40</datechanged>
   <views>1244</views>
  </response>
{
  "response":{
    "kb_id":"kb_defa",
    "kb_entry_id":"38",
    "parent_entry_id":"16",
    "urlcode":"376829",
    "title":"General Questions",
    "content":"Article <b>content<\/b><img src=\"pix.gif\">",
    "content_text":"Article content",
    "content_simple_html":"Article <b>content<\/b>",
    "treepath":"0|7|16",
    "rstatus":"P",
    "access":"P",
    "access_inherited":"P",
    "rorder":"0",
    "keywords":"faq,
     questions",
    "datecreated":"2015-08-02 12:24:51",
    "datechanged":"2015-10-22 16:33:40",
    "views":"1244"
  }
}


Add knowledgebase category, suggestion category or forum

Avaliable from application version: 4.26.0.1

Example call
  • General
  • PHP
POST
  http://example.com/api/knowledgebase/categories
Note: You must send parameters for this call as POST fields.
<?php
$ch = curl_init();
$curl_post_data = array(
        /* These are mandatory params */
        'title' => '...',
        'apikey' => '...',
        /* ...and these are optional */
        'kb_id' => '...',
        'parent_entry_id' => '...',
        'rtype' => '...',
        'access' => '...',
        'rorder' => '...',
        'keywords' => '...',
        'departmentid' => '...',
        'description' => '...',
);
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/knowledgebase/categories");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curl_post_data);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
titletextTitle
apikeytextAPI key

Optional parameters

NameTypeDescription
kb_idtextKnowledgebase identifier, default value: kb_defa
parent_entry_idtextParent category identifier, default value: 0 (root category)
rtypeconstlistCategory type, default value: Category (Possible values: C - Category, Q - Forum, G - Suggestion category)
accessconstlistAccess, default value: Public (Possible values: I - Internal, P - Public)
rordertextOrder within category, new items are added at the top by default
keywordstextKeywords (used only for category)
departmentidtextDepartment identifier (used for forum and suggestion category, defines which department handles tickets from this category)
descriptiontextDescription (used for forum and suggestion category)


Call response description

Return fields

NameTypeDescription
kb_idtextKnowledgebase identifier
kb_entry_idtextKnowledgebase entry identifier
parent_entry_idtextParent category identifier
urlcodetextURL Code
titletextTitle
treepathtextTree path
rtypetextType of category
rstatusconstlistStatus (Possible values: N - New, C - Completed, P - Published, D - Draft, R - Deleted, I - Init, U - Review, L - Planned, S - Started, X - Declined)
accessconstlistAccess level (Possible values: I - Internal, P - Public)
access_inheritedconstlistInherited access level (Possible values: I - Internal, P - Public)
rorderintOrder within parent category
keywordstextHTML Meta Keywords
datecreateddatetimeDate when article was created
datechangeddatetimeDate of last change
departmentidtextDepartment identifier
viewsintNumber of views
descriptiontextDescription

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <kb_id>kb_defa</kb_id>
 <kb_entry_id>16</kb_entry_id>
 <parent_entry_id>7</parent_entry_id>
 <urlcode>365432</urlcode>
 <title>General Questions</title>
 <treepath>0|7</treepath>
 <rtype>C</rtype>
 <rstatus>P</rstatus>
 <access>P</access>
 <access_inherited>P</access_inherited>
 <rorder>0</rorder>
 <keywords>faq, questions</keywords>
 <datecreated>2007-08-02 12:24:51</datecreated>
 <datechanged>2011-12-22 16:33:40</datechanged>
 <departmentid>default</departmentid>
 <views>1244</views>
 <description>Category description</description>
</response>
{
  "response":{
    "kb_id":"kb_defa",
    "kb_entry_id":"16",
    "parent_entry_id":"7",
    "urlcode":"365432",
    "title":"General Questions",
    "treepath":"0|7",
    "rtype":"C",
    "rstatus":"P",
    "access":"P",
    "access_inherited":"P",
    "rorder":"0",
    "keywords":"faq,
     questions",
    "datecreated":"2007-08-02 12:24:51",
    "datechanged":"2011-12-22 16:33:40",
    "departmentid":"default",
    "views":"1244",
    "description":"Category description"
  }
}


Change knowledgebase category, suggestion category or forum

Avaliable from application version: 4.26.0.1

Example call
  • General
  • PHP
PUT
  http://example.com/api/knowledgebase/categories/[kb_entry_id]
Note: You must send parameters for this call as PUT fields.
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/knowledgebase/categories/[kb_entry_id]");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
$curl_put_data = array(
        /* These are mandatory params */
        'apikey' => '...',
        /* ...and these are optional */
        'kb_id' => '...',
        'parent_entry_id' => '...',
        'rtype' => '...',
        'access' => '...',
        'rorder' => '...',
        'title' => '...',
        'keywords' => '...',
        'departmentid' => '...',
        'description' => '...',
);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($curl_put_data));
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[kb_entry_id]text
apikeytextAPI key

Optional parameters

NameTypeDescription
kb_idtextKnowledgebase identifier, default value: kb_defa
parent_entry_idtextParent category identifier, default value: 0 (root category)
rtypetextCategory type, default value: Category
accesstextAccess, default value: Public
rordertextOrder within category, new items are added at the top by default
titletextTitle
keywordstextKeywords (used only for category)
departmentidtextDepartment identifier (used for forum and suggestion category, defines which department handles tickets from this category)
descriptiontextDescription (used for forum and suggestion category)


Call response description

Return fields

NameTypeDescription
kb_idtextKnowledgebase identifier
kb_entry_idtextKnowledgebase entry identifier
parent_entry_idtextParent category identifier
urlcodetextURL Code
titletextTitle
treepathtextTree path
rtypetextType of category
rstatusconstlistStatus (Possible values: N - New, C - Completed, P - Published, D - Draft, R - Deleted, I - Init, U - Review, L - Planned, S - Started, X - Declined)
accessconstlistAccess level (Possible values: I - Internal, P - Public)
access_inheritedconstlistInherited access level (Possible values: I - Internal, P - Public)
rorderintOrder within parent category
keywordstextHTML Meta Keywords
datecreateddatetimeDate when article was created
datechangeddatetimeDate of last change
departmentidtextDepartment identifier
viewsintNumber of views
descriptiontextDescription

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <kb_id>kb_defa</kb_id>
 <kb_entry_id>16</kb_entry_id>
 <parent_entry_id>7</parent_entry_id>
 <urlcode>365432</urlcode>
 <title>General Questions</title>
 <treepath>0|7</treepath>
 <rtype>C</rtype>
 <rstatus>P</rstatus>
 <access>P</access>
 <access_inherited>P</access_inherited>
 <rorder>0</rorder>
 <keywords>faq, questions</keywords>
 <datecreated>2007-08-02 12:24:51</datecreated>
 <datechanged>2011-12-22 16:33:40</datechanged>
 <departmentid>default</departmentid>
 <views>1244</views>
 <description>Category description</description>
</response>
{
  "response":{
    "kb_id":"kb_defa",
    "kb_entry_id":"16",
    "parent_entry_id":"7",
    "urlcode":"365432",
    "title":"General Questions",
    "treepath":"0|7",
    "rtype":"C",
    "rstatus":"P",
    "access":"P",
    "access_inherited":"P",
    "rorder":"0",
    "keywords":"faq,
     questions",
    "datecreated":"2007-08-02 12:24:51",
    "datechanged":"2011-12-22 16:33:40",
    "departmentid":"default",
    "views":"1244",
    "description":"Category description"
  }
}


Remove knowledgebase entry

Avaliable from application version: 4.26.0.1

Example call
  • General
  • PHP
DELETE
  http://example.com/api/knowledgebase/entries/[entry_id]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/knowledgebase/entries/[entry_id]");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
$curl_delete_data = array(
        /* These are mandatory params */
        'apikey' => '...',
);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($curl_delete_data));
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[entry_id]textKnowledgebase entry ID
apikeytextAPI key


Note: Be aware that if the knowledgebase entry being deleted is a category, forum or suggestion category, this API call will delete the entry and all child entries under it (the entire subtree). This action can not be undone.

Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":0
  }
}


Retrieve a list of all knowledgebase entries

Avaliable from application version: 4.26.0.1

Example call
  • General
  • PHP
GET
  http://example.com/api/knowledgebase/entries
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/knowledgebase/entries?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
limitintLimit number of returned rows. Default value: 50, Max value: 500
offsetintReturn articles from defined row number. Default value 0
kb_idtextKnowledgebase identifier
tree_pathtextReturn just entries with tree path starting with selected value (e.g. if you need to return all sub-entries of specific category). Example value: 0|23|
parent_entry_idtextReturn just entries with specific parent ID (e.g. if you need to return just first level of sub-entries of specific category). Example value: 288
entry_idtextReturn just specific entry with given ID. Example value: 288


Call response description

Return fields

NameTypeDescription
entrieslistThe list of all knowledgebase entries
Field entries has 22 columns:
kb_idtextKnowledgebase identifier
kb_entry_idtextKnowledgebase entry identifier
parent_entry_idtextParent category identifier
rtypeconstlistKnowledgebase entry type (Possible values: H - Home, C - Category, A - Article, Q - Forum, R - Topic, G - Suggestion category, S - Suggestion)
rstatusconstlistStatus (Possible values: N - New, C - Completed, P - Published, D - Draft, R - Deleted, I - Init, U - Review, L - Planned, S - Started, X - Declined)
accessconstlistKnowledgebase entry access level (Possible values: I - Internal, P - Public)
access_inheritedconstlistInherited access level (Possible values: I - Internal, P - Public)
urlcodetextURL Code
treepathtextTree path
rorderintOrder within parent category
titletextKnowledgebase entry title
metadescriptiontextHTML Meta description
keywordstextHTML Meta Keywords
contenttextArticle content
conversationidtextRelated ticket identifier
departmentidtextDepartment identifier
viewsintNumber of views
votesintNumber of votes
datecreateddatetimeDate when entry was created
datechangeddatetimeDate of last change
deletedconstlistWas the entry deleted? (suggestion and topic only) (Possible values: Y - Yes, N - No)
descriptiontextDescription

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <entries>
  <entrie>
   <kb_id>kb_defa</kb_id>
   <kb_entry_id>16</kb_entry_id>
   <parent_entry_id>7</parent_entry_id>
   <rtype>C</rtype>
   <rstatus>P</rstatus>
   <access>P</access>
   <access_inherited>P</access_inherited>
   <urlcode>365432</urlcode>
   <treepath>0|7</treepath>
   <rorder>0</rorder>
   <title>General Questions Category</title>
   <metadescription>General Questions about life, universe and everything</metadescription>
   <keywords>faq, questions</keywords>
   <content/>
   <conversationid/>
   <departmentid/>
   <views>1244</views>
   <votes>0</votes>
   <datecreated>2007-08-02 12:24:51</datecreated>
   <datechanged>2011-12-22 16:33:40</datechanged>
   <deleted>N</deleted>
   <description>Description of category</description>
  </entrie>
  <entrie>
   <kb_id>kb_defa</kb_id>
   <kb_entry_id>38</kb_entry_id>
   <parent_entry_id>16</parent_entry_id>
   <rtype>A</rtype>
   <rstatus>P</rstatus>
   <access>P</access>
   <access_inherited>P</access_inherited>
   <urlcode>376829</urlcode>
   <treepath>0|7|16</treepath>
   <rorder>0</rorder>
   <title>Article 42</title>
   <metadescription/>
   <keywords>test article</keywords>
   <content>This is test content that can contain &lt;b&gt;html&lt;/b&gt; and images &lt;img src="pix.gif"&gt;</content>
   <conversationid/>
   <departmentid/>
   <views>66</views>
   <votes>0</votes>
   <datecreated>2004-02-02 12:24:11</datecreated>
   <datechanged>2014-11-22 16:33:40</datechanged>
   <deleted>N</deleted>
   <description/>
  </entrie>
 </entries>
</response>
{
  "response":{
    "entries":[
      {
        "kb_id":"kb_defa",
        "kb_entry_id":"16",
        "parent_entry_id":"7",
        "rtype":"C",
        "rstatus":"P",
        "access":"P",
        "access_inherited":"P",
        "urlcode":"365432",
        "treepath":"0|7",
        "rorder":"0",
        "title":"General Questions Category",
        "metadescription":"General Questions about life,
         universe and everything",
        "keywords":"faq,
         questions",
        "content":"",
        "conversationid":"",
        "departmentid":"",
        "views":"1244",
        "votes":"0",
        "datecreated":"2007-08-02 12:24:51",
        "datechanged":"2011-12-22 16:33:40",
        "deleted":"N",
        "description":"Description of category"
      },
      {
        "kb_id":"kb_defa",
        "kb_entry_id":"38",
        "parent_entry_id":"16",
        "rtype":"A",
        "rstatus":"P",
        "access":"P",
        "access_inherited":"P",
        "urlcode":"376829",
        "treepath":"0|7|16",
        "rorder":"0",
        "title":"Article 42",
        "metadescription":"",
        "keywords":"test article",
        "content":"This is test content that can contain <b>html<\/b> and images <img src=\"pix.gif\">",
        "conversationid":"",
        "departmentid":"",
        "views":"66",
        "votes":"0",
        "datecreated":"2004-02-02 12:24:11",
        "datechanged":"2014-11-22 16:33:40",
        "deleted":"N",
        "description":""
      }
    ]
  }
}


Retrieve a list of all knowledgebases

Avaliable from application version: 4.26.0.1

Example call
  • General
  • PHP
GET
  http://example.com/api/knowledgebase/knowledgebases
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/knowledgebase/knowledgebases?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
limitintLimit number of returned rows. Default value: 10, Max value: 500
offsetintReturn rows from defined row number. Default value 0.


Call response description

Return fields

NameTypeDescription
knowledgebaseslistKnowledgebases list.
Field knowledgebases has 2 columns:
kb_idtextKnowledgebase identifier
nametextKnowledgebase name

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <knowledgebases>
  <knowledgebase>
   <kb_id>kb_defa</kb_id>
   <name>Knowledgebase 1</name>
  </knowledgebase>
  <knowledgebase>
   <kb_id>ec4d78df</kb_id>
   <name>Knowledgebase 2</name>
  </knowledgebase>
 </knowledgebases>
</response>
{
  "response":{
    "knowledgebases":[
      {
        "kb_id":"kb_defa",
        "name":"Knowledgebase 1"
      },
      {
        "kb_id":"ec4d78df",
        "name":"Knowledgebase 2"
      }
    ]
  }
}


Knowledgebase search

Avaliable from application version: 4.7.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/knowledgebase/search?query=[value]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/knowledgebase/search?&query=value&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
querytextQuery string
apikeytextAPI key

Optional parameters

NameTypeDescription
kb_idtextKnowledgebase ID
top_article_idtextTop article ID. Search will start from given ID and if it is a category, all subcategories will be searched. Leave empty if all articles should be searched.
limitintLimit number of returned rows. Default value: 10, Max value: 500


Call response description

Return fields

NameTypeDescription
entrieslistThe search list of all knowledgebase entries.
Field entries has 16 columns:
kb_idtextKnowledgebase ID
kb_entry_idtextEntry ID
rtypeconstlistEntry type (Possible values: H - Home, C - Category, A - Article, Q - Forum, R - Topic, G - Suggestion category, S - Suggestion)
rstatusconstlistStatus (Possible values: N - New, C - Completed, P - Published, D - Draft, R - Deleted, I - Init, U - Review, L - Planned, S - Started, X - Declined)
accessconstlistEntry access level (Possible values: I - Internal, P - Public)
access_inheritedconstlistInherited access level (Possible values: I - Internal, P - Public)
urlcodetextURL Code
treepathtextTree path
titletextTitle
title_cleartextTitle clear
content_texttextEntry content (text)
content_simple_htmlhtmlEntry content (html)
conversationidtextConversation ID
votesCountintNumber of votes
datechangeddatetimeDate of last change
urltextEntry Url

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <entries>
  <entrie>
   <kb_id>kb_defa</kb_id>
   <kb_entry_id>1</kb_entry_id>
   <rtype>A</rtype>
   <rstatus>P</rstatus>
   <access>P</access>
   <access_inherited>P</access_inherited>
   <urlcode>376829</urlcode>
   <treepath>0</treepath>
   <title>Article 1</title>
   <title_clear>Article 1</title_clear>
   <content_text>Article content</content_text>
   <content_simple_html>
    <![CDATA[Article content]]>
   </content_simple_html>
   <conversationid/>
   <votesCount>0</votesCount>
   <datechanged>2011-12-22 16:33:40</datechanged>
   <url>//support.example.com/376829-Article-1</url>
  </entrie>
  <entrie>
   <kb_id>kb_defa</kb_id>
   <kb_entry_id>2</kb_entry_id>
   <rtype>A</rtype>
   <rstatus>P</rstatus>
   <access>P</access>
   <access_inherited>P</access_inherited>
   <urlcode>376832</urlcode>
   <treepath>0</treepath>
   <title>Article 2</title>
   <title_clear>Article 2</title_clear>
   <content_text>Article content</content_text>
   <content_simple_html>
    <![CDATA[Article content]]>
   </content_simple_html>
   <conversationid/>
   <votesCount>0</votesCount>
   <datechanged>2011-12-05 16:33:40</datechanged>
   <url>//support.example.com/376832-Article-2</url>
  </entrie>
 </entries>
</response>
{
  "response":{
    "entries":[
      {
        "kb_id":"kb_defa",
        "kb_entry_id":"1",
        "rtype":"A",
        "rstatus":"P",
        "access":"P",
        "access_inherited":"P",
        "urlcode":"376829",
        "treepath":"0",
        "title":"Article 1",
        "title_clear":"Article 1",
        "content_text":"Article content",
        "content_simple_html":"Article content",
        "conversationid":"",
        "votesCount":"0",
        "datechanged":"2011-12-22 16:33:40",
        "url":"\/\/support.example.com\/376829-Article-1"
      },
      {
        "kb_id":"kb_defa",
        "kb_entry_id":"2",
        "rtype":"A",
        "rstatus":"P",
        "access":"P",
        "access_inherited":"P",
        "urlcode":"376832",
        "treepath":"0",
        "title":"Article 2",
        "title_clear":"Article 2",
        "content_text":"Article content",
        "content_simple_html":"Article content",
        "conversationid":"",
        "votesCount":"0",
        "datechanged":"2011-12-05 16:33:40",
        "url":"\/\/support.example.com\/376832-Article-2"
      }
    ]
  }
}



Online status


Agents

Avaliable from application version: 4.17.1.3

Example call
  • General
  • PHP
GET
  http://example.com/api/onlinestatus/agents
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/onlinestatus/agents?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
agentsOnlineStateslistOnline state of agents
Field agentsOnlineStates has 8 columns:
idtextUser id of agent
contactidtextContact id of agent
usernametextAgent's username (email)
firstnameintAgent's first name
lastnameintAgent's last name
avatar_urlintAgent's avatar url
presetStatusintAgent's preset online status (string consisting of: M-messages, P-phone, T-chat, R-read or F-offline)
onlineStatusintAgent's current online status (string consisting of: M-messages, P-phone, T-chat, R-read or F-offline)

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <agentsOnlineStates>
  <agentsOnlineState>
   <id>56df98rt</id>
   <contactid>46c8f67a</contactid>
   <username>john.doe@example.com</username>
   <firstname>John</firstname>
   <lastname>Doe</lastname>
   <avatar_url>themes/agent/_common_templates/img/user05.png</avatar_url>
   <presetStatus>MPRT</presetStatus>
   <onlineStatus>MPRT</onlineStatus>
  </agentsOnlineState>
 </agentsOnlineStates>
</response>
{
  "response":{
    "agentsOnlineStates":[
      {
        "id":"56df98rt",
        "contactid":"46c8f67a",
        "username":"john.doe@example.com",
        "firstname":"John",
        "lastname":"Doe",
        "avatar_url":"themes\/agent\/_common_templates\/img\/user05.png",
        "presetStatus":"MPRT",
        "onlineStatus":"MPRT"
      }
    ]
  }
}


Departments

Avaliable from application version: 4.17.1.3

Example call
  • General
  • PHP
GET
  http://example.com/api/onlinestatus/departments
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/onlinestatus/departments?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
departmentsOnlineStateslistOnline state of departments
Field departmentsOnlineStates has 9 columns:
idintIdentifier of department
nameintName of department
onlineStatusintCurrent online status of department (string consisting of: M-messages, P-phone, T-chat, R-read or F-offline)
presetStatusintPreset online status of department (string consisting of: M-messages, P-phone, T-chat, R-read or F-offline)
chat_countintNumber of running chats in department
new_countintNumber of tickets in New state in department
customer_reply_countintNumber of customer replies in department
total_countintTotal number of new, open and chatting tickets in department
max_countintMaximum number of new, open and chatting tickets in any of departments

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <departmentsOnlineStates>
  <departmentsOnlineState>
   <id>8750f3cd</id>
   <name>Technical</name>
   <onlineStatus>F</onlineStatus>
   <presetStatus>MPRT</presetStatus>
   <chat_count>2</chat_count>
   <new_count>7</new_count>
   <customer_reply_count>11</customer_reply_count>
   <total_count>1587</total_count>
   <max_count>1587</max_count>
  </departmentsOnlineState>
 </departmentsOnlineStates>
</response>
{
  "response":{
    "departmentsOnlineStates":[
      {
        "id":"8750f3cd",
        "name":"Technical",
        "onlineStatus":"F",
        "presetStatus":"MPRT",
        "chat_count":"2",
        "new_count":"7",
        "customer_reply_count":"11",
        "total_count":"1587",
        "max_count":"1587"
      }
    ]
  }
}



Reports


Agents report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/agents?date_from=[value]&date_to=[value]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/agents?&date_from=value&date_to=value&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
apikeytextAPI key

Optional parameters

NameTypeDescription
columnstextColumns (comma delimeted) to be returned (see return fields)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number


Call response description

Return fields

NameTypeDescription
agentslistAgents list
Field agents has 35 columns:
idtextUser identifier
contactidtextUser contact identifier
firstnametextFirst name
lastnametextLast name
worktimeintWorktime in minutes
answersintNumber of answers
answers_phtextNumber of answers per hour
newAnswerAvgTimeintNew answer average time (in seconds)
newAnswerAvgTimeSlaintNew answer average time (in seconds) within SLA business hours
nextAnswerAvgTimeintOpen answer average time (in seconds)
nextAnswerAvgTimeSlaintOpen answer average time (in seconds) within SLA business hours
callsintNumber of answered calls
calls_phtextNumber of answered calls per hour
missed_callsintNumber of missed calls
missed_calls_phtextNumber of missed calls per hour
call_secondsintCall time total (in seconds)
call_seconds_phtextCall time total (in seconds) per hour
chatsintNumber of responded chats
chats_phtextNumber of responded chats per hour
chat_answersintNumber of chat messages
chat_answers_phtextNumber of chat messages per hour
missed_chatsintNumber of missed chats
missed_chats_phtextNumber of missed chats per hour
chat_pickupintNumber of picked up chats
chatPickupAvgTimeintChat pickup average time (in seconds)
chatAvgTimeintAverage time spent in chat (in seconds)
not_rankedintNumber of not ranked
not_ranked_ptextNot ranked [%]
not_ranked_phtextNumber of not ranked per hour
rewardsintNumber of rewards
rewards_ptextRewards [%]
rewards_phtextNumber of rewards per hour
punishmentsintNumber of rebukes
punishments_ptextRebukes [%]
punishments_phtextNumber of rebukes per hour

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <agents>
  <agent>
   <id>hji78r9u</id>
   <contactid>456edf8y</contactid>
   <firstname>Firstname</firstname>
   <lastname>Lastname</lastname>
   <worktime>60</worktime>
   <answers>0</answers>
   <answers_ph>0.00</answers_ph>
   <newAnswerAvgTime>0</newAnswerAvgTime>
   <newAnswerAvgTimeSla>0</newAnswerAvgTimeSla>
   <nextAnswerAvgTime>0</nextAnswerAvgTime>
   <nextAnswerAvgTimeSla>0</nextAnswerAvgTimeSla>
   <calls>0</calls>
   <calls_ph>0.00</calls_ph>
   <missed_calls>0</missed_calls>
   <missed_calls_ph>0.00</missed_calls_ph>
   <call_seconds>0</call_seconds>
   <call_seconds_ph>0.00</call_seconds_ph>
   <chats>0</chats>
   <chats_ph>0.00</chats_ph>
   <chat_answers>0</chat_answers>
   <chat_answers_ph>0.00</chat_answers_ph>
   <missed_chats>0</missed_chats>
   <missed_chats_ph>0.00</missed_chats_ph>
   <chat_pickup>0</chat_pickup>
   <chatPickupAvgTime>0</chatPickupAvgTime>
   <chatAvgTime>0</chatAvgTime>
   <not_ranked>0</not_ranked>
   <not_ranked_p>0.00</not_ranked_p>
   <not_ranked_ph>0.00</not_ranked_ph>
   <rewards>0</rewards>
   <rewards_p>0.00</rewards_p>
   <rewards_ph>0.00</rewards_ph>
   <punishments>0</punishments>
   <punishments_p>0.00</punishments_p>
   <punishments_ph>0.00</punishments_ph>
  </agent>
 </agents>
</response>
{
  "response":{
    "agents":[
      {
        "id":"hji78r9u",
        "contactid":"456edf8y",
        "firstname":"Firstname",
        "lastname":"Lastname",
        "worktime":"60",
        "answers":"0",
        "answers_ph":"0.00",
        "newAnswerAvgTime":"0",
        "newAnswerAvgTimeSla":"0",
        "nextAnswerAvgTime":"0",
        "nextAnswerAvgTimeSla":"0",
        "calls":"0",
        "calls_ph":"0.00",
        "missed_calls":"0",
        "missed_calls_ph":"0.00",
        "call_seconds":"0",
        "call_seconds_ph":"0.00",
        "chats":"0",
        "chats_ph":"0.00",
        "chat_answers":"0",
        "chat_answers_ph":"0.00",
        "missed_chats":"0",
        "missed_chats_ph":"0.00",
        "chat_pickup":"0",
        "chatPickupAvgTime":"0",
        "chatAvgTime":"0",
        "not_ranked":"0",
        "not_ranked_p":"0.00",
        "not_ranked_ph":"0.00",
        "rewards":"0",
        "rewards_p":"0.00",
        "rewards_ph":"0.00",
        "punishments":"0",
        "punishments_p":"0.00",
        "punishments_ph":"0.00"
      }
    ]
  }
}


Channels report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/channels?date_from=[value]&date_to=[value]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/channels?&date_from=value&date_to=value&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
apikeytextAPI key

Optional parameters

NameTypeDescription
columnstextColumns (comma delimeted) to be returned (see return fields)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number


Call response description

Return fields

NameTypeDescription
channelslistChannels list
Field channels has 29 columns:
idtextChannel identifier
channelNametextChannel name
answersintNumber of answers
newAnswerAvgTimeintNew answer average time (in seconds)
newAnswerAvgTimeSlaintNew answer average time (in seconds) within SLA business hours
nextAnswerAvgTimeintOpen answer average time (in seconds)
nextAnswerAvgTimeSlaintOpen answer average time (in seconds) within SLA business hours
chat_answersintNumber of chat messages
chatsintNumber of responded chats
missed_chatsintNumber of missed chats
chat_pickupintNumber of picked up chats
chatPickupAvgTimeintChat pickup average time (in seconds)
chatAvgTimeintAverage time spent in chat (in seconds)
callsintNumber of answered calls
missed_callsintNumber of missed calls
call_secondsintCall time total (in seconds)
not_rankedintNumber of not ranked
not_ranked_ptextNot ranked [%]
rewardsintNumber of rewards
rewards_ptextRewards [%]
punishmentsintNumber of rebukes
punishments_ptextRebukes [%]
i_messagesintNumber of incoming messages
i_chatsintNumber of incomming chats (including not responded)
i_callsintNumber of incoming calls (including not answered)
f_chatsintNumber of finished chats
f_callsintNumber of finished calls
created_ticketsintNumber of tickets
resolved_ticketsintNumber of resolved tickets

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <channels>
  <channel>
   <id>2</id>
   <channelName>Facebook</channelName>
   <answers>0</answers>
   <newAnswerAvgTime>0</newAnswerAvgTime>
   <newAnswerAvgTimeSla>0</newAnswerAvgTimeSla>
   <nextAnswerAvgTime>0</nextAnswerAvgTime>
   <nextAnswerAvgTimeSla>0</nextAnswerAvgTimeSla>
   <chat_answers>0</chat_answers>
   <chats>0</chats>
   <missed_chats>0</missed_chats>
   <chat_pickup>0</chat_pickup>
   <chatPickupAvgTime>0</chatPickupAvgTime>
   <chatAvgTime>0</chatAvgTime>
   <calls>0</calls>
   <missed_calls>0</missed_calls>
   <call_seconds>0</call_seconds>
   <not_ranked>0</not_ranked>
   <not_ranked_p>0.00</not_ranked_p>
   <rewards>0</rewards>
   <rewards_p>0.00</rewards_p>
   <punishments>0</punishments>
   <punishments_p>0.00</punishments_p>
   <i_messages>0</i_messages>
   <i_chats>0</i_chats>
   <i_calls>0</i_calls>
  </channel>
 </channels>
</response>
{
  "response":{
    "channels":[
      {
        "id":"2",
        "channelName":"Facebook",
        "answers":"0",
        "newAnswerAvgTime":"0",
        "newAnswerAvgTimeSla":"0",
        "nextAnswerAvgTime":"0",
        "nextAnswerAvgTimeSla":"0",
        "chat_answers":"0",
        "chats":"0",
        "missed_chats":"0",
        "chat_pickup":"0",
        "chatPickupAvgTime":"0",
        "chatAvgTime":"0",
        "calls":"0",
        "missed_calls":"0",
        "call_seconds":"0",
        "not_ranked":"0",
        "not_ranked_p":"0.00",
        "rewards":"0",
        "rewards_p":"0.00",
        "punishments":"0",
        "punishments_p":"0.00",
        "i_messages":"0",
        "i_chats":"0",
        "i_calls":"0"
      }
    ]
  }
}


Departments report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/departments?date_from=[value]&date_to=[value]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/departments?&date_from=value&date_to=value&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
apikeytextAPI key

Optional parameters

NameTypeDescription
columnstextColumns (comma delimeted) to be returned (see return fields)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number


Call response description

Return fields

NameTypeDescription
departmentslistDepartments list
Field departments has 29 columns:
idtextDepartment identifier
departmentNametextDepartment name
answersintNumber of answers
newAnswerAvgTimeintNew answer average time (in seconds)
newAnswerAvgTimeSlaintNew answer average time (in seconds) within SLA business hours
nextAnswerAvgTimeintOpen answer average time (in seconds)
nextAnswerAvgTimeSlaintOpen answer average time (in seconds) within SLA business hours
chat_answersintNumber of chat messages
chatsintNumber of responded chats
missed_chatsintNumber of missed chats
chat_pickupintNumber of picked up chats
chatPickupAvgTimeintChat pickup average time (in seconds)
chatAvgTimeintAverage time spent in chat (in seconds)
callsintNumber of answered calls
missed_callsintNumber of missed calls
call_secondsintCall time total (in seconds)
not_rankedintNumber of not ranked
not_ranked_ptextNot ranked [%]
rewardsintNumber of rewards
rewards_ptextRewards [%]
punishmentsintNumber of rebukes
punishments_ptextRebukes [%]
i_messagesintNumber of incoming messages
i_chatsintNumber of incomming chats (including not responded)
i_callsintNumber of incoming calls (including not answered)
f_chatsintNumber of finished chats
f_callsintNumber of finished calls
created_ticketsintNumber of tickets
resolved_ticketsintNumber of resolved tickets

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <departments>
  <department>
   <id>1234asdf</id>
   <departmentName>General</departmentName>
   <answers>0</answers>
   <newAnswerAvgTime>0</newAnswerAvgTime>
   <newAnswerAvgTimeSla>0</newAnswerAvgTimeSla>
   <nextAnswerAvgTime>0</nextAnswerAvgTime>
   <nextAnswerAvgTimeSla>0</nextAnswerAvgTimeSla>
   <chat_answers>0</chat_answers>
   <chats>0</chats>
   <missed_chats>0</missed_chats>
   <chat_pickup>0</chat_pickup>
   <chatPickupAvgTime>0</chatPickupAvgTime>
   <chatAvgTime>0</chatAvgTime>
   <calls>0</calls>
   <missed_calls>0</missed_calls>
   <call_seconds>0</call_seconds>
   <not_ranked>0</not_ranked>
   <not_ranked_p>0.00</not_ranked_p>
   <rewards>0</rewards>
   <rewards_p>0.00</rewards_p>
   <punishments>0</punishments>
   <punishments_p>0.00</punishments_p>
   <i_messages>0</i_messages>
   <i_chats>0</i_chats>
   <i_calls>0</i_calls>
  </department>
 </departments>
</response>
{
  "response":{
    "departments":[
      {
        "id":"1234asdf",
        "departmentName":"General",
        "answers":"0",
        "newAnswerAvgTime":"0",
        "newAnswerAvgTimeSla":"0",
        "nextAnswerAvgTime":"0",
        "nextAnswerAvgTimeSla":"0",
        "chat_answers":"0",
        "chats":"0",
        "missed_chats":"0",
        "chat_pickup":"0",
        "chatPickupAvgTime":"0",
        "chatAvgTime":"0",
        "calls":"0",
        "missed_calls":"0",
        "call_seconds":"0",
        "not_ranked":"0",
        "not_ranked_p":"0.00",
        "rewards":"0",
        "rewards_p":"0.00",
        "punishments":"0",
        "punishments_p":"0.00",
        "i_messages":"0",
        "i_chats":"0",
        "i_calls":"0"
      }
    ]
  }
}


Performance report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/performance?date_from=[value]&date_to=[value]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/performance?&date_from=value&date_to=value&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
apikeytextAPI key

Optional parameters

NameTypeDescription
columnstextColumns (comma delimeted) to be returned (see return fields)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number
group_bytextGroup by time interval (allowed values: hour, day, week, month)


Call response description

Return fields

NameTypeDescription
performancelistPerformance list
Field performance has 29 columns:
datetimedatetimeDate from
datetodatetimeDate to
answersintNumber of answers
newAnswerAvgTimeintNew answer average time (in seconds)
newAnswerAvgTimeSlaintNew answer average time (in seconds) within SLA business hours
nextAnswerAvgTimeintOpen answer average time (in seconds)
nextAnswerAvgTimeSlaintOpen answer average time (in seconds) within SLA business hours
chat_answersintNumber of chat messages
chatsintNumber of responded chats
missed_chatsintNumber of missed chats
chat_pickupintNumber of picked up chats
chatPickupAvgTimeintChat pickup average time (in seconds)
chatAvgTimeintAverage time spent in chat (in seconds)
callsintNumber of answered calls
missed_callsintNumber of missed calls
call_secondsintCall time total (in seconds)
not_rankedintNumber of not ranked
not_ranked_ptextNot ranked [%]
rewardsintNumber of rewards
rewards_ptextRewards [%]
punishmentsintNumber of rebukes
punishments_ptextRebukes [%]
i_messagesintNumber of incoming messages
i_chatsintNumber of incomming chats (including not responded)
i_callsintNumber of incoming calls (including not answered)
f_chatsintNumber of finished chats
f_callsintNumber of finished calls
created_ticketsintNumber of tickets
resolved_ticketsintNumber of resolved tickets

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <performance>
  <item>
   <datetime>01/25/2014</datetime>
   <dateto>2014-01-27 23:59:59</dateto>
   <answers>0</answers>
   <newAnswerAvgTime>0</newAnswerAvgTime>
   <newAnswerAvgTimeSla>0</newAnswerAvgTimeSla>
   <nextAnswerAvgTime>0</nextAnswerAvgTime>
   <nextAnswerAvgTimeSla>0</nextAnswerAvgTimeSla>
   <chat_answers>0</chat_answers>
   <chats>0</chats>
   <missed_chats>0</missed_chats>
   <chat_pickup>0</chat_pickup>
   <chatPickupAvgTime>0</chatPickupAvgTime>
   <chatAvgTime>0</chatAvgTime>
   <calls>0</calls>
   <missed_calls>0</missed_calls>
   <call_seconds>0</call_seconds>
   <not_ranked>0</not_ranked>
   <not_ranked_p>0.00</not_ranked_p>
   <rewards>0</rewards>
   <rewards_p>0.00</rewards_p>
   <punishments>0</punishments>
   <punishments_p>0.00</punishments_p>
   <i_messages>0</i_messages>
   <i_chats>0</i_chats>
   <i_calls>0</i_calls>
   <created_tickets>0</created_tickets>
   <resolved_tickets>0</resolved_tickets>
  </item>
 </performance>
</response>
{
  "response":{
    "performance":[
      {
        "datetime":"01\/25\/2014",
        "dateto":"2014-01-27 23:59:59",
        "answers":"0",
        "newAnswerAvgTime":"0",
        "newAnswerAvgTimeSla":"0",
        "nextAnswerAvgTime":"0",
        "nextAnswerAvgTimeSla":"0",
        "chat_answers":"0",
        "chats":"0",
        "missed_chats":"0",
        "chat_pickup":"0",
        "chatPickupAvgTime":"0",
        "chatAvgTime":"0",
        "calls":"0",
        "missed_calls":"0",
        "call_seconds":"0",
        "not_ranked":"0",
        "not_ranked_p":"0.00",
        "rewards":"0",
        "rewards_p":"0.00",
        "punishments":"0",
        "punishments_p":"0.00",
        "i_messages":"0",
        "i_chats":"0",
        "i_calls":"0",
        "created_tickets":"0",
        "resolved_tickets":"0"
      }
    ]
  }
}


Tags report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/tags?date_from=[value]&date_to=[value]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/tags?&date_from=value&date_to=value&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
apikeytextAPI key

Optional parameters

NameTypeDescription
columnstextColumns (comma delimeted) to be returned (see return fields)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number


Call response description

Return fields

NameTypeDescription
tagslistTags list
Field tags has 29 columns:
idtextTag identifier
tagNametextTag name
answersintNumber of answers
newAnswerAvgTimeintNew answer average time (in seconds)
newAnswerAvgTimeSlaintNew answer average time (in seconds) within SLA business hours
nextAnswerAvgTimeintOpen answer average time (in seconds)
nextAnswerAvgTimeSlaintOpen answer average time (in seconds) within SLA business hours
chat_answersintNumber of chat messages
chatsintNumber of responded chats
missed_chatsintNumber of missed chats
chat_pickupintNumber of picked up chats
chatPickupAvgTimeintChat pickup average time (in seconds)
chatAvgTimeintAverage time spent in chat (in seconds)
callsintNumber of answered calls
missed_callsintNumber of missed calls
call_secondsintCall time total (in seconds)
not_rankedintNumber of not ranked
not_ranked_ptextNot ranked [%]
rewardsintNumber of rewards
rewards_ptextRewards [%]
punishmentsintNumber of rebukes
punishments_ptextRebukes [%]
i_messagesintNumber of incoming messages
i_chatsintNumber of incomming chats (including not responded)
i_callsintNumber of incoming calls (including not answered)
f_chatsintNumber of finished chats
f_callsintNumber of finished calls
created_ticketsintNumber of tickets
resolved_ticketsintNumber of resolved tickets

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <tags>
  <tag>
   <id>4gh5</id>
   <tagName>Urgent</tagName>
   <answers>0</answers>
   <newAnswerAvgTime>0</newAnswerAvgTime>
   <newAnswerAvgTimeSla>0</newAnswerAvgTimeSla>
   <nextAnswerAvgTime>0</nextAnswerAvgTime>
   <nextAnswerAvgTimeSla>0</nextAnswerAvgTimeSla>
   <chat_answers>0</chat_answers>
   <chats>0</chats>
   <missed_chats>0</missed_chats>
   <chat_pickup>0</chat_pickup>
   <chatPickupAvgTime>0</chatPickupAvgTime>
   <chatAvgTime>0</chatAvgTime>
   <calls>0</calls>
   <missed_calls>0</missed_calls>
   <call_seconds>0</call_seconds>
   <not_ranked>0</not_ranked>
   <not_ranked_p>0.00</not_ranked_p>
   <rewards>0</rewards>
   <rewards_p>0.00</rewards_p>
   <punishments>0</punishments>
   <punishments_p>0.00</punishments_p>
   <i_messages>0</i_messages>
   <i_chats>0</i_chats>
   <i_calls>0</i_calls>
  </tag>
 </tags>
</response>
{
  "response":{
    "tags":[
      {
        "id":"4gh5",
        "tagName":"Urgent",
        "answers":"0",
        "newAnswerAvgTime":"0",
        "newAnswerAvgTimeSla":"0",
        "nextAnswerAvgTime":"0",
        "nextAnswerAvgTimeSla":"0",
        "chat_answers":"0",
        "chats":"0",
        "missed_chats":"0",
        "chat_pickup":"0",
        "chatPickupAvgTime":"0",
        "chatAvgTime":"0",
        "calls":"0",
        "missed_calls":"0",
        "call_seconds":"0",
        "not_ranked":"0",
        "not_ranked_p":"0.00",
        "rewards":"0",
        "rewards_p":"0.00",
        "punishments":"0",
        "punishments_p":"0.00",
        "i_messages":"0",
        "i_chats":"0",
        "i_calls":"0"
      }
    ]
  }
}


Tickets Agent availability report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/tickets/agentsavailability
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/tickets/agentsavailability?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
columnstextColumns (comma delimeted) to be returned (see return fields)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number
departmentidtextNarrow the report to specific department identifier
agentidtextNarrow the report to specific agent id


Call response description

Return fields

NameTypeDescription
agentsavailabilitylistAgents availability list
Field agentsavailability has 10 columns:
idintAvailability identifier
useridtextUser identifier
firstnametextUser first name
lastnametextUser last name
contactidtextContact identifier
departmentidtextDepartment identifier
department_nametextDepartment name
hours_onlinetextNumber of hours online
from_datedatetimeDate from
to_datedatetimeDate to

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <agentsavailability>
  <item>
   <id>363662</id>
   <userid>1245asdf</userid>
   <firstname>Firstname</firstname>
   <lastname>Lastname</lastname>
   <contactid>hjkl78io</contactid>
   <departmentid>drty894g</departmentid>
   <department_name>Test</department_name>
   <hours_online>00:08:31</hours_online>
   <from_date>07/24/2014 16:25:06</from_date>
   <to_date>now</to_date>
  </item>
 </agentsavailability>
</response>
{
  "response":{
    "agentsavailability":[
      {
        "id":"363662",
        "userid":"1245asdf",
        "firstname":"Firstname",
        "lastname":"Lastname",
        "contactid":"hjkl78io",
        "departmentid":"drty894g",
        "department_name":"Test",
        "hours_online":"00:08:31",
        "from_date":"07\/24\/2014 16:25:06",
        "to_date":"now"
      }
    ]
  }
}


Tickets Load report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/tickets/load
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/tickets/load?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number
departmentidtextNarrow the report to specific department identifier
agentidtextNarrow the report to specific agent id


Call response description

Return fields

NameTypeDescription
loadslistTickets load list
Field loads has 10 columns:
datedatetimeDate
avgQueuetextAverage tickets in queue
maxQueueintMaximum tickets in queue
minQueueintMinimum tickets in queue
avgSlotstextAverage agents
maxSlotsintMaximum agents
minSlotsintMinimum agents
avgServicetextAverage work in progress tickets
maxServiceintMaximum work in progress tickets
minServiceintMinimum work in progress tickets

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <loads>
  <load>
   <date>2014-07-26 15:00:00</date>
   <avgQueue>0.00</avgQueue>
   <maxQueue>0</maxQueue>
   <minQueue>0</minQueue>
   <avgSlots>0.00</avgSlots>
   <maxSlots>0</maxSlots>
   <minSlots>0</minSlots>
   <avgService>0.00</avgService>
   <maxService>0</maxService>
   <minService>0</minService>
  </load>
 </loads>
</response>
{
  "response":{
    "loads":[
      {
        "date":"2014-07-26 15:00:00",
        "avgQueue":"0.00",
        "maxQueue":"0",
        "minQueue":"0",
        "avgSlots":"0.00",
        "maxSlots":"0",
        "minSlots":"0",
        "avgService":"0.00",
        "maxService":"0",
        "minService":"0"
      }
    ]
  }
}


Tickets SLA Compliance report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/tickets/slacompliance
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/tickets/slacompliance?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number
datetimetextDate constraint (L30D = last 30 days (default), TM = this month, LM = last month, 2014-06 = whole june of 2014)
departmentidtextNarrow the report to specific department identifier
useridtextAssigned to user identifier
slalevelidtextSLA level identifier


Call response description

Return fields

NameTypeDescription
slacomplianceslistSLA Compliances list
Field slacompliances has 9 columns:
datedatetimeDate
fulfilledintFulfilled
avgFulfilledTimeintAverage fulfilled time
maxFulfilledTimeintMaximum fulfilled time
minFulfilledTimeintMinimum fulfilled time
unfulfilledintUnfulfilled
avgUnfulfilledTimeintAverage unfulfilled time
maxUnfulfilledTimeintMaximum unfulfilled time
minUnfulfilledTimeintMinimum unfulfilled time

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <slacompliances>
  <slacompliance>
   <date>2014-07-26 15:00:00</date>
   <fulfilled>0</fulfilled>
   <avgFulfilledTime>0</avgFulfilledTime>
   <maxFulfilledTime>0</maxFulfilledTime>
   <minFulfilledTime>0</minFulfilledTime>
   <unfulfilled>0</unfulfilled>
   <avgUnfulfilledTime>0</avgUnfulfilledTime>
   <maxUnfulfilledTime>0</maxUnfulfilledTime>
   <minUnfulfilledTime>0</minUnfulfilledTime>
  </slacompliance>
 </slacompliances>
</response>
{
  "response":{
    "slacompliances":[
      {
        "date":"2014-07-26 15:00:00",
        "fulfilled":"0",
        "avgFulfilledTime":"0",
        "maxFulfilledTime":"0",
        "minFulfilledTime":"0",
        "unfulfilled":"0",
        "avgUnfulfilledTime":"0",
        "maxUnfulfilledTime":"0",
        "minUnfulfilledTime":"0"
      }
    ]
  }
}


Tickets SLA Log report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/tickets/slalog?date_from=[value]&date_to=[value]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/tickets/slalog?&date_from=value&date_to=value&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
apikeytextAPI key

Optional parameters

NameTypeDescription
columnstextColumns (comma delimeted) to be returned (see return fields)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number
departmentidtextNarrows the report to specific department identifier
agentidtextAgent identifier
requesteridtextRequester contact identifier
slalevelidtextSLA level identifier


Call response description

Return fields

NameTypeDescription
slalogslistSLA Compliances list
Field slalogs has 20 columns:
idtextSLA Log identifier
conversationidtextConversation identifier
codetextConversation code
departmentidtextDepartment identifier
department_nametextDepartment name
levelidtextLevel identifier
sla_level_nametextSLA level name
slatextSLA offset
date_createddatetimeMinimum unfulfilled time
date_closeddatetimeMinimum unfulfilled time
server_date_closeddatetimeMinimum unfulfilled time
date_duedatetimeMinimum unfulfilled time
server_date_duedatetimeMinimum unfulfilled time
sla_level_idtextSLA level identifier
agentidtextAgent identifier
agent_firstnametextAgent first name
agent_lastnametextAgent last name
req_contactidtextRequester contact identifier
req_firstnametextRequester first name
req_lastnametextRequester last name

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <slalogs>
  <slalog>
   <id>41355</id>
   <conversationid>bf7b09ae</conversationid>
   <code>code</code>
   <departmentid>XXX-XXXXX-XXX</departmentid>
   <department_name>General</department_name>
   <levelid>3bd9cf58</levelid>
   <sla_level_name>Urgent</sla_level_name>
   <sla>-01:56:53</sla>
   <date_created>08/26/2014 16:42:36</date_created>
   <date_closed>08/26/2014 16:42:36</date_closed>
   <server_date_closed>2014-08-26 07:42:36</server_date_closed>
   <date_due>08/26/2014 18:39:29</date_due>
   <server_date_due>2014-08-26 09:39:29</server_date_due>
   <sla_level_id>gtrt7895</sla_level_id>
   <agentid/>
   <agent_firstname/>
   <agent_lastname/>
   <req_contactid>2fe9e7c7</req_contactid>
   <req_firstname>Customer firstname</req_firstname>
   <req_lastname>Customer lastname</req_lastname>
  </slalog>
 </slalogs>
</response>
{
  "response":{
    "slalogs":[
      {
        "id":"41355",
        "conversationid":"bf7b09ae",
        "code":"code",
        "departmentid":"XXX-XXXXX-XXX",
        "department_name":"General",
        "levelid":"3bd9cf58",
        "sla_level_name":"Urgent",
        "sla":"-01:56:53",
        "date_created":"08\/26\/2014 16:42:36",
        "date_closed":"08\/26\/2014 16:42:36",
        "server_date_closed":"2014-08-26 07:42:36",
        "date_due":"08\/26\/2014 18:39:29",
        "server_date_due":"2014-08-26 09:39:29",
        "sla_level_id":"gtrt7895",
        "agentid":"",
        "agent_firstname":"",
        "agent_lastname":"",
        "req_contactid":"2fe9e7c7",
        "req_firstname":"Customer firstname",
        "req_lastname":"Customer lastname"
      }
    ]
  }
}


Chats Agent availability report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/chats/agentsavailability
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/chats/agentsavailability?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
columnstextColumns (comma delimeted) to be returned (see return fields)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number
departmentidtextNarrow the report to specific department identifier
agentidtextNarrow the report to specific agent id


Call response description

Return fields

NameTypeDescription
agentsavailabilitylistAgents availability list
Field agentsavailability has 10 columns:
idintAvailability identifier
useridtextUser identifier
firstnametextUser first name
lastnametextUser last name
contactidtextContact identifier
departmentidtextDepartment identifier
department_nametextDepartment name
hours_onlinetextNumber of hours online
from_datedatetimeDate from
to_datedatetimeDate to

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <agentsavailability>
  <item>
   <id>363662</id>
   <userid>1245asdf</userid>
   <firstname>Firstname</firstname>
   <lastname>Lastname</lastname>
   <contactid>hjkl78io</contactid>
   <departmentid>drty894g</departmentid>
   <department_name>Test</department_name>
   <hours_online>00:08:31</hours_online>
   <from_date>07/24/2014 16:25:06</from_date>
   <to_date>now</to_date>
  </item>
 </agentsavailability>
</response>
{
  "response":{
    "agentsavailability":[
      {
        "id":"363662",
        "userid":"1245asdf",
        "firstname":"Firstname",
        "lastname":"Lastname",
        "contactid":"hjkl78io",
        "departmentid":"drty894g",
        "department_name":"Test",
        "hours_online":"00:08:31",
        "from_date":"07\/24\/2014 16:25:06",
        "to_date":"now"
      }
    ]
  }
}


Chats availability report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/chats/availability
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/chats/availability?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number
departmentidtextNarrow the report to specific department identifier
agentidtextNarrow the report to specific agent id


Call response description

Return fields

NameTypeDescription
availabilitylistChats availability list
Field availability has 3 columns:
datedatetimeDate
minsintAvailability (in minutes)
pcttextAvailability (in percentage)

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <availability>
  <item>
   <date>2014-07-26 15:00:00</date>
   <mins>59</mins>
   <pct>98.3333</pct>
  </item>
 </availability>
</response>
{
  "response":{
    "availability":[
      {
        "date":"2014-07-26 15:00:00",
        "mins":"59",
        "pct":"98.3333"
      }
    ]
  }
}


Chats Load report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/chats/load
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/chats/load?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number
departmentidtextNarrow the report to specific department identifier
agentidtextNarrow the report to specific agent id


Call response description

Return fields

NameTypeDescription
loadslistChats load list
Field loads has 10 columns:
datedatetimeDate
avgQueuetextAverage tickets in queue
maxQueueintMaximum tickets in queue
minQueueintMinimum tickets in queue
avgSlotstextAverage agents
maxSlotsintMaximum agents
minSlotsintMinimum agents
avgServicetextAverage work in progress tickets
maxServiceintMaximum work in progress tickets
minServiceintMinimum work in progress tickets

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <loads>
  <load>
   <date>2014-07-26 15:00:00</date>
   <avgQueue>0.00</avgQueue>
   <maxQueue>0</maxQueue>
   <minQueue>0</minQueue>
   <avgSlots>0.00</avgSlots>
   <maxSlots>0</maxSlots>
   <minSlots>0</minSlots>
   <avgService>0.00</avgService>
   <maxService>0</maxService>
   <minService>0</minService>
  </load>
 </loads>
</response>
{
  "response":{
    "loads":[
      {
        "date":"2014-07-26 15:00:00",
        "avgQueue":"0.00",
        "maxQueue":"0",
        "minQueue":"0",
        "avgSlots":"0.00",
        "maxSlots":"0",
        "minSlots":"0",
        "avgService":"0.00",
        "maxService":"0",
        "minService":"0"
      }
    ]
  }
}


Chats SLA Compliance report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/chats/slacompliance
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/chats/slacompliance?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number
datetimetextDate constraint (L30D = last 30 days (default), TM = this month, LM = last month, 2014-06 = whole june of 2014)
departmentidtextNarrow the report to specific department identifier
useridtextAssigned to user identifier
slalevelidtextSLA level identifier


Call response description

Return fields

NameTypeDescription
slacomplianceslistSLA Compliances list
Field slacompliances has 9 columns:
datedatetimeDate
fulfilledintFulfilled
avgFulfilledTimeintAverage fulfilled time
maxFulfilledTimeintMaximum fulfilled time
minFulfilledTimeintMinimum fulfilled time
unfulfilledintUnfulfilled
avgUnfulfilledTimeintAverage unfulfilled time
maxUnfulfilledTimeintMaximum unfulfilled time
minUnfulfilledTimeintMinimum unfulfilled time

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <slacompliances>
  <slacompliance>
   <date>2014-07-26 15:00:00</date>
   <fulfilled>0</fulfilled>
   <avgFulfilledTime>0</avgFulfilledTime>
   <maxFulfilledTime>0</maxFulfilledTime>
   <minFulfilledTime>0</minFulfilledTime>
   <unfulfilled>0</unfulfilled>
   <avgUnfulfilledTime>0</avgUnfulfilledTime>
   <maxUnfulfilledTime>0</maxUnfulfilledTime>
   <minUnfulfilledTime>0</minUnfulfilledTime>
  </slacompliance>
 </slacompliances>
</response>
{
  "response":{
    "slacompliances":[
      {
        "date":"2014-07-26 15:00:00",
        "fulfilled":"0",
        "avgFulfilledTime":"0",
        "maxFulfilledTime":"0",
        "minFulfilledTime":"0",
        "unfulfilled":"0",
        "avgUnfulfilledTime":"0",
        "maxUnfulfilledTime":"0",
        "minUnfulfilledTime":"0"
      }
    ]
  }
}


Chats SLA log report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/chats/slalog?date_from=[value]&date_to=[value]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/chats/slalog?&date_from=value&date_to=value&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
apikeytextAPI key

Optional parameters

NameTypeDescription
columnstextColumns (comma delimeted) to be returned (see return fields)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number
departmentidtextNarrows the report to specific department identifier
agentidtextAgent identifier
requesteridtextRequester contact identifier
slalevelidtextSLA level identifier


Call response description

Return fields

NameTypeDescription
slalogslistSLA Compliances list
Field slalogs has 20 columns:
idtextSLA Log identifier
conversationidtextConversation identifier
codetextConversation code
departmentidtextDepartment identifier
department_nametextDepartment name
levelidtextLevel identifier
sla_level_nametextSLA level name
slatextSLA offset
date_createddatetimeMinimum unfulfilled time
date_closeddatetimeMinimum unfulfilled time
server_date_closeddatetimeMinimum unfulfilled time
date_duedatetimeMinimum unfulfilled time
server_date_duedatetimeMinimum unfulfilled time
sla_level_idtextSLA level identifier
agentidtextAgent identifier
agent_firstnametextAgent first name
agent_lastnametextAgent last name
req_contactidtextRequester contact identifier
req_firstnametextRequester first name
req_lastnametextRequester last name

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <slalogs>
  <slalog>
   <id>41355</id>
   <conversationid>bf7b09ae</conversationid>
   <code>code</code>
   <departmentid>XXX-XXXXX-XXX</departmentid>
   <department_name>General</department_name>
   <levelid>3bd9cf58</levelid>
   <sla_level_name>Urgent</sla_level_name>
   <sla>-01:56:53</sla>
   <date_created>08/26/2014 16:42:36</date_created>
   <date_closed>08/26/2014 16:42:36</date_closed>
   <server_date_closed>2014-08-26 07:42:36</server_date_closed>
   <date_due>08/26/2014 18:39:29</date_due>
   <server_date_due>2014-08-26 09:39:29</server_date_due>
   <sla_level_id>gtrt7895</sla_level_id>
   <agentid/>
   <agent_firstname/>
   <agent_lastname/>
   <req_contactid>2fe9e7c7</req_contactid>
   <req_firstname>Customer firstname</req_firstname>
   <req_lastname>Customer lastname</req_lastname>
  </slalog>
 </slalogs>
</response>
{
  "response":{
    "slalogs":[
      {
        "id":"41355",
        "conversationid":"bf7b09ae",
        "code":"code",
        "departmentid":"XXX-XXXXX-XXX",
        "department_name":"General",
        "levelid":"3bd9cf58",
        "sla_level_name":"Urgent",
        "sla":"-01:56:53",
        "date_created":"08\/26\/2014 16:42:36",
        "date_closed":"08\/26\/2014 16:42:36",
        "server_date_closed":"2014-08-26 07:42:36",
        "date_due":"08\/26\/2014 18:39:29",
        "server_date_due":"2014-08-26 09:39:29",
        "sla_level_id":"gtrt7895",
        "agentid":"",
        "agent_firstname":"",
        "agent_lastname":"",
        "req_contactid":"2fe9e7c7",
        "req_firstname":"Customer firstname",
        "req_lastname":"Customer lastname"
      }
    ]
  }
}


Calls Agent availability report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/calls/agentsavailability
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/calls/agentsavailability?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
columnstextColumns (comma delimeted) to be returned (see return fields)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number
departmentidtextNarrow the report to specific department identifier
agentidtextNarrow the report to specific agent id


Call response description

Return fields

NameTypeDescription
agentsavailabilitylistAgents availability list
Field agentsavailability has 10 columns:
idintAvailability identifier
useridtextUser identifier
firstnametextUser first name
lastnametextUser last name
contactidtextContact identifier
departmentidtextDepartment identifier
department_nametextDepartment name
hours_onlinetextNumber of hours online
from_datedatetimeDate from
to_datedatetimeDate to

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <agentsavailability>
  <item>
   <id>363662</id>
   <userid>1245asdf</userid>
   <firstname>Firstname</firstname>
   <lastname>Lastname</lastname>
   <contactid>hjkl78io</contactid>
   <departmentid>drty894g</departmentid>
   <department_name>Test</department_name>
   <hours_online>00:08:31</hours_online>
   <from_date>07/24/2014 16:25:06</from_date>
   <to_date>now</to_date>
  </item>
 </agentsavailability>
</response>
{
  "response":{
    "agentsavailability":[
      {
        "id":"363662",
        "userid":"1245asdf",
        "firstname":"Firstname",
        "lastname":"Lastname",
        "contactid":"hjkl78io",
        "departmentid":"drty894g",
        "department_name":"Test",
        "hours_online":"00:08:31",
        "from_date":"07\/24\/2014 16:25:06",
        "to_date":"now"
      }
    ]
  }
}


Calls availability report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/calls/availability
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/calls/availability?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number
departmentidtextNarrow the report to specific department identifier
agentidtextNarrow the report to specific agent id


Call response description

Return fields

NameTypeDescription
availabilitylistCalls availability list
Field availability has 3 columns:
datedatetimeDate
minsintAvailability (in minutes)
pcttextAvailability (in percentage)

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <availability>
  <item>
   <date>2014-07-26 15:00:00</date>
   <mins>59</mins>
   <pct>98.3333</pct>
  </item>
 </availability>
</response>
{
  "response":{
    "availability":[
      {
        "date":"2014-07-26 15:00:00",
        "mins":"59",
        "pct":"98.3333"
      }
    ]
  }
}


Calls Load report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/calls/load
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/calls/load?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number
departmentidtextNarrow the report to specific department identifier
agentidtextNarrow the report to specific agent id


Call response description

Return fields

NameTypeDescription
loadslistCalls load list
Field loads has 10 columns:
datedatetimeDate
avgQueuetextAverage tickets in queue
maxQueueintMaximum tickets in queue
minQueueintMinimum tickets in queue
avgSlotstextAverage agents
maxSlotsintMaximum agents
minSlotsintMinimum agents
avgServicetextAverage work in progress tickets
maxServiceintMaximum work in progress tickets
minServiceintMinimum work in progress tickets

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <loads>
  <load>
   <date>2014-07-26 15:00:00</date>
   <avgQueue>0.00</avgQueue>
   <maxQueue>0</maxQueue>
   <minQueue>0</minQueue>
   <avgSlots>0.00</avgSlots>
   <maxSlots>0</maxSlots>
   <minSlots>0</minSlots>
   <avgService>0.00</avgService>
   <maxService>0</maxService>
   <minService>0</minService>
  </load>
 </loads>
</response>
{
  "response":{
    "loads":[
      {
        "date":"2014-07-26 15:00:00",
        "avgQueue":"0.00",
        "maxQueue":"0",
        "minQueue":"0",
        "avgSlots":"0.00",
        "maxSlots":"0",
        "minSlots":"0",
        "avgService":"0.00",
        "maxService":"0",
        "minService":"0"
      }
    ]
  }
}


Calls SLA Compliance report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/calls/slacompliance
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/calls/slacompliance?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number
datetimetextDate constraint (L30D = last 30 days (default), TM = this month, LM = last month, 2014-06 = whole june of 2014)
departmentidtextNarrow the report to specific department identifier
useridtextAssigned to user identifier
slalevelidtextSLA level identifier


Call response description

Return fields

NameTypeDescription
slacomplianceslistSLA Compliances list
Field slacompliances has 9 columns:
datedatetimeDate
fulfilledintFulfilled
avgFulfilledTimeintAverage fulfilled time
maxFulfilledTimeintMaximum fulfilled time
minFulfilledTimeintMinimum fulfilled time
unfulfilledintUnfulfilled
avgUnfulfilledTimeintAverage unfulfilled time
maxUnfulfilledTimeintMaximum unfulfilled time
minUnfulfilledTimeintMinimum unfulfilled time

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <slacompliances>
  <slacompliance>
   <date>2014-07-26 15:00:00</date>
   <fulfilled>0</fulfilled>
   <avgFulfilledTime>0</avgFulfilledTime>
   <maxFulfilledTime>0</maxFulfilledTime>
   <minFulfilledTime>0</minFulfilledTime>
   <unfulfilled>0</unfulfilled>
   <avgUnfulfilledTime>0</avgUnfulfilledTime>
   <maxUnfulfilledTime>0</maxUnfulfilledTime>
   <minUnfulfilledTime>0</minUnfulfilledTime>
  </slacompliance>
 </slacompliances>
</response>
{
  "response":{
    "slacompliances":[
      {
        "date":"2014-07-26 15:00:00",
        "fulfilled":"0",
        "avgFulfilledTime":"0",
        "maxFulfilledTime":"0",
        "minFulfilledTime":"0",
        "unfulfilled":"0",
        "avgUnfulfilledTime":"0",
        "maxUnfulfilledTime":"0",
        "minUnfulfilledTime":"0"
      }
    ]
  }
}


Calls SLA log report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/reports/calls/slalog?date_from=[value]&date_to=[value]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/reports/calls/slalog?&date_from=value&date_to=value&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
apikeytextAPI key

Optional parameters

NameTypeDescription
columnstextColumns (comma delimeted) to be returned (see return fields)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number
departmentidtextNarrows the report to specific department identifier
agentidtextAgent identifier
requesteridtextRequester contact identifier
slalevelidtextSLA level identifier


Call response description

Return fields

NameTypeDescription
slalogslistSLA Compliances list
Field slalogs has 20 columns:
idtextSLA Log identifier
conversationidtextConversation identifier
codetextConversation code
departmentidtextDepartment identifier
department_nametextDepartment name
levelidtextLevel identifier
sla_level_nametextSLA level name
slatextSLA offset
date_createddatetimeMinimum unfulfilled time
date_closeddatetimeMinimum unfulfilled time
server_date_closeddatetimeMinimum unfulfilled time
date_duedatetimeMinimum unfulfilled time
server_date_duedatetimeMinimum unfulfilled time
sla_level_idtextSLA level identifier
agentidtextAgent identifier
agent_firstnametextAgent first name
agent_lastnametextAgent last name
req_contactidtextRequester contact identifier
req_firstnametextRequester first name
req_lastnametextRequester last name

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <slalogs>
  <slalog>
   <id>41355</id>
   <conversationid>bf7b09ae</conversationid>
   <code>code</code>
   <departmentid>XXX-XXXXX-XXX</departmentid>
   <department_name>General</department_name>
   <levelid>3bd9cf58</levelid>
   <sla_level_name>Urgent</sla_level_name>
   <sla>-01:56:53</sla>
   <date_created>08/26/2014 16:42:36</date_created>
   <date_closed>08/26/2014 16:42:36</date_closed>
   <server_date_closed>2014-08-26 07:42:36</server_date_closed>
   <date_due>08/26/2014 18:39:29</date_due>
   <server_date_due>2014-08-26 09:39:29</server_date_due>
   <sla_level_id>gtrt7895</sla_level_id>
   <agentid/>
   <agent_firstname/>
   <agent_lastname/>
   <req_contactid>2fe9e7c7</req_contactid>
   <req_firstname>Customer firstname</req_firstname>
   <req_lastname>Customer lastname</req_lastname>
  </slalog>
 </slalogs>
</response>
{
  "response":{
    "slalogs":[
      {
        "id":"41355",
        "conversationid":"bf7b09ae",
        "code":"code",
        "departmentid":"XXX-XXXXX-XXX",
        "department_name":"General",
        "levelid":"3bd9cf58",
        "sla_level_name":"Urgent",
        "sla":"-01:56:53",
        "date_created":"08\/26\/2014 16:42:36",
        "date_closed":"08\/26\/2014 16:42:36",
        "server_date_closed":"2014-08-26 07:42:36",
        "date_due":"08\/26\/2014 18:39:29",
        "server_date_due":"2014-08-26 09:39:29",
        "sla_level_id":"gtrt7895",
        "agentid":"",
        "agent_firstname":"",
        "agent_lastname":"",
        "req_contactid":"2fe9e7c7",
        "req_firstname":"Customer firstname",
        "req_lastname":"Customer lastname"
      }
    ]
  }
}


Ranking agents report

Avaliable from application version: 4.11.3.0

Example call
  • General
  • PHP
GET
  http://example.com/api/?date_from=[value]&date_to=[value]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/?&date_from=value&date_to=value&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
date_fromdatetimeDate from (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 00:00:00)
date_todatetimeDate to (format: YYYY-MM-DD, eg: 2014-01-24 or YYYY-MM-DD HH:MM:SS, e.g. 2014-01-24 23:59:59)
apikeytextAPI key

Optional parameters

NameTypeDescription
columnstextColumns (comma delimeted) to be returned (see return fields)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number
agentidtextAgent user identifier
contactidtextContact user identifier
typestextComma-separated rank type identifiers (allowed values: W - reward, P - rebuke)


Call response description

Return fields

NameTypeDescription
rankslistAgent ranking list
Field ranks has 11 columns:
idtextRanking identifier
rankingTypetextRanking type (W = reward, P = rebuke)
datecreateddatetimeDate created
conversationidtextConversation identifier
agentcontactidtextAgent identifier
agentEmailtextAgent email
agenttextAgent full name
contactidtextRequester identifier
requesterEmailtextRequester email
requestertextRequester full name
commenttextNumber of answered calls

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <ranks>
  <rank>
   <id>49481</id>
   <rankingType>W</rankingType>
   <datecreated>2014-08-26 07:06:30</datecreated>
   <conversationid>dfr895e3</conversationid>
   <agentcontactid>56df98rt</agentcontactid>
   <agentEmail>agent@example.com</agentEmail>
   <agent>Agent Name</agent>
   <contactid>ert889d6</contactid>
   <requesterEmail>customer@example.com</requesterEmail>
   <requester>Customer Name</requester>
   <comment>super</comment>
  </rank>
 </ranks>
</response>
{
  "response":{
    "ranks":[
      {
        "id":"49481",
        "rankingType":"W",
        "datecreated":"2014-08-26 07:06:30",
        "conversationid":"dfr895e3",
        "agentcontactid":"56df98rt",
        "agentEmail":"agent@example.com",
        "agent":"Agent Name",
        "contactid":"ert889d6",
        "requesterEmail":"customer@example.com",
        "requester":"Customer Name",
        "comment":"super"
      }
    ]
  }
}



Suggestion categories


Retrieves all suggestion categories

Avaliable from application version: 2.8.2.1

Example call
  • General
  • PHP
GET
  http://example.com/api/suggestioncategories
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/suggestioncategories?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
suggestioncategorieslistList of categories
Field suggestioncategories has 3 columns:
idtextId of the category
titletextTitle of the category
pathtextPath of the category

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <suggestioncategories>
  <suggestioncategorie>
   <id>15</id>
   <title>Suggestions</title>
   <path>Product1 / Suggestion</path>
  </suggestioncategorie>
  <suggestioncategorie>
   <id>16</id>
   <title>Ideas</title>
   <path>Product2 / Ideas</path>
  </suggestioncategorie>
 </suggestioncategories>
</response>
{
  "response":{
    "suggestioncategories":[
      {
        "id":"15",
        "title":"Suggestions",
        "path":"Product1 \/ Suggestion"
      },
      {
        "id":"16",
        "title":"Ideas",
        "path":"Product2 \/ Ideas"
      }
    ]
  }
}



Tags


Remove tag

Avaliable from application version: 4.17.1.3

Example call
  • General
  • PHP
DELETE
  http://example.com/api/tags/[tagid]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/tags/[tagid]");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
$curl_delete_data = array(
        /* These are mandatory params */
        'apikey' => '...',
);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($curl_delete_data));
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[tagid]textTag ID
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":0
  }
}


Retrieve a list of all available tags

Avaliable from application version: 4.0.30.6

Example call
  • General
  • PHP
GET
  http://example.com/api/tags
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/tags?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
tagslistThe list of tags.
Field tags has 2 columns:
idtextAn identifier of the tag.
nametextA name of the tag.

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <tags>
  <tag>
   <id>sh3j</id>
   <name>VIP</name>
  </tag>
  <tag>
   <id>8sd5</id>
   <name>Support</name>
  </tag>
 </tags>
</response>
{
  "response":{
    "tags":[
      {
        "id":"sh3j",
        "name":"VIP"
      },
      {
        "id":"8sd5",
        "name":"Support"
      }
    ]
  }
}


Retrieve tag info

Avaliable from application version: 4.17.1.3

Example call
  • General
  • PHP
GET
  http://example.com/api/tags/[tagid]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/tags/[tagid]?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[tagid]textTag ID
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
idtextId of tag
nametextName of the tag
colortextColor for title
bg_colortextColor for background

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <id>sh3j</id>
 <name>VIP</name>
 <color>FFFFFF</color>
 <bg_color>0000FF</bg_color>
</response>
{
  "response":{
    "id":"sh3j",
    "name":"VIP",
    "color":"FFFFFF",
    "bg_color":"0000FF"
  }
}


Add tag

Avaliable from application version: 4.17.1.3

Example call
  • General
  • PHP
POST
  http://example.com/api/tags
Note: You must send parameters for this call as POST fields.
<?php
$ch = curl_init();
$curl_post_data = array(
        /* These are mandatory params */
        'name' => '...',
        'apikey' => '...',
        /* ...and these are optional */
        'color' => '...',
        'bg_color' => '...',
);
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/tags");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curl_post_data);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
nametextName of the tag
apikeytextAPI key

Optional parameters

NameTypeDescription
colortextColor for name
bg_colortextColor for background


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request
idtextId of tag
nametextName of tag
colortextColor for name
bg_colortextColor for background

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
 <id>sh3j</id>
 <name>VIP</name>
 <color>FFFFFF</color>
 <bg_color>0000FF</bg_color>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":"0",
    "id":"sh3j",
    "name":"VIP",
    "color":"FFFFFF",
    "bg_color":"0000FF"
  }
}


Change tag

Avaliable from application version: 4.17.1.3

Example call
  • General
  • PHP
PUT
  http://example.com/api/tags/[tagid]
Note: You must send parameters for this call as PUT fields.
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/tags/[tagid]");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
$curl_put_data = array(
        /* These are mandatory params */
        'apikey' => '...',
        /* ...and these are optional */
        'name' => '...',
        'color' => '...',
        'bg_color' => '...',
);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($curl_put_data));
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[tagid]textTag ID
apikeytextAPI key

Optional parameters

NameTypeDescription
nametextName of the tag
colortextColor for name
bg_colortextColor for background


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":0
  }
}



Widgets


Remove widget

Avaliable from application version: 4.25.2.4

Example call
  • General
  • PHP
DELETE
  http://example.com/api/widgets/[contactwidgetid]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/widgets/[contactwidgetid]");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
$curl_delete_data = array(
        /* These are mandatory params */
        'apikey' => '...',
);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($curl_delete_data));
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[contactwidgetid]text
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
statustextOK
statuscodeintStatus code of executed request

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <status>OK</status>
 <statuscode>0</statuscode>
</response>
{
  "response":{
    "status":"OK",
    "statuscode":0
  }
}


Retrieve all widgets

Avaliable from application version: 4.25.2.4

Example call
  • General
  • PHP
GET
  http://example.com/api/widgets
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/widgets?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
providetextLoad widgets by provide
departmentidtextLoad widgets by departmentid
rtypeconstlistLoad widgets by type (Possible values: C - Chat button, N - Cloopen button, O - Contact form, U - Invitation html, M - Invitation image, G - Chat window, B - Contact form, K - Search, W - Knowledge base, S - Suggest button, P - Twilio button)
usecodeconstlistLoad widgets by usecode (Possible values: N - Online, F - Offline, B - Both)
statusconstlistLoad widgets by status (Possible values: A - Active, C - Create, I - Inactive, F - Offline, N - Online)
limitcountintMax count of returned rows (Max allowed value is 1000, Default value is 100)
limitfromintStart from specified row number


Call response description

Return fields

NameTypeDescription
widgetslistContact widgets list
Field widgets has 23 columns:
contactwidgetidtextWidget ID
nametextWidget name
providetextProvides services
departmentidtextDepartment ID
kb_idtextKnowledge base ID
rtypeconstlistType (Possible values: C - Chat button, N - Cloopen button, O - Contact form, U - Invitation html, M - Invitation image, G - Chat window, B - Contact form, K - Search, W - Knowledge base, S - Suggest button, P - Twilio button)
usecodeconstlistUse code (Possible values: N - Online, F - Offline, B - Both)
statusconstlistStatus (Possible values: A - Active, C - Create, I - Inactive, F - Offline, N - Online)
descriptiontextDescription
impressionstextImpressions
ticketstextTickets
languagetextLanguage
last_display_timedatetimeLast display time
last_display_urltextLast display url
onlinecodehtmlOnline code
onlinecode_ieoldhtmlOnline code for Internet Explorer 9.0 or older.
offlinecodehtmlOffline code
offlinecode_ieoldhtmlOffline code for Internet Explorer 9.0 or older.
onlinecode_csshtmlOnline CSS code
onlinecode_ieold_csshtmlOnline CSS code for Internet Explorer 9.0 or older.
offlinecode_csshtmlOffline CSS code
offlinecode_ieold_csshtmlOffline CSS code for Internet Explorer 9.0 or older.
integration_codehtmlIntegration HTML code

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <widgets>
  <widget>
   <contactwidgetid>widget1</contactwidgetid>
   <name>widget1</name>
   <provide>F</provide>
   <departmentid>dep00001</departmentid>
   <kb_id>kb00001</kb_id>
   <rtype>C</rtype>
   <usecode>F</usecode>
   <status>N</status>
   <description>description of widget no 1</description>
   <impressions>0</impressions>
   <tickets>0</tickets>
   <language>en-US</language>
   <last_display_time>2017-06-02 06:08:24</last_display_time>
   <last_display_url>www.widget01.com</last_display_url>
  </widget>
  <widget>
   <contactwidgetid>widget2</contactwidgetid>
   <name>widget2</name>
   <provide>BFC</provide>
   <departmentid>dep00002</departmentid>
   <kb_id>kb00002</kb_id>
   <rtype>C</rtype>
   <usecode>N</usecode>
   <status>F</status>
   <description>description of widget no 2</description>
   <impressions>0</impressions>
   <tickets>0</tickets>
   <language>en-US</language>
   <last_display_time>2017-06-02 06:08:24</last_display_time>
   <last_display_url>www.widget2.com</last_display_url>
  </widget>
 </widgets>
</response>
{
  "response":{
    "widgets":[
      {
        "contactwidgetid":"widget1",
        "name":"widget1",
        "provide":"F",
        "departmentid":"dep00001",
        "kb_id":"kb00001",
        "rtype":"C",
        "usecode":"F",
        "status":"N",
        "description":"description of widget no 1",
        "impressions":"0",
        "tickets":"0",
        "language":"en-US",
        "last_display_time":"2017-06-02 06:08:24",
        "last_display_url":"www.widget01.com"
      },
      {
        "contactwidgetid":"widget2",
        "name":"widget2",
        "provide":"BFC",
        "departmentid":"dep00002",
        "kb_id":"kb00002",
        "rtype":"C",
        "usecode":"N",
        "status":"F",
        "description":"description of widget no 2",
        "impressions":"0",
        "tickets":"0",
        "language":"en-US",
        "last_display_time":"2017-06-02 06:08:24",
        "last_display_url":"www.widget2.com"
      }
    ]
  }
}


Retrieve widget

Avaliable from application version: 4.25.2.4

Example call
  • General
  • PHP
GET
  http://example.com/api/widgets/[contactwidgetid]
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/widgets/[contactwidgetid]?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[contactwidgetid]text
apikeytextAPI key


Call response description

Return fields

NameTypeDescription
contactwidgetidtextWidget contact id
nametextWidget name
providetextProvides services
departmentidtextDepartment id
rtypeconstlistType (Possible values: C - Chat button, N - Cloopen button, O - Contact form, U - Invitation html, M - Invitation image, G - Chat window, B - Contact form, K - Search, W - Knowledge base, S - Suggest button, P - Twilio button)
usecodeconstlistUsecode (Possible values: N - Online, F - Offline, B - Both)
statusconstlistStatus (Possible values: A - Active, C - Create, I - Inactive, F - Offline, N - Online)
kb_idtextKnowledge base id
descriptiontextDescription
impressionsintImpressions
ticketsintNumber of created tickets
languagetextLanguage
last_display_timedatetimeLast display time
last_display_urltextLast display url
onlinecodehtmlOnline code
onlinecode_ieoldhtmlOnline code for Internet Explorer 9.0 or older.
offlinecodehtmlOffline code
offlinecode_ieoldhtmlOffline code for Internet Explorer 9.0 or older.
onlinecode_csshtmlOnline CSS code
onlinecode_ieold_csshtmlOnline CSS code for Internet Explorer 9.0 or older.
offlinecode_csshtmlOffline CSS code
offlinecode_ieold_CSShtmlOffline CSS code for Internet Explorer 9.0 or older.
integration_codehtmlIntegration HTML code
attributeslistWidget attributes
Field attributes has 3 columns:
nametextAttribute name
sectiontextAttribute section
valuetextAttribute Value
form_fieldslistWidget form fields
Field form_fields has 6 columns:
formidtextWidget form id
codetextWidget form field code
nametextWidget form field name
rtypetextWidget form field type
rstatustextWidget form field status
availablevaluestextWidget form field available values

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <contactwidgetid>widget1</contactwidgetid>
 <name>widget1</name>
 <provide>B</provide>
 <departmentid>dep00002</departmentid>
 <rtype>C</rtype>
 <usecode>N</usecode>
 <status>F</status>
 <kb_id>kb00002</kb_id>
 <description>description of widget no 1</description>
 <impressions>688</impressions>
 <tickets>24</tickets>
 <language>en-US</language>
 <last_display_time>2017-06-02 06:08:24</last_display_time>
 <last_display_url>www.widget02.com</last_display_url>
 <onlinecode>
  <![CDATA[<span>Example Html online code</span>]]>
 </onlinecode>
 <onlinecode_ieold>
  <![CDATA[<span>Example Html online ieold code</span>]]>
 </onlinecode_ieold>
 <offlinecode>
  <![CDATA[<span>Example Html offline code</span>]]>
 </offlinecode>
 <offlinecode_ieold>
  <![CDATA[<span>Example Html offline ieold code</span>]]>
 </offlinecode_ieold>
 <onlinecode_css>
  <![CDATA[]]>
 </onlinecode_css>
 <onlinecode_ieold_css>
  <![CDATA[]]>
 </onlinecode_ieold_css>
 <offlinecode_css>
  <![CDATA[]]>
 </offlinecode_css>
 <offlinecode_ieold_CSS>
  <![CDATA[]]>
 </offlinecode_ieold_CSS>
 <integration_code>
  <![CDATA[<script type="text/javascript">
  (function(d, src, c) { var t=d.scripts[d.scripts.length - 1],s=d.createElement('script');s.id='la_x2s6df8d';s.async=true;s.src=src;s.onload=s.onreadystatechange=function(){var rs=this.readyState;if(rs&&(rs!='complete')&&(rs!='loaded')){return;}c(this);};t.parentElement.insertBefore(s,t.nextSibling);})(document,
  '//localhost/LiveAgent/LiveAgent/server/scripts/track.js',
  function(e){ LiveAgent.createButton('widget02', e); });
 </script>]]>
</integration_code>
<attributes/>
<form_fields/>
</response>
{
  "response":{
    "contactwidgetid":"widget1",
    "name":"widget1",
    "provide":"B",
    "departmentid":"dep00002",
    "rtype":"C",
    "usecode":"N",
    "status":"F",
    "kb_id":"kb00002",
    "description":"description of widget no 1",
    "impressions":"688",
    "tickets":"24",
    "language":"en-US",
    "last_display_time":"2017-06-02 06:08:24",
    "last_display_url":"www.widget02.com",
    "onlinecode":"<span>Example Html online code<\/span>",
    "onlinecode_ieold":"<span>Example Html online ieold code<\/span>",
    "offlinecode":"<span>Example Html offline code<\/span>",
    "offlinecode_ieold":"<span>Example Html offline ieold code<\/span>",
    "onlinecode_css":null,
    "onlinecode_ieold_css":null,
    "offlinecode_css":null,
    "offlinecode_ieold_CSS":null,
    "integration_code":"<script type=\"text\/javascript\">\n(function(d,
     src,
     c) {
       var t=d.scripts[
        d.scripts.length - 1
      ],
      s=d.createElement('script');s.id='la_x2s6df8d';s.async=true;s.src=src;s.onload=s.onreadystatechange=function(){
        var rs=this.readyState;if(rs&&(rs!='complete')&&(rs!='loaded')){
          return;
        }c(this);
      };t.parentElement.insertBefore(s,
      t.nextSibling);
    })(document,
    \n'\/\/localhost\/LiveAgent\/LiveAgent\/server\/scripts\/track.js',
    \nfunction(e){
       LiveAgent.createButton('widget02',
       e); 
    });\n<\/script>",
    "attributes":[
      
    ],
    "form_fields":[
      
    ]
  }
}


Add widget

Avaliable from application version: 4.25.2.4

Example call
  • General
  • PHP
POST
  http://example.com/api/widgets
Note: You must send parameters for this call as POST fields.
<?php
$ch = curl_init();
$curl_post_data = array(
        /* These are mandatory params */
        'name' => '...',
        'provide' => '...',
        'departmentid' => '...',
        'rtype' => '...',
        'usecode' => '...',
        'status' => '...',
        'attributes' => '...',
        'apikey' => '...',
        /* ...and these are optional */
        'kb_id' => '...',
        'description' => '...',
        'language' => '...',
        'last_display_time' => '...',
        'last_display_url' => '...',
        'onlinecode' => '...',
        'onlinecode_ieold' => '...',
        'offlinecode' => '...',
        'offlinecode_ieold' => '...',
        'onlinecode_css' => '...',
        'onlinecode_ieold_css' => '...',
        'offlinecode_css' => '...',
        'offlinecode_ieold_css' => '...',
        'form_fields' => '...',
);
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/widgets");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curl_post_data);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
nametextWidget name
providetextProvides services
departmentidtextDepartment ID
rtypeconstlistType (Possible values: C - Chat button, N - Cloopen button, O - Contact form, U - Invitation html, M - Invitation image, G - Chat window, B - Contact form, K - Search, W - Knowledge base, S - Suggest button, P - Twilio button)
usecodeconstlistUse code (Possible values: N - Online, F - Offline, B - Both)
statusconstlistStatus (Possible values: A - Active, C - Create, I - Inactive, F - Offline, N - Online)
attributestextWidget attributes
apikeytextAPI key

Optional parameters

NameTypeDescription
kb_idtextKnowledge base ID
descriptiontextDescription
languagetextLanguage
last_display_timetextLast display time
last_display_urltextLast display url
onlinecodetextOnline code
onlinecode_ieoldtextOnline code ieold
offlinecodetextOffline code
offlinecode_ieoldtextOffline code ieold
onlinecode_csstextOnline CSS code
onlinecode_ieold_csstextOnline CSS code ieold
offlinecode_csstextOffline CSS code
offlinecode_ieold_csstextOffline CSS code ieold
form_fieldstextWidget form fields


Call response description

Return fields

NameTypeDescription
contactwidgetidtextWidget contact id
nametextWidget name
providetextProvides services
departmentidtextDepartment id
rtypeconstlistType (Possible values: C - Chat button, N - Cloopen button, O - Contact form, U - Invitation html, M - Invitation image, G - Chat window, B - Contact form, K - Search, W - Knowledge base, S - Suggest button, P - Twilio button)
usecodeconstlistUsecode (Possible values: N - Online, F - Offline, B - Both)
statusconstlistStatus (Possible values: A - Active, C - Create, I - Inactive, F - Offline, N - Online)
kb_idtextKnowledge base id
descriptiontextDescription
impressionsintImpressions
ticketsintNumber of created tickets
languagetextLanguage
last_display_timedatetimeLast display time
last_display_urltextLast display url
onlinecodehtmlOnline code
onlinecode_ieoldhtmlOnline code for Internet Explorer 9.0 or older.
offlinecodehtmlOffline code
offlinecode_ieoldhtmlOffline code for Internet Explorer 9.0 or older.
onlinecode_csshtmlOnline CSS code
onlinecode_ieold_csshtmlOnline CSS code for Internet Explorer 9.0 or older.
offlinecode_csshtmlOffline CSS code
offlinecode_ieold_CSShtmlOffline CSS code for Internet Explorer 9.0 or older.
integration_codehtmlIntegration HTML code
attributeslistWidget attributes
Field attributes has 3 columns:
nametextAttribute name
sectiontextAttribute section
valuetextAttribute Value
form_fieldslistWidget form fields
Field form_fields has 6 columns:
formidtextWidget form id
codetextWidget form field code
nametextWidget form field name
rtypetextWidget form field type
rstatustextWidget form field status
availablevaluestextWidget form field available values

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <contactwidgetid>widget1</contactwidgetid>
 <name>widget1</name>
 <provide>B</provide>
 <departmentid>dep00002</departmentid>
 <rtype>C</rtype>
 <usecode>N</usecode>
 <status>F</status>
 <kb_id>kb00002</kb_id>
 <description>description of widget no 1</description>
 <impressions>688</impressions>
 <tickets>24</tickets>
 <language>en-US</language>
 <last_display_time>2017-06-02 06:08:24</last_display_time>
 <last_display_url>www.widget02.com</last_display_url>
 <onlinecode>
  <![CDATA[<span>Example Html online code</span>]]>
 </onlinecode>
 <onlinecode_ieold>
  <![CDATA[<span>Example Html online ieold code</span>]]>
 </onlinecode_ieold>
 <offlinecode>
  <![CDATA[<span>Example Html offline code</span>]]>
 </offlinecode>
 <offlinecode_ieold>
  <![CDATA[<span>Example Html offline ieold code</span>]]>
 </offlinecode_ieold>
 <onlinecode_css>
  <![CDATA[]]>
 </onlinecode_css>
 <onlinecode_ieold_css>
  <![CDATA[]]>
 </onlinecode_ieold_css>
 <offlinecode_css>
  <![CDATA[]]>
 </offlinecode_css>
 <offlinecode_ieold_CSS>
  <![CDATA[]]>
 </offlinecode_ieold_CSS>
 <integration_code>
  <![CDATA[<script type="text/javascript">
  (function(d, src, c) { var t=d.scripts[d.scripts.length - 1],s=d.createElement('script');s.id='la_x2s6df8d';s.async=true;s.src=src;s.onload=s.onreadystatechange=function(){var rs=this.readyState;if(rs&&(rs!='complete')&&(rs!='loaded')){return;}c(this);};t.parentElement.insertBefore(s,t.nextSibling);})(document,
  '//localhost/LiveAgent/LiveAgent/server/scripts/track.js',
  function(e){ LiveAgent.createButton('widget02', e); });
 </script>]]>
</integration_code>
<attributes/>
<form_fields/>
</response>
{
  "response":{
    "contactwidgetid":"widget1",
    "name":"widget1",
    "provide":"B",
    "departmentid":"dep00002",
    "rtype":"C",
    "usecode":"N",
    "status":"F",
    "kb_id":"kb00002",
    "description":"description of widget no 1",
    "impressions":"688",
    "tickets":"24",
    "language":"en-US",
    "last_display_time":"2017-06-02 06:08:24",
    "last_display_url":"www.widget02.com",
    "onlinecode":"<span>Example Html online code<\/span>",
    "onlinecode_ieold":"<span>Example Html online ieold code<\/span>",
    "offlinecode":"<span>Example Html offline code<\/span>",
    "offlinecode_ieold":"<span>Example Html offline ieold code<\/span>",
    "onlinecode_css":null,
    "onlinecode_ieold_css":null,
    "offlinecode_css":null,
    "offlinecode_ieold_CSS":null,
    "integration_code":"<script type=\"text\/javascript\">\n(function(d,
     src,
     c) {
       var t=d.scripts[
        d.scripts.length - 1
      ],
      s=d.createElement('script');s.id='la_x2s6df8d';s.async=true;s.src=src;s.onload=s.onreadystatechange=function(){
        var rs=this.readyState;if(rs&&(rs!='complete')&&(rs!='loaded')){
          return;
        }c(this);
      };t.parentElement.insertBefore(s,
      t.nextSibling);
    })(document,
    \n'\/\/localhost\/LiveAgent\/LiveAgent\/server\/scripts\/track.js',
    \nfunction(e){
       LiveAgent.createButton('widget02',
       e); 
    });\n<\/script>",
    "attributes":[
      
    ],
    "form_fields":[
      
    ]
  }
}


Change widget

Avaliable from application version: 4.25.2.4

Example call
  • General
  • PHP
PUT
  http://example.com/api/widgets/[contactwidgetid]
Note: You must send parameters for this call as PUT fields.
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/widgets/[contactwidgetid]");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
$curl_put_data = array(
        /* These are mandatory params */
        'name' => '...',
        'provide' => '...',
        'departmentid' => '...',
        'rtype' => '...',
        'usecode' => '...',
        'status' => '...',
        'attributes' => '...',
        'form_fields' => '...',
        'apikey' => '...',
        /* ...and these are optional */
        'kb_id' => '...',
        'description' => '...',
        'language' => '...',
        'last_display_time' => '...',
        'last_display_url' => '...',
        'onlinecode' => '...',
        'onlinecode_ieold' => '...',
        'offlinecode' => '...',
        'offlinecode_ieold' => '...',
        'onlinecode_css' => '...',
        'onlinecode_ieold_css' => '...',
        'offlinecode_css' => '...',
        'offlinecode_ieold_css' => '...',
);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($curl_put_data));
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
[contactwidgetid]text
nametextWidget name
providetextProvides services
departmentidtextDepartment ID
rtypeconstlistType (Possible values: C - Chat button, N - Cloopen button, O - Contact form, U - Invitation html, M - Invitation image, G - Chat window, B - Contact form, K - Search, W - Knowledge base, S - Suggest button, P - Twilio button)
usecodeconstlistUse code (Possible values: N - Online, F - Offline, B - Both)
statusconstlistStatus (Possible values: A - Active, C - Create, I - Inactive, F - Offline, N - Online)
attributesjsonWidget attributes
form_fieldsjsonWidget form fields
apikeytextAPI key

Optional parameters

NameTypeDescription
kb_idtextKnowledge base ID
descriptiontextDescription
languagetextLanguage
last_display_timetextLast display time
last_display_urltextLast display url
onlinecodetextOnline code
onlinecode_ieoldtextOnline code ieold
offlinecodetextOffline code
offlinecode_ieoldtextOffline code ieold
onlinecode_csstextOnline CSS code
onlinecode_ieold_csstextOnline CSS code ieold
offlinecode_csstextOffline CSS code
offlinecode_ieold_csstextOffline code CSS ieold


Call response description

Return fields

NameTypeDescription
contactwidgetidtextWidget contact id
nametextWidget name
providetextProvides services
departmentidtextDepartment id
rtypeconstlistType (Possible values: C - Chat button, N - Cloopen button, O - Contact form, U - Invitation html, M - Invitation image, G - Chat window, B - Contact form, K - Search, W - Knowledge base, S - Suggest button, P - Twilio button)
usecodeconstlistUsecode (Possible values: N - Online, F - Offline, B - Both)
statusconstlistStatus (Possible values: A - Active, C - Create, I - Inactive, F - Offline, N - Online)
kb_idtextKnowledge base id
descriptiontextDescription
impressionsintImpressions
ticketsintNumber of created tickets
languagetextLanguage
last_display_timedatetimeLast display time
last_display_urltextLast display url
onlinecodehtmlOnline code
onlinecode_ieoldhtmlOnline code for Internet Explorer 9.0 or older.
offlinecodehtmlOffline code
offlinecode_ieoldhtmlOffline code for Internet Explorer 9.0 or older.
onlinecode_csshtmlOnline CSS code
onlinecode_ieold_csshtmlOnline CSS code for Internet Explorer 9.0 or older.
offlinecode_csshtmlOffline CSS code
offlinecode_ieold_CSShtmlOffline CSS code for Internet Explorer 9.0 or older.
integration_codehtmlIntegration HTML code
attributeslistWidget attributes
Field attributes has 3 columns:
nametextAttribute name
sectiontextAttribute section
valuetextAttribute Value
form_fieldslistWidget form fields
Field form_fields has 6 columns:
formidtextWidget form id
codetextWidget form field code
nametextWidget form field name
rtypetextWidget form field type
rstatustextWidget form field status
availablevaluestextWidget form field available values

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <contactwidgetid>widget1</contactwidgetid>
 <name>widget1</name>
 <provide>B</provide>
 <departmentid>dep00002</departmentid>
 <rtype>C</rtype>
 <usecode>N</usecode>
 <status>F</status>
 <kb_id>kb00002</kb_id>
 <description>description of widget no 1</description>
 <impressions>688</impressions>
 <tickets>24</tickets>
 <language>en-US</language>
 <last_display_time>2017-06-02 06:08:24</last_display_time>
 <last_display_url>www.widget02.com</last_display_url>
 <onlinecode>
  <![CDATA[<span>Example Html online code</span>]]>
 </onlinecode>
 <onlinecode_ieold>
  <![CDATA[<span>Example Html online ieold code</span>]]>
 </onlinecode_ieold>
 <offlinecode>
  <![CDATA[<span>Example Html offline code</span>]]>
 </offlinecode>
 <offlinecode_ieold>
  <![CDATA[<span>Example Html offline ieold code</span>]]>
 </offlinecode_ieold>
 <onlinecode_css>
  <![CDATA[]]>
 </onlinecode_css>
 <onlinecode_ieold_css>
  <![CDATA[]]>
 </onlinecode_ieold_css>
 <offlinecode_css>
  <![CDATA[]]>
 </offlinecode_css>
 <offlinecode_ieold_CSS>
  <![CDATA[]]>
 </offlinecode_ieold_CSS>
 <integration_code>
  <![CDATA[<script type="text/javascript">
  (function(d, src, c) { var t=d.scripts[d.scripts.length - 1],s=d.createElement('script');s.id='la_x2s6df8d';s.async=true;s.src=src;s.onload=s.onreadystatechange=function(){var rs=this.readyState;if(rs&&(rs!='complete')&&(rs!='loaded')){return;}c(this);};t.parentElement.insertBefore(s,t.nextSibling);})(document,
  '//localhost/LiveAgent/LiveAgent/server/scripts/track.js',
  function(e){ LiveAgent.createButton('widget02', e); });
 </script>]]>
</integration_code>
<attributes/>
<form_fields/>
</response>
{
  "response":{
    "contactwidgetid":"widget1",
    "name":"widget1",
    "provide":"B",
    "departmentid":"dep00002",
    "rtype":"C",
    "usecode":"N",
    "status":"F",
    "kb_id":"kb00002",
    "description":"description of widget no 1",
    "impressions":"688",
    "tickets":"24",
    "language":"en-US",
    "last_display_time":"2017-06-02 06:08:24",
    "last_display_url":"www.widget02.com",
    "onlinecode":"<span>Example Html online code<\/span>",
    "onlinecode_ieold":"<span>Example Html online ieold code<\/span>",
    "offlinecode":"<span>Example Html offline code<\/span>",
    "offlinecode_ieold":"<span>Example Html offline ieold code<\/span>",
    "onlinecode_css":null,
    "onlinecode_ieold_css":null,
    "offlinecode_css":null,
    "offlinecode_ieold_CSS":null,
    "integration_code":"<script type=\"text\/javascript\">\n(function(d,
     src,
     c) {
       var t=d.scripts[
        d.scripts.length - 1
      ],
      s=d.createElement('script');s.id='la_x2s6df8d';s.async=true;s.src=src;s.onload=s.onreadystatechange=function(){
        var rs=this.readyState;if(rs&&(rs!='complete')&&(rs!='loaded')){
          return;
        }c(this);
      };t.parentElement.insertBefore(s,
      t.nextSibling);
    })(document,
    \n'\/\/localhost\/LiveAgent\/LiveAgent\/server\/scripts\/track.js',
    \nfunction(e){
       LiveAgent.createButton('widget02',
       e); 
    });\n<\/script>",
    "attributes":[
      
    ],
    "form_fields":[
      
    ]
  }
}



Overview


Chats

Avaliable from application version: 4.17.1.3

Example call
  • General
  • PHP
GET
  http://example.com/api/chats/overview
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/chats/overview?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
departmenttextDepartment identifier


Call response description

Return fields

NameTypeDescription
chatsOverviewlistOverview of chats
Field chatsOverview has 4 columns:
visitorsintNumber of visitors
chatsintNumber of running chats
queueintNumber of chats in queue
agentsintNumber of agents available for chat

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <chatsOverview>
  <item>
   <visitors>26</visitors>
   <chats>8</chats>
   <queue>2</queue>
   <agents>5</agents>
  </item>
 </chatsOverview>
</response>
{
  "response":{
    "chatsOverview":[
      {
        "visitors":26,
        "chats":8,
        "queue":2,
        "agents":5
      }
    ]
  }
}


Phone calls

Avaliable from application version: 4.17.1.3

Example call
  • General
  • PHP
GET
  http://example.com/api/calls/overview
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://example.com/api/calls/overview?&apikey=value");
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$curl_response=curl_exec($ch);
if ($curl_response === false) {
    $info = curl_error($ch);
    curl_close($ch);
    die("error occured during curl exec. Additioanl info: " . var_export($info));
}
curl_close($ch);
/* process $curl_response here */
print_r(json_decode($curl_response));

Mandatory parameters

NameTypeDescription
apikeytextAPI key

Optional parameters

NameTypeDescription
departmenttextDepartment identifier


Call response description

Return fields

NameTypeDescription
callsOverviewlistOverview of calls
Field callsOverview has 3 columns:
runningintNumber of running calls
ringingintNumber of ringing calls
inqueueintNumber of calls in queue

Example responses
  • XML
  • JSON
<?xml version='1.0' encoding='utf-8'?>
<response>
 <callsOverview>
  <item>
   <running>3</running>
   <ringing>1</ringing>
   <inqueue>5</inqueue>
  </item>
 </callsOverview>
</response>
{
  "response":{
    "callsOverview":[
      {
        "running":3,
        "ringing":1,
        "inqueue":5
      }
    ]
  }
}