Label

This Api can be used to add, edit ,Delete labels. label properties includes name and color.

Add new label

Brief

URL Syntax /{_locale}/api/labels.{_format}
Method POST
Example POST /api/labels.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true label name

Request Content Example

            
{ 
    "name": "myLabel"
}            
Status: 200                
{
    "message": "Success ! Label created successfully.",
    "label": {
        "id": 91,
        "name": "myLabel",
        "color": null,
        "labelUser": 3241
    }
}                

Edit Existing Label

Brief

URL Syntax /{_locale}/api/label/{id}.{_format}
Method PUT
Example PUT /api/label/83.json

Requirements

Name Requirement Type Description
id \d+ integer label id
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string false label name

Request Content Example

{ 
    "name": "labu",
    "color": "#fff"
}            
Status: 200                
{
    "label": {
        "id": 91,
        "name": "labu",
        "color": "#fff",
        "labelUser": 3241
    },
    "message": "Success ! Label updated successfully."
}

Remove Label

Brief

URL Syntax /{_locale}/api/label/{id}.{_format}
Method DELETE
Example DELETE /api/label/87.json

Requirements

Name Requirement Type Description
id \d+ integer label id
_format json|html
_locale en|fr|it|de
Status: 200
{
    "message": "Success ! Label removed successfully."
}

Api Clients

UVdesk provides open source API clients for it’s api. Api client for any popular  language can be created using Swagger Codegen for uvdesk.

Currently supported API clients for uvdesk using swagger codegen are:

ActionScript, Apex, Bash, C# (.net 2.0, 4.0 or later), C++ (cpprest, Qt5, Tizen), Clojure, Dart, Elixir, Eiffel, Go, Groovy, Haskell, Java (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx), Kotlin, Node.js (ES5, ES6, AngularJS with Google Closure Compiler annotations) Objective-C, Perl, PHP, PowerShell, Python, Ruby, Scala, Swift (2.x, 3.x, 4.x), Typescript (Angular1.x, Angular2.x, Fetch, jQuery, Node)

Where to get Api Clients?

Visit Swagger
https://app.swaggerhub.com/apis/uvdesk/uvdesk/1.0.0

Navigate to the top right panel, click Download icon >> Client >> Select your Language and download api client for uvdesk api.
Replace subdomain.uvdesk.com in generated code with your uvdesk company URL.

Alternatively:

After login at https://app.swaggerhub.com/apis/uvdesk/uvdesk/1.0.0, fork api, then in swagger editor replace subdomain.uvdesk.com with your uvdesk company URL.
Then download uvdesk api client using swagger codegen (download button in the top right corner.)

Example: if your company URL on uvdesk is abc.uvdesk.com/ then replace subdomain.uvdesk.com to abc.uvdesk.com.


Status Codes

Status Code of response reflects status, if request was successful or not. uvdesk api uses following status codes:

Status Code Description
200 Returned when successful request
400 Returned when Bad Request like invalid data provided
401 Returned when access is unauthorized or helpdesk plan expired
403 Returned when the Access is forbidden
404 Returned when the page/resource is not found
409 Returned when the conflict during editing resource

Curl Example for Create Ticket with attachment

$access_token = 'ACCESS_TOKEN_LIKE_4578845FAB4D4SD';
$company_domain = 'your_Company_Domain';
// Return  tickets 
$url = 'https://'.$company_domain.'.uvdesk.com/en/api/tickets.json';
 
//create file object from uploaded file
$fileObject = $_FILES['user_file];
$curl = curl_init();
 
curl_setopt_array($curl, array(
    CURLOPT_URL => $url,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\n4\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\ncustomer name\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"from\"\r\n\r\nnewbie@gmail.com\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reply\"\r\n\r\nreply\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"subject\"\r\n\r\nsubject\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"attachments[]\"; filename=\"$fileObject\"\r\nContent-Type: false\r\n\r\n\r\n-----011000010111000001101001--",
    CURLOPT_HTTPHEADER => array(
    "authorization: Bearer ".$access_token,
    "content-type: multipart/form-data; boundary=---011000010111000001101001"
    ),
));
 
$response = curl_exec($curl);
$err = curl_error($curl);
 
curl_close($curl);
 
if ($err) {
    echo "cURL Error #:" . $err;
} else {
    echo $response;
}

Postman Example for Create Ticket with attachment

Headers

Body 

Curl Example for Ticket Create with Custom Field

$access_token = 'ACCESS_TOKEN_LIKE_4578845FAB4D4SD';
$company_domain = 'your_Company_Domain';
//ticket url 
$url = 'https://'.$company_domain.'.uvdesk.com/en/api/tickets.json';
$data = json_encode(array(
     "name" => "Customer name ...",
     "from" => "email@myfav.com",
     "subject" => "file Help",
     "reply" => "query description message goes here ...",
     "type" => "4", // ticket type id
     "customFields" => array("122"=> "http://www.webkul.com") // 122 being customFields' Id
));
$ch = curl_init($url);
$headers = array(
    'Authorization: Bearer '.$access_token,
    'Content-type: application/json'
);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
$info = curl_getinfo($ch);
$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$headers = substr($server_output, 0, $header_size);
$response = substr($server_output, $header_size);
if($info['http_code'] == 200 || $info['http_code'] == 201) {
    echo "Ticket created successfully, the response is given below \n";
    echo "Response Headers are \n";
    echo $headers."\n";
    echo "Response Body \n";
    echo $response." \n";
} elseif($info['http_code'] == 400) {
    echo "Error, request data not valid. (http-code: 400) \n";
    echo "Response :".$response." \n";
} elseif($info['http_code'] == 404) {
    echo "Error, resource not found (http-code: 404) \n";
} else {
    echo "Error, HTTP Status Code : " . $info['http_code'] . "\n";
    echo "Headers are ".$headers;
    echo "Response are ".$response;
}
curl_close($ch);

Curl Example for Create Ticket (no customFields)

$access_token = 'ACCESS_TOKEN_LIKE_4578845FAB4D4SD';
$company_domain = 'your_Company_Domain';
// ticket url 
$url = 'https://'.$company_domain.'.uvdesk.com/en/api/tickets.json';
 
$data = json_encode(array(
    "name" => "Customer name ...",
    "from" => "email@myfav.com",
    "subject" => "Need Help",
    "reply" => "query description message goes here ...",
    "type" => "4", // ticket type id
));
$ch = curl_init($url);
$headers = array(
    'Authorization: Bearer '.$access_token,
    'Content-type: application/json'
);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
$info = curl_getinfo($ch);
$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$headers = substr($server_output, 0, $header_size);
$response = substr($server_output, $header_size);
if($info['http_code'] == 200 || $info['http_code'] == 201) {
    echo "Ticket created successfully, the response is given below \n";
    echo "Response Headers are \n";
    echo $headers."\n";
    echo "Response Body \n";
    echo $response." \n";
} elseif($info['http_code'] == 400) {
    echo "Error, request data not valid. (http-code: 400) \n";
    echo "Response :".$response." \n";
} elseif($info['http_code'] == 404) {
    echo "Error, resource not found (http-code: 404) \n";
} else {
    echo "Error, HTTP Status Code : " . $info['http_code'] . "\n";
    echo "Headers are ".$headers;
    echo "Response are ".$response;
}
curl_close($ch);

Curl Example for View Ticket List

$access_token = 'ACCESS_TOKEN_LIKE_4578845FAB4D4SD';
$company_domain = 'your_Company_Domain';
// Return  tickets 
$url = 'https://'.$company_domain.'.uvdesk.com/en/api/tickets.json';
$ch = curl_init($url);
$headers = array(
    'Authorization: Bearer '.$access_token,
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
$info = curl_getinfo($ch);
$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$headers = substr($output, 0, $header_size);
$response = substr($output, $header_size);
if($info['http_code'] == 200) {
    echo "Tickets fetched successfully.\n";
    echo "Response Headers are \n";
    echo $headers."\n";
    echo "Response Body \n";
    echo $response." \n";
} else if($info['http_code'] == 404) {
    echo "Error, resource not found (http-code: 404) \n";
} else {
    echo "Headers are ".$headers;
    echo "Response are ".$response;
}
curl_close($ch);

Filtering

This API could be used to get search filter options. These filters include group, the team(subGroups), agent, customer, tag, status, priority, type, mailbox, source. Filters data can be used for filtering and to show partial data.

Get filter data

Get Filter data for API like Group, Team, Type, Priority, Tag, mailbox, agent, customer, source, userdata.

Brief

URL Syntax /{_locale}/api/filters.{_format}
Method GET
Example GET /api/filters.json?group=1&status=1&priority=1

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Filters

Name Information
group Datatype integer
Description to get group data
usergroup Datatype integer
Description to get group data with corresponding subgroups
team Datatype integer
Description to get team data
type Datatype integer
Description to get type data
priority Datatype integer
Description to get priority data
tag Datatype integer
Description to get tag data
mailbox Datatype integer
Description to get mailbox data
agent Datatype integer
Description to get agent data
customer Datatype integer
Description to get customer data
source Datatype integer
Description to get source data
userdata Datatype integer
Description to get current user’s data like roles

Example Url

GET /en/api/filters.json?group=1&status=1&priority=1&source=1
{
  "group": [
    {
      "id": 835,
      "name": "Default"
    }
  ],
  "status": [
    {
      "id": 1,
      "name": "Open",
      "description": "Open",
      "color": "#337ab7",
      "sortOrder": 1
    },
    {
      "id": 2,
      "name": "Pending",
      "description": "Pending",
      "color": "#d9534f",
      "sortOrder": 2
    },
    {
      "id": 6,
      "name": "Answered",
      "description": "Answered",
      "color": "#F1BB52",
      "sortOrder": 3
    },
    {
      "id": 3,
      "name": "Resolved",
      "description": "Resolved",
      "color": "#5cb85c",
      "sortOrder": 4
    },
    {
      "id": 4,
      "name": "Closed",
      "description": "Closed",
      "color": "#767676",
      "sortOrder": 5
    },
    {
      "id": 5,
      "name": "Spam",
      "description": "Spam",
      "color": "#00A1F2",
      "sortOrder": 6
    }
  ],
  "priority": [
    {
      "id": 1,
      "name": "Low",
      "description": "Low",
      "color": "#5cb85c"
    },
    {
      "id": 2,
      "name": "Medium",
      "description": "Medium",
      "color": "#337ab7"
    },
    {
      "id": 3,
      "name": "High",
      "description": "High",
      "color": "#f0ad4e"
    },
    {
      "id": 4,
      "name": "Urgent",
      "description": "Urgent",
      "color": "#d9534f"
    }
  ],
  "source": {
    "email": "Email",
    "website": "Website",
    "facebook": "Facebook",
    "twitter": "Twitter"
  }
}

Saved Reply

Get Savedreply collection

Brief

URL Syntax /{_locale}/api/saved-replys.{_format}
Method GET
Example GET /api/savedreplys.json?search=and

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Filters

Name Information
sort Datatype string Pattern (id|name) ASC|DESC Default id
page Datatype int Default 1
search Datatype string Description search savedReply by name
[
  {
    "id": 710,
    "companyId": 1,
    "templateId": null,
    "name": "department msg",
    "subject": null,
    "isPredefind": null,
    "templateFor": null,
    "message": "

Hi %{ticket.name.first},

Your ticket #%{ticket.number} created on %{ticket.create_date} is in %{ticket.dept.name} department.

\n”, “messageInline”: null }, { “id”: 709, “companyId”: 1, “templateId”: null, “name”: “saved reply for sending message”, “subject”: null, “isPredefind”: null, “templateFor”: null, “message”: “thank for your support”, “messageInline”: null } ]

Add Saved Reply

Brief

URL Syntax /{_locale}/api/saved-replys.{_format}
Method POST
Example POST /api/saved-replys.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true name of reply
message string true message (may be in html format)

Post Data Example

            
{
	"name": "saved reply for sending message",
	"message": "thank for your support"
}
Status: 200                
{
  "msg": "Success! Saved Reply has been added successfully.",
  "id": 796
}

Edit Saved reply

Brief

URL Syntax /{_locale}/api/saved-reply/{template}.{_format}
Method PUT
Example PUT /api/saved-reply/12.json

Requirements

Name Requirement Type Description
template \d+ integer saved Reply id
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true name of reply
message string true message (may be in html format)

Post Data Example

{
    "name":"edited saved reply",
    "message":"thanks for your support <\/p>{%ticket.status%}<\/p>" 
}
Status: 200
{
  "msg": "Success! Saved Reply has been updated successfully.",
  "id": 709
}

Delete existing saved Reply

Brief

URL Syntax /{_locale}/api/saved-reply/{template}.{_format}
Method DELETE
Example DELETE /api/savedreply/15.json

Requirements

Name Requirement Type Description
id \d integer saved Reply id
id \d
_format json|html
_locale en|fr|it|de
Status: 200                
{
  "message": "Success! Saved Reply has been deleted successfully."
}

Email Template

Returns a collection of Email-Templates

Brief

URL Syntax /{_locale}/api/email-templates.{_format}
Method GET
Example GET /api/email-templates.json?page=2

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Filters

Name Information
sort Datatype string Pattern (id|name) ASC|DESC Default id
page Datatype int Default 1
search Datatype string Description search email-Templates by name
Status: 200                
[
  {
    "id": 796,
    "name": "emailTemplateName",
    "defaultTemplate": false
  },
  {
    "id": 151,
    "name": "template name",
    "defaultTemplate": false
  },
  {
    "id": 147,
    "name": "def Temp",
    "defaultTemplate": false
  },
  {
    "id": 146,
    "name": "reply",
    "defaultTemplate": false
  },
  {
    "id": 25,
    "name": "Holi Vacation",
    "defaultTemplate": false
  },
  {
    "id": 24,
    "name": "Ticket Assign Group",
    "defaultTemplate": false
  },
  {
    "id": 23,
    "name": "Ticket Generate Success Mail For Customer",
    "defaultTemplate": true
  },
  {
    "id": 14,
    "name": "Agent Forgot Password",
    "defaultTemplate": true
  },
  {
    "id": 11,
    "name": "Member Reply in Task",
    "defaultTemplate": true
  }
]

Add email-template

Brief

URL Syntax /{_locale}/api/email-template/{template}.{_format}
Method POST
Example POST /api/email-templates.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de
template

Parameters

Parameter Type Required Description
name string true name of reply
subject string true subject of reply
message string true message (may be in html format, can contain placeholders like {%ticket.id%})

Post Data Example

{ 
    "name": "emailTemplateName",
    "subject": "email template for normal users",
    "message": "It is good to use api. you will see this message in your mail, if this template is used." 
}
Status: 200                
{
  "message": "Success! Template has been added successfully.",
  "id": 796
}

edit email-template

Brief

URL Syntax /{_locale}/api/email-templates.{_format}
Method POST
Example POST /api/email-templates.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true name of reply
subject string true subject of reply
message string true message (may be in html format, can contain placeholders like {%ticket.id%})

Post Data Example

{ 
    "name": "edited template",
    "subject": "email template for normal users",
    "message": "It is good to use api. you will see this message in your mail, if this template is used." 
}
Status: 200
{
  "message": "Success! Template has been updated successfully.",
  "id": 797
}

Delete email-Template

Brief

URL Syntax /{_locale}/api/email-template/{template}.{_format}
Method DELETE
Example DELETE /api/email-template/4545.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de
Status: 200
{
  "message": "Success! Template has been deleted successfully."
}

Customer

Returns a collection of customers

Brief

URL Syntax /{_locale}/api/customers.{_format}
Method GET
Example GET /api/customers.json?starred=1

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Filters

Name Information
starred Datatype int
isActive Datatype int
sort Datatype string Pattern (CreatedAt|name|email) ASC|DESC Default CreatedAt
page Datatype int Default 1
search Datatype string Description search in all customer’s name and email
Status: 200
{
  "customers": [
    {
      "id": 3238,
      "email": "testuser@zoho.com",
      "smallThumbnail": null,
      "isStarred": null,
      "isActive": true,
      "name": "john rambo",
      "source": "website",
      "count": "6"
    },
    {
      "id": 3091,
      "email": "test.user2@zoho.com",
      "smallThumbnail": null,
      "isStarred": null,
      "isActive": true,
      "name": "jack yo",
      "source": "website",
      "count": "0"
    },
    {
      "id": 3229,
      "email": "gafy@gafy.net",
      "smallThumbnail": null,
      "isStarred": null,
      "isActive": true,
      "name": "gafy frag ",
      "source": "website",
      "count": "7"
    },
    {
      "id": 2997,
      "email": "test32378@gmail.com",
      "smallThumbnail": null,
      "isStarred": null,
      "isActive": true,
      "name": "test test",
      "source": "website",
      "count": "0"
    },
    {
      "id": 3114,
      "email": "picardo46551@zoho.com",
      "smallThumbnail": null,
      "isStarred": null,
      "isActive": true,
      "name": "ankit yadav",
      "source": "website",
      "count": "78"
    },
    {
      "id": 3219,
      "email": "jackma@yahoo.com",
      "smallThumbnail": "https://s3-ap-southeast-1.amazonaws.com/opencart-hd/uvdesk/1/profile_image_9373373365_1515823.jpg",
      "isStarred": null,
      "isActive": true,
      "name": "jack ma",
      "source": "website",
      "count": "7"
    },
    {
      "id": 3214,
      "email": "support@aliabba.com",
      "smallThumbnail": null,
      "isStarred": null,
      "isActive": true,
      "name": "jack ma",
      "source": "website",
      "count": "6"
    },
    {
      "id": 3210,
      "email": "company2@email.com",
      "smallThumbnail": null,
      "isStarred": null,
      "isActive": true,
      "name": "cust name",
      "source": "website",
      "count": "4"
    },
    {
      "id": 3212,
      "email": "zapier@zapier.com",
      "smallThumbnail": null,
      "isStarred": null,
      "isActive": true,
      "name": "Zapier zap",
      "source": "website",
      "count": "31"
    },
    {
      "id": 3211,
      "email": "jhansen@zoho.com",
      "smallThumbnail": null,
      "isStarred": null,
      "isActive": true,
      "name": "Jennifer Hansen",
      "source": "website",
      "count": "15"
    }
  ],
  "pagination_data": {
    "last": 299,
    "current": 1,
    "numItemsPerPage": 10,
    "first": 1,
    "pageCount": 299,
    "totalCount": 2986,
    "pageRange": 5,
    "startPage": 1,
    "endPage": 5,
    "next": 2,
    "pagesInRange": [
      1,
      2,
      3,
      4,
      5
    ],
    "firstPageInRange": 1,
    "lastPageInRange": 5,
    "currentItemCount": 10,
    "firstItemNumber": 1,
    "lastItemNumber": 10,
    "url": "#page/replacePage"
  },
  "customer_count": {
    "all": "2986",
    "starred": "1"
  }
}

View a customer

Brief

URL Syntax /{_locale}/api/customer/{id}.{_format}
Method GET
Example GET /api/customers.json

Requirements

Name Requirement Type Description
id \d+ integer id of customer
_format json|html
_locale en|fr|it|de
Status: 200

{
  "id": 3229,
  "email": "gafy@zoho.net",
  "token": null,
  "profileImage": null,
  "validationCode": "1005794024",
  "isEmailPending": true,
  "timezone": null,
  "data": [
    {
      "id": 3387,
      "companyId": 1,
      "firstName": "john",
      "lastName": "mike",
      "jobTitle": null,
      "createdAt": {
        "date": "2017-03-10 20:44:01",
        "timezone_type": 3,
        "timezone": "Asia/Calcutta"
      },
      "updatedAt": null,
      "isActive": true,
      "isVerified": false,
      "isStarred": null,
      "contactNumber": null,
      "source": "website",
      "facebook": null,
      "twitter": null,
      "signature": null,
      "agentPrivilege": [],
      "defaultFiltering": null,
      "ticketView": null,
      "authorisedClients": [],
      "activityNotifications": null,
      "userRole": {
        "id": 4,
        "role": "ROLE_CUSTOMER",
        "name": "Customer"
      }
    }
  ]
}                

Add/remove star to customer

Brief

URL Syntax /{_locale}/api/customer/{id}.{_format}
Method PATCH
Example PATCH /api/customer/3002.json

Requirements

Name Requirement Type Description
id \d+ integer id of customer
_format json|html
_locale en|fr|it|de
Status: 200

{
  "message": "starred Action Completed successfully"
}                

Edit existing customer

Brief

URL Syntax /{_locale}/api/customer/{id}.{_format}
Method PUT
Example PUT /api/customer/3002.json

Requirements

Name Requirement Type Description
id \d+ integer id of customer
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
email email true email id
firstName string true first name
lastName string true last name
contactNumber string false oontact number of customer (optional)
isActive boolean false Provide value 1 or true to enable customer, else customer will be disabled

Post Data Example

{ 
    "firstName":"zondo",
    "lastName":"cape",
    "email":"zondocape1@gmail.com",
    "contactNumber":"8178593000",
    "isActive":"1"
}
Status: 200

{
  "message": "Success ! Customer saved successfully."
}        

Add new Customer

Add new Customer. Method: POST

Brief

URL Syntax /{_locale}/api/customers.{_format}
Method POST
Example POST /api/customers.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

URL Syntax /{_locale}/api/customer/{id}.{_format}
Method PUT
Example PUT /api/customer/3002.json

Requirements

Name Requirement Type Description
id \d+ integer id of customer
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
email email true email id
firstName string true first name
lastName string true last name
contactNumber string false oontact number of customer (optional)
isActive boolean false Provide value 1 or true to enable customer, else customer will be disabled
{ 
    "firstName":"zondo",
    "lastName":"cape",
    "email":"zondocape1@gmail.com",
    "contactNumber":"8178593000",
    "isActive":"1"
}
Status: 200

{
  "message": "Success! customer added successfully",
  "id": 3243
}               

Delete a given customer

Brief

URL Syntax /{_locale}/api/customer/{id}.{_format}
Method DELETE
Example DELETE /api/customer/2033.json

Requirements

Name Requirement Type Description
id \d+ integer id of customer
_format json|html
_locale en|fr|it|de
Status: 200

{
  "message": "Success ! Customer removed successfully."
}

Solution

This Api can be used to View, Add, Edit, Delete Solution Folder in knowledge base of company.

Get collection of Solution folders

Brief

URL Syntax /{_locale}/api/solutions.{_format}
Method POST
Example POST /api/solutions.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Filters

Name Information
sort Datatype string Pattern (id|name) ASC|DESC Default id
search Datatype string Description search folder by name
{
    "results": [
        {
            "id": 55,
            "name": "FAQ",
            "description": "frequently asked questions",
            "visibility": "public",
            "solutionImage": "",
            "categoriesCount": "0",
            "categories": [],
            "articleCount": "0"
        },
        {
            "id": 53,
            "name": "how to?",
            "description": "ho to?",
            "visibility": "public",
            "solutionImage": "",
            "categoriesCount": "0",
            "categories": [],
            "articleCount": "0"
        },
        {
            "id": 52,
            "name": "uv help",
            "description": "help",
            "visibility": "public",
            "solutionImage": "https://s3-ap-southeast-1.amazonaws.com/opencart-hd/website/1/2017/01/20/5881fa0b251b9.feature-banner.jpg",
            "categoriesCount": "0",
            "categories": [],
            "articleCount": "0"
        },
        {
            "id": 49,
            "name": "code end",
            "description": "folder",
            "visibility": "public",
            "solutionImage": "https://s3-ap-southeast-1.amazonaws.com/opencart-hd/website/1/2017/02/22/58adb23d86568.t-shirt-adidas-adi-trefoil-tee-bluebird-2.jpg",
            "categoriesCount": "0",
            "categories": [],
            "articleCount": "0"
        },
        {
            "id": 32,
            "name": "Our Motto",
            "description": null,
            "visibility": "public",
            "solutionImage": "",
            "categoriesCount": "0",
            "categories": [],
            "articleCount": "0"
        },
        {
            "id": 22,
            "name": "Setting apps",
            "description": null,
            "visibility": "public",
            "solutionImage": "",
            "categoriesCount": "0",
            "categories": [],
            "articleCount": "0"
        },
        {
            "id": 21,
            "name": "Shrink items",
            "description": null,
            "visibility": "public",
            "solutionImage": "",
            "categoriesCount": "0",
            "categories": [],
            "articleCount": "0"
        },
        {
            "id": 20,
            "name": "Dashboard queries",
            "description": null,
            "visibility": "public",
            "solutionImage": "",
            "categoriesCount": "0",
            "categories": [],
            "articleCount": "0"
        },
        {
            "id": 19,
            "name": "Funtoos",
            "description": null,
            "visibility": "public",
            "solutionImage": "",
            "categoriesCount": "0",
            "categories": [],
            "articleCount": "0"
        },
        {
            "id": 6,
            "name": "Virtuemart",
            "description": "Joomla",
            "visibility": "public",
            "solutionImage": "",
            "categoriesCount": "0",
            "categories": [],
            "articleCount": "0"
        }
    ],
    "pagination_data": {
        "last": 1,
        "current": 1,
        "numItemsPerPage": 10,
        "first": 1,
        "pageCount": 1,
        "totalCount": 10,
        "pageRange": 1,
        "startPage": 1,
        "endPage": 1,
        "pagesInRange": [
            1
        ],
        "firstPageInRange": 1,
        "lastPageInRange": 1,
        "currentItemCount": 10,
        "firstItemNumber": 1,
        "lastItemNumber": 10,
        "url": "#page/replacePage"
    }
}                
Edit Solution Folder

Brief

URL Syntax /{_locale}/api/solution/{solution}.{_format}
Method PUT
Example PUT /api/solution/82.json

Requirements

Name Requirement Type Description
solution \d+
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true solution folder name
description string false optional description for solution folder
visibility string true public|private

Request Content Example

                {
                    "name": "faq folder",
                    "description": "new edited folder",
                    "visibility":"private"
                }
Status: 200                
{
    "id": 52,
    "msg": "Success! Folder has been updated successfully."
}

Add a solution Folder

Brief

URL Syntax /{_locale}/api/solutions.{_format}
Method POST
Example POST /api/solutions.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Request Content Data

                {
                    "name":"folderN", 
                    "description":"folder",
                    "visibility":"public"
                }
Status: 200                
{
    "id": 57,
    "msg": "Success! Folder has been created successfully."
}                

Delete Solution Folder

Brief

URL Syntax /{_locale}/api/solution/{solution}.{_format}
Method DELETE
Example DELETE /api/solution/82.json

Requirements

Name Requirement Type Description
solution \d+
_format json|html
_locale en|fr|it|de
Status: 200                
{
    "message": "Success! Folder has been deleted successfully."
}

Mailbox

This Api can be used to View, edit mailbox setting. This api requires Admin Privilege. Admin can easily add any mail box and configure the forwarder in that mailbox.

Returns collection of Mailboxes

Brief

URL Syntax /{_locale}/api/mailboxes.{_format}
Method GET
Example GET /api/mailboxes.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de
{
  "mailboxes": [
    {
      "id": 87,
      "name": "design",
      "email": "design@zoho.com",
      "mailboxEmail": "support.4419u20qbsmy4ph4ptxi@uvdesk.com",
      "isActive": false
    },
    {
      "id": 66,
      "name": "hr",
      "email": "test@zapier.com",
      "mailboxEmail": "support.9um9r6i2lzrpjzam0jlt@uvdesk.com",
      "isActive": false
    },
    {
      "id": 20,
      "name": "Support Mailbox",
      "email": "support@sample.com",
      "mailboxEmail": "support.jgmfvtgocp9ahsr162te@uvdesk.com",
      "isActive": true
    },
    {
      "id": 19,
      "name": "Sales",
      "email": "sales@webkul.com",
      "mailboxEmail": "support.3txj9lkwjfen6g0ywh09@uvdesk.com",
      "isActive": false
    }
  ]
}                

Add Mailbox

Brief

URL Syntax /{_locale}/api/mailboxes.{_format}
Method POST
Example POST /api/mailboxes.json

Requirements

Name Requirement Type Description
id \d+ integer mailbox id, required for: PUT & DELETE
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true mailbox name
email email true mailbox address

Post Data Example

{
    "name":"my Support Mailbox",
    "email": "supportme@email.com"
}
{
  "message": "Success ! Mailbox saved successfully.",
  "id": 89,
  "mailbox": {
    "id": 89,
    "name": "my Support Mailbox",
    "email": "supportme@email.com",
    "mailboxEmail": "support.xhaywv9bizd02r2rck36@uvdesk.com",
    "isActive": 0
  }
}

Delete Mailbox

Brief for DELETE Method

URL Syntax /{_locale}/api/mailbox/{id}.{_format}
Method DELETE
Example DELETE /api/mailbox/8.json

Requirements

Name Requirement Type Description
id \d+ integer mailbox id
_format json|html
_locale en|fr|it|de
Status: 200                
{
  "message": "Success ! Mailbox removed successfully."
}

Edit Mailbox

Brief

URL Syntax /{_locale}/api/mailbox/{id}.{_format}
Method PUT
Example PUT /api/mailbox/8.json

Requirements

Name Requirement Type Description
id \d+ integer mailbox id
_format json|html
_locale en|fr|it|de

Post Data Example

{
    "name":"Support Mailbox",
    "email": "supportme@email.com"
}                
Status: 200                
{
  "message": "Success ! Mailbox updated successfully.",
  "mailbox": {
    "id": 89,
    "name": "Support Mailbox",
    "email": "supportme@email.com",
    "mailboxEmail": "support.xhaywv9bizd02r2rck36@uvdesk.com",
    "isActive": false
  }
}                

Group

This Api can be used to View, add, edit ,Delete groups available in company. The admin can create different agent groups, and arrange/sort/classify agents into different groups.

View collection of Groups

Brief

URL Syntax /{_locale}/api/groups.{_format}
Method GET
Example GET /api/groups.json?sort=ap.name

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Filters

Name Information
sort Datatype string Pattern (ap.createdAt|ap.name) ASC|DESC Default ap.createdAt
isActive Datatype int Description 0|1
search Datatype string Description search
Status: 200
{
    "groups": [
        {
            "id": 835,
            "name": "Default",
            "description": "Default",
            "createdAt": {
                "lastErrors": {
                    "warning_count": 0,
                    "warnings": [],
                    "error_count": 0,
                    "errors": []
                },
                "timezone": {
                    "name": "Asia/Calcutta",
                    "location": {
                        "country_code": "??",
                        "latitude": 0,
                        "longitude": 0,
                        "comments": ""
                    }
                },
                "offset": 19800,
                "timestamp": 1496404792
            },
            "isActive": true,
            "userView": null
        }
    ],
    "pagination_data": {
        "last": 1,
        "current": 1,
        "numItemsPerPage": 10,
        "first": 1,
        "pageCount": 1,
        "totalCount": 1,
        "pageRange": 1,
        "startPage": 1,
        "endPage": 1,
        "pagesInRange": [
            1
        ],
        "firstPageInRange": 1,
        "lastPageInRange": 1,
        "currentItemCount": 1,
        "firstItemNumber": 1,
        "lastItemNumber": 1,
        "url": "#page/replacePage"
    }
}
            

Add Group

Brief

URL Syntax /{_locale}/api/groups.{_format}
Method POST
Example POST /api/groups.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true name
description string true Description

Request Content Data

{
    "name":"group beta",
    "description":"beta group",
    "users":["119","120"],
    "subgroups":["1","2"]
}
            

{
    "message": "Success! Group has been added successfully.",
    "id": 837
}
        
modify Group

Brief

URL Syntax /{_locale}/api/group/{id}.{_format}
Method PUT
Example PUT /api/group/87.json

Requirements

Name Requirement Type Description
id \d+ integer group id
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true name
description string true Description
Request Content Data
{
    "name":"alpha group","description":"desc of group","users":["119","120"],"subgroups":["1","2"]
}
            

Status: 200                
{
    "message": "Success! Group has been updated successfully.",
    "id": 837
}                
            

Delete Group

Delete a existing Group. Method: DELETE

Brief

URL Syntax /{_locale}/api/group/{id}.{_format}
Method DELETE
Example DELETE /api/group/47.json

Requirements

Name Requirement Type Description
id \d+ integer group id
_format json|html
_locale en|fr|it|de
Status: 200                
{
    "message": "Success ! Group removed successfully."
}
            

The UVdesk API correlates with the Representational State Transfer category (REST) that allows to perform several actions like reading, editing, deleting, adding data of the helpdesk system. The resources like tickets, agents, customers can be controlled using API. It also supports CORS ie. Cross Origin Resource Sharing.

The API makes use of five REST Methods i.e GET, POST, UPDATE, PATCH, DELETE. These Method have specific functions as explained below:

Request Method Description
POST: This lets you create any resource like creating ticket for your support request.
GET: This lets you retrieve (read) an item or list of items for example list of tickets.
PUT: This lets you to modify the existing resource such as editing the customer.
PATCH: This command is used for making small changes in the resources like add star to a Ticket.
DELETE : This lets you to permanently remove the resource such as deleting the existing user of the helpdesk.

Process of Authentication:

UVdesk follows OAuth 2.0 to authenticate requests between your app and users. With OAuth2, users can give you access to their UVdesk data without giving up their passwords. Here’s how it works:

Ways to use API:

Create and Manage Access Token from UVdesk-

  • Manually create access tokens from UVdesk , Dashboard >> Profile >> Access Tokens (available for admin, agents).
  • You’ll make requests using your access token. Read more

Create and Manage Access Token from Your App-

  • Generate client credentials for the app from Dashboard >> Api client(available for admin).
  • Use client credential to create and manage Access tokens from your app. Read more

For accessing Api, You need to authenticate first. Access Token is used for Authentication in API, which can be created using any way given above.

Using Access Token

You can provide access token in Authorization header or GET parameter. it is recommended to use access token in Authorization header.
Curl Example:

curl -X GET -H "Authorization: Bearer YourAccessToken "http://companydomain.uvdesk.com/en/api/tickets.json"

Url example: GET /api/tickets.json?access_token=yourtoken
Note: Use access token in secure way. Access token is equivalent to username/password in many ways, don’t share it publicly.

Endpoints

Endpoints are url for accessing specific resource.
Accessing Endpoint without Access token will result in following message with 401 status code:

{
  "error": "access_denied",
  "error_description": "OAuth2 authentication required"
}

URL Syntax is documented with partial resource identifier.
Example:

/{_locale}/api/ticket/{id}.{_format}

Prepend your Uvdesk helpdesk URL to the url syntax to get the full endpoint URL:

https://subdomain.uvdesk.com/en/api/ticket/123.json

Note: Curly braces {}, indicate values you have to supply.
Example: replace {_format} with json

Agent Privilege

This Api can be used to View, Add, Delete Agent privilege(s).

Add privilege

Brief

URL Syntax /{_locale}/api/agent-privileges.{_format}
Method POST
Example POST /api/agent-privileges.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true name
description string true description
privileges array true array of privileges required like ROLE_AGENT_CREATE_TASK

Request Content Data

                { 
                    "name":"NewAgentpriv", 
                    "description":"desc of agent privilege", 
                    "privileges": ["ROLE_AGENT_CREATE_TASK"] 
                }
            

Status: 200                
{
    "message": "Success ! Privilege information saved successfully.",
    "id": 21
}
            

View all privilege

Brief

URL Syntax /{_locale}/api/agent-privileges.{_format}
Method GET
Example GET /api/agent-privileges.json?sort=ap.name&direction=ASC

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Filters

Name Information
sort Datatype string Pattern (ap.createdAt|ap.name) ASC|DESC Default ap.createdAt
search Datatype string Description Search
Status: 200                
{
    "privileges": [
        {
            "id": 21,
            "privileges": [
                "ROLE_AGENT_CREATE_TASK"
            ],
            "name": "NewAgentpriv",
            "description": "desc of agent privilege",
            "createdAt": {
                "lastErrors": {
                    "warning_count": 0,
                    "warnings": [],
                    "error_count": 0,
                    "errors": []
                },
                "timezone": {
                    "name": "Asia/Calcutta",
                    "location": {
                        "country_code": "??",
                        "latitude": 0,
                        "longitude": 0,
                        "comments": ""
                    }
                },
                "offset": 19800,
                "timestamp": 1497282567
            }
        }
    ],
    "pagination_data": {
        "last": 1,
        "current": 1,
        "numItemsPerPage": 10,
        "first": 1,
        "pageCount": 1,
        "totalCount": 1,
        "pageRange": 1,
        "startPage": 1,
        "endPage": 1,
        "pagesInRange": [
            1
        ],
        "firstPageInRange": 1,
        "lastPageInRange": 1,
        "currentItemCount": 1,
        "firstItemNumber": 1,
        "lastItemNumber": 1,
        "url": "#page/replacePage"
    }
}
            

Edit privilege

Brief

URL Syntax /{_locale}/api/agent-privilege/{id}.{_format}
Method PUT
Example PUT /api/agent-privilege/66.json

Requirements

Name Requirement Type Description
id true number agent privilege id
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true name
description string true description
privileges array true array of privileges required like ROLE_AGENT_CREATE_TASK

Request Content Data

                { 
                    "name":"NewAgentpriv", 
                    "description":"desc of agent privilege", 
                    "privileges": ["ROLE_AGENT_CREATE_TASK"] 
                }
            

Status: 200                
{
    "message": "Success ! Privilege information saved successfully.",
    "id": 21
}
            

Delete existing privilege

Brief

URL Syntax /{_locale}/api/agent-privilege/{id}.{_format}
Method DELETE
Example DELETE /api/agent-privilege/52.json

Requirements

Name Requirement Type Description
id \d+ integer id of privilege
_format json|html
_locale en|fr|it|de
{
    "message": "Success ! Privilege removed successfully."
}
            

ToDo

This Api can be used to Add, edit ,Delete Todo from ticket.

Add Todo

Brief

URL Syntax /{_locale}/api/todo.{_format}
Method POST
Example POST /api/todo.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
taskId integer false for working on Task taskId is required
threadId integer false for working on Ticket ticketId is required
description string false Desciption of Todo. required for POST Method
status integer false 0|1 for icncomplete|complete. default: 0 . required for PUT method

Request Content Example

            
    { 
        "ticketId": "5784",
        "description": "review" 
    }
            

{
    "message": "Success ! Item added to todo successfully.",
    "id": 52,
    "todo": {
        "id": 52,
        "description": "hello",
        "status": 0
    }
}                
            

Edit Todo

Brief of PUT

URL Syntax /{_locale}/api/todo/{id}.{_format}
Method PUT
Example PUT /api/todo/80.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
taskId integer false for working on Task taskId is required
threadId integer false for working on Ticket ticketId is required
description string false Desciption of Todo. required for POST Method
status integer false 0|1 for incomplete|complete. default: 0 . required for PUT method

Request Content example

{ 
    "ticketId": "5784",
    "description": "review",
    "status":"1" 
}
            

Status: 200
{
    "message": "Success ! Todo marked as complete."
}
            

Delete Todo

Brief of DELETE

URL Syntax /{_locale}/api/todo/{id}.{_format}
Method DELETE
Example DELETE /api/todo/84.json

Requirements

Name Requirement Type Description
id \d+
_format json|html
_locale en|fr|it|de
Status: 200                
{
    "message": "Success ! Todo removed successfully."
}
            

Ticket Type

This Api provides View, Add, edit, Delete operation for Available Ticket types.

Return collection of Ticket Types

Brief

URL Syntax /{_locale}/api/ticket-types.{_format}
Method GET
Example GET /api/ticket-types.json?search=cart

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Filters

Name Information
isActive Datatype int Description 0|1
sort Datatype string Pattern (id|name) ASC|DESC Default id
page Datatype int Default 1
search Datatype string Description Search
Status: 200
{
    "types": [
        {
            "id": 800,
            "name": "Access Issue",
            "description": "Report an inability access a physical or virtual asset",
            "isActive": true
        },
        {
            "id": 799,
            "name": "Report a Problem",
            "description": "Product, service, or equipment related issues",
            "isActive": true
        },    
        {
            "id": 746,
            "name": "Feedback",
            "description": "Tickets that primarily concern the sales and billing departments",
            "isActive": true
        },
        {
            "id": 745,
            "name": "General Inquiry",
            "description": "Questions about products or services",
            "isActive": true
        },
        {
            "id": 743,
            "name": "Integration",
            "description": "Integration",
            "isActive": true
        },
        {
            "id": 24,
            "name": "Qloapps",
            "description": "Qloapps",
            "isActive": true
        },
        {
            "id": 23,
            "name": "X-Cart",
            "description": "X-Cart",
            "isActive": true
        },
        {
            "id": 20,
            "name": "PrestaShop",
            "description": "PrestaShop",
            "isActive": true
        },
        {
            "id": 19,
            "name": "Odoo",
            "description": "OpenErp/ Odoo",
            "isActive": true
        },
        {
            "id": 18,
            "name": "Question",
            "description": "simple query",
            "isActive": true
        }
    ],
    "pagination_data": {
        "last": 7,
        "current": "6",
        "numItemsPerPage": 10,
        "first": 1,
        "pageCount": 7,
        "totalCount": 69,
        "pageRange": 5,
        "startPage": 3,
        "endPage": 7,
        "previous": 5,
        "next": 7,
        "pagesInRange": [
            3,
            4,
            5,
            6,
            7
        ],
        "firstPageInRange": 3,
        "lastPageInRange": 7,
        "currentItemCount": 10,
        "firstItemNumber": 51,
        "lastItemNumber": 60,
        "url": "#page/replacePage"
    }
}
                

Add new Ticket Type

Brief

URL Syntax /{_locale}/api/ticket-types.{_format}
Method POST
Example POST /api/ticketTypes.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true name
description string true Description
isActive integer false isActive values: 0|1 Note:will be 0, if not given

Request Content Example

    {
        "name":"culture" ,
        "description": "ticket type regarding culture"
    }
            

Status: 200                
{
    "message": "Success ! Ticket Type saved successfully.",
    "id": 808
}
            

Edit existing Ticket Type

Brief

URL Syntax /{_locale}/api/ticket-type/{id}.{_format}
Method PUT
Example PUT /api/ticket-type/31.json

Requirements

Name Requirement Type Description
id \d+
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true name
description string true Description
isActive integer false isActive values: 0|1 Note:will be 0, if not given

Request Content Example

    {
        "name":"culture" ,
        "description": "ticket type regarding culture"
    }
            

Status: 200                
{
    "message": "Success ! Type updated successfully."
}
            

Delete existing Ticket Type

Brief

URL Syntax /{_locale}/api/ticket-type/{id}.{_format}
Method DELETE
Example DELETE /api/ticket-type/31.json

Requirements

Name Requirement Type Description
id \d+ integer TicketType id
_format json|html
_locale en|fr|it|de
Status: 200                
{
    "message": "Success ! Ticket Type removed successfully."
}
            

Subgroup

This Api can be used to View, add, edit ,Delete groups available in company. subgroups are equivalent to teams.

View Subgroups

View all Subgroups. Method: GET

Brief

URL Syntax /{_locale}/api/sub-groups.{_format}
Method GET
Example GET /api/sub-groups.json?isActive=1

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Filters

Name Information
sort Datatype string Pattern (ap.createdAt|ap.name) ASC|DESC Default ap.createdAt
isActive Datatype int Description 0|1
search Datatype string Description Search
{
    "groups": [
        {
            "id": 185,
            "name": "Level I Support",
            "description": "Tier 1 support, responsible for the initial iteraction with customers",
            "createdAt": {
                "lastErrors": {
                    "warning_count": 0,
                    "warnings": [],
                    "error_count": 0,
                    "errors": []
                },
                "timezone": {
                    "name": "Asia/Calcutta",
                    "location": {
                        "country_code": "??",
                        "latitude": 0,
                        "longitude": 0,
                        "comments": ""
                    }
                },
                "offset": 19800,
                "timestamp": 1495436720
            },
            "isActive": true
        },
        {
            "id": 184,
            "name": "Level II Support",
            "description": "Tier 2 support, responsible for the initial iteraction with customers",
            "createdAt": {
                "lastErrors": {
                    "warning_count": 0,
                    "warnings": [],
                    "error_count": 0,
                    "errors": []
                },
                "timezone": {
                    "name": "Asia/Calcutta",
                    "location": {
                        "country_code": "??",
                        "latitude": 0,
                        "longitude": 0,
                        "comments": ""
                    }
                },
                "offset": 19800,
                "timestamp": 1495436085
            },
            "isActive": true
        },
        {
            "id": 183,
            "name": "Level III Support",
            "description": "Tier 3 support, responsible for the initial iteraction with customers",
            "createdAt": {
                "lastErrors": {
                    "warning_count": 0,
                    "warnings": [],
                    "error_count": 0,
                    "errors": []
                },
                "timezone": {
                    "name": "Asia/Calcutta",
                    "location": {
                        "country_code": "??",
                        "latitude": 0,
                        "longitude": 0,
                        "comments": ""
                    }
                },
                "offset": 19800,
                "timestamp": 1495421376
            },
            "isActive": true
        },
        {
            "id": 182,
            "name": "Level IV Support",
            "description": "Tier 4 support, responsible for the initial iteraction with customers",
            "createdAt": {
                "lastErrors": {
                    "warning_count": 0,
                    "warnings": [],
                    "error_count": 0,
                    "errors": []
                },
                "timezone": {
                    "name": "Asia/Calcutta",
                    "location": {
                        "country_code": "??",
                        "latitude": 0,
                        "longitude": 0,
                        "comments": ""
                    }
                },
                "offset": 19800,
                "timestamp": 1495287307
            },
            "isActive": true
        },
        {
            "id": 181,
            "name": "Level V Support",
            "description": "Tier 5 support, responsible for the initial iteraction with customers",
            "createdAt": {
                "lastErrors": {
                    "warning_count": 0,
                    "warnings": [],
                    "error_count": 0,
                    "errors": []
                },
                "timezone": {
                    "name": "Asia/Calcutta",
                    "location": {
                        "country_code": "??",
                        "latitude": 0,
                        "longitude": 0,
                        "comments": ""
                    }
                },
                "offset": 19800,
                "timestamp": 1495282683
            },
            "isActive": true
        },
        {
            "id": 180,
            "name": "Level VI Support",
            "description": "Tier 6 support, responsible for the initial iteraction with customers",
            "createdAt": {
                "lastErrors": {
                    "warning_count": 0,
                    "warnings": [],
                    "error_count": 0,
                    "errors": []
                },
                "timezone": {
                    "name": "Asia/Calcutta",
                    "location": {
                        "country_code": "??",
                        "latitude": 0,
                        "longitude": 0,
                        "comments": ""
                    }
                },
                "offset": 19800,
                "timestamp": 1495281688
            },
            "isActive": true
        },
        {
            "id": 179,
            "name": "Product Management",
            "description": "pm",
            "createdAt": {
                "lastErrors": {
                    "warning_count": 0,
                    "warnings": [],
                    "error_count": 0,
                    "errors": []
                },
                "timezone": {
                    "name": "Asia/Calcutta",
                    "location": {
                        "country_code": "??",
                        "latitude": 0,
                        "longitude": 0,
                        "comments": ""
                    }
                },
                "offset": 19800,
                "timestamp": 1495093508
            },
            "isActive": false
        },
        {
            "id": 157,
            "name": "Level VI Support",
            "description": "Tier 6 support, responsible for the initial iteraction with customers",
            "createdAt": null,
            "isActive": true
        },
        {
            "id": 158,
            "name": "Level VII Support",
            "description": "Tier 7 support, responsible for the initial iteraction with customers",
            "createdAt": null,
            "isActive": true
        },
        {
            "id": 160,
            "name": "Level VIII Support",
            "description": "Tier 8 support, responsible for the initial iteraction with customers",
            "createdAt": null,
            "isActive": true
        }
    ],
    "pagination_data": {
        "last": 9,
        "current": 1,
        "numItemsPerPage": 10,
        "first": 1,
        "pageCount": 9,
        "totalCount": 82,
        "pageRange": 5,
        "startPage": 1,
        "endPage": 5,
        "next": 2,
        "pagesInRange": [
            1,
            2,
            3,
            4,
            5
        ],
        "firstPageInRange": 1,
        "lastPageInRange": 5,
        "currentItemCount": 10,
        "firstItemNumber": 1,
        "lastItemNumber": 10,
        "url": "#page/replacePage"
    }
}
            

Edit Subgroup

Brief

URL Syntax /{_locale}/api/sub-group/{id}.{_format}
Method PUT
Example PUT /api/sub-group/22.json

Requirements

Name Requirement Type Description
id \d+
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true name
description string true Description
groups array true array of subgroup ids
users array false array of users for subgroup/team

Request Content Data

            { 
                "name":"team2" ,
                "description":"desc",
                 "groups":["12","49"],
                  "users":["170","179"]
            }
            

Status: 200                
{
    "message": "Success! Team has been updated successfully.",
    "id": 21
}
            

Add Subgroup

Brief

URL Syntax /{_locale}/api/sub-groups.{_format}
Method POST
Example POST /api/sub-groups.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true name
description string true Description
groups array true array of subgroup ids
users array false array of users for subgroup/team

Request Content Data

    { 
        "name":"team2" ,
        "description":"desc",
            "groups":["12","49"],
            "users":["170","179"]
    }
            

{
    "message": "Success! Team has been added successfully.",
    "id": 21
}
            

Delete existing Subgroup

Brief

URL Syntax /{_locale}/api/sub-group/{id}.{_format}
Method DELETE
Example DELETE /api/sub-group/25.json

Requirements

Name Requirement Type Description
id \d+ integer subgroup id
_format json|html
_locale en|fr|it|de
Status: 200                
{
    "message": "Success ! SubGroup removed successfully."
}
            

Custom Field

This Api can be used to View, Add, delete Custom Field(s) or modify Custom Field.

Returns a collection of custom-fields

Brief

URL Syntax /{_locale}/api/custom-fields.{_format}
Method GET
Example GET /api/custom-fields.json?search=FTP

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Filters

Name Information
sort Datatype string Pattern (name|id) ASC|DESC Default id
page Datatype int Default 1
search Datatype string Description search in custom-field names
Status: 200                
[
    {
        "id": 179,
        "name": "Text with number",
        "agentType": "both",
        "fieldType": "text",
        "value": "enter number",
        "required": false,
        "status": false,
        "sortOrder": 2,
        "dateAdded": {
            "date": "2017-06-01 19:10:57",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "dateUpdated": {
            "date": "2017-06-09 12:25:59",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "validation": {
            "fieldtype": "number",
            "minNo": 20,
            "maxNo": 100,
            "allowedDomain": "",
            "restrictedDomain": "",
            "regex": "^[1-9][0-9]*$"
        },
        "encryption": false,
        "customFieldsDependency": [
            {
                "id": 5,
                "name": "Support",
                "description": "Need Support",
                "isActive": true
            }
        ],
        "customFieldValues": []
    },
    {
        "id": 180,
        "name": "Text with url",
        "agentType": "both",
        "fieldType": "text",
        "value": null,
        "required": false,
        "status": false,
        "sortOrder": 3,
        "dateAdded": {
            "date": "2017-06-01 19:11:21",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "dateUpdated": {
            "date": "2017-06-09 12:25:59",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "validation": {
            "fieldtype": "url",
            "minNo": "",
            "maxNo": "",
            "allowedDomain": "",
            "restrictedDomain": "",
            "regex": ""
        },
        "encryption": false,
        "customFieldsDependency": [
            {
                "id": 5,
                "name": "Support",
                "description": "Need Support",
                "isActive": true
            }
        ],
        "customFieldValues": []
    },
    {
        "id": 181,
        "name": "Select",
        "agentType": "both",
        "fieldType": "select",
        "value": null,
        "required": true,
        "status": false,
        "sortOrder": 4,
        "dateAdded": {
            "date": "2017-06-01 19:12:10",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "dateUpdated": {
            "date": "2017-06-09 12:25:59",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "validation": {
            "regex": ""
        },
        "encryption": false,
        "customFieldsDependency": [
            {
                "id": 5,
                "name": "Support",
                "description": "Need Support",
                "isActive": true
            }
        ],
        "customFieldValues": [
            {
                "id": 129,
                "name": "asd",
                "sortOrder": 1
            },
            {
                "id": 130,
                "name": "bsd",
                "sortOrder": 2
            }
        ]
    },
    {
        "id": 182,
        "name": "Radio",
        "agentType": "both",
        "fieldType": "radio",
        "value": "en radio val",
        "required": true,
        "status": true,
        "sortOrder": 5,
        "dateAdded": {
            "date": "2017-06-01 19:12:59",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "dateUpdated": {
            "date": "2017-06-09 12:25:59",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "validation": {
            "regex": ""
        },
        "encryption": false,
        "customFieldsDependency": [],
        "customFieldValues": [
            {
                "id": 131,
                "name": "op1",
                "sortOrder": 1
            },
            {
                "id": 132,
                "name": "op2",
                "sortOrder": 2
            }
        ]
    },
    {
        "id": 183,
        "name": "Checkbox",
        "agentType": "both",
        "fieldType": "checkbox",
        "value": null,
        "required": true,
        "status": true,
        "sortOrder": 6,
        "dateAdded": {
            "date": "2017-06-01 19:13:20",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "dateUpdated": {
            "date": "2017-06-09 12:25:59",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "validation": {
            "regex": ""
        },
        "encryption": false,
        "customFieldsDependency": [],
        "customFieldValues": [
            {
                "id": 133,
                "name": "c1",
                "sortOrder": 1
            },
            {
                "id": 134,
                "name": "c2",
                "sortOrder": 2
            }
        ]
    },
    {
        "id": 184,
        "name": "Datetime",
        "agentType": "both",
        "fieldType": "datetime",
        "value": null,
        "required": false,
        "status": false,
        "sortOrder": 7,
        "dateAdded": {
            "date": "2017-06-01 19:13:43",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "dateUpdated": {
            "date": "2017-06-09 12:25:59",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "validation": {
            "regex": ""
        },
        "encryption": false,
        "customFieldsDependency": [],
        "customFieldValues": []
    },
    {
        "id": 185,
        "name": "Time",
        "agentType": "user",
        "fieldType": "time",
        "value": null,
        "required": false,
        "status": false,
        "sortOrder": 8,
        "dateAdded": {
            "date": "2017-06-01 19:13:52",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "dateUpdated": {
            "date": "2017-06-09 12:25:59",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "validation": {
            "regex": ""
        },
        "encryption": false,
        "customFieldsDependency": [],
        "customFieldValues": []
    },
    {
        "id": 186,
        "name": "Date",
        "agentType": "both",
        "fieldType": "date",
        "value": null,
        "required": true,
        "status": true,
        "sortOrder": 9,
        "dateAdded": {
            "date": "2017-06-01 19:14:07",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "dateUpdated": {
            "date": "2017-06-09 12:25:59",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "validation": {
            "regex": ""
        },
        "encryption": false,
        "customFieldsDependency": [
            {
                "id": 4,
                "name": "PreSale Query",
                "description": "PreSale Query",
                "isActive": true
            }
        ],
        "customFieldValues": []
    },
    {
        "id": 187,
        "name": "new",
        "agentType": "both",
        "fieldType": "text",
        "value": null,
        "required": false,
        "status": false,
        "sortOrder": 10,
        "dateAdded": {
            "date": "2017-06-01 19:54:51",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "dateUpdated": {
            "date": "2017-06-09 12:25:59",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "validation": {
            "fieldtype": "text",
            "minNo": "",
            "maxNo": "",
            "allowedDomain": "",
            "restrictedDomain": "",
            "regex": "^([a-z0-9_\\.-]+)@([\\da-z\\.-]+)\\.([a-z\\.]{2,6})$"
        },
        "encryption": false,
        "customFieldsDependency": [],
        "customFieldValues": []
    },
    {
        "id": 188,
        "name": "Text email",
        "agentType": "both",
        "fieldType": "text",
        "value": null,
        "required": false,
        "status": false,
        "sortOrder": 11,
        "dateAdded": {
            "date": "2017-06-01 20:18:18",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "dateUpdated": {
            "date": "2017-06-09 12:26:00",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "validation": {
            "fieldtype": "email",
            "minNo": "",
            "maxNo": "",
            "allowedDomain": "uvdesk.com",
            "restrictedDomain": "",
            "regex": ""
        },
        "encryption": false,
        "customFieldsDependency": [
            {
                "id": 5,
                "name": "Support",
                "description": "Need Support",
                "isActive": true
            }
        ],
        "customFieldValues": []
    },
    {
        "id": 192,
        "name": "Textarea h",
        "agentType": "both",
        "fieldType": "textarea",
        "value": null,
        "required": false,
        "status": true,
        "sortOrder": 12,
        "dateAdded": {
            "date": "2017-06-02 19:58:06",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "dateUpdated": {
            "date": "2017-06-09 12:26:00",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "validation": {
            "regex": ""
        },
        "encryption": true,
        "customFieldsDependency": [],
        "customFieldValues": []
    }
]

Thread

This Api can be used to View, Add, edit ,Delete, lock, unlock Threads. Different types of Thread Present are: reply, forward and note.

Returns a collection of threads

Brief

URL Syntax /{_locale}/api/ticket/{id}/threads.{_format}
Method GET
Example GET /api/ticket/5784/threads.json

Requirements

Name Requirement Type Description
id \d+ integer ticket id
_format json|html
_locale en|fr|it|de
Status: 200
{
    "threads": [
        {
            "id": 91406,
            "reply": "

files

\n", "source": "website", "threadType": "reply", "replyTo": null, "cc": null, "bcc": null, "userType": "agent", "formatedCreatedAt": "05-31-17 16:45", "messageId": null, "user": { "id": 59, "email": "jitendra@webkul.com", "smallThumbnail": "https://s3-ap-southeast-1.amazonaws.com/opencart-hd/website/1/s4.jpg", "enabled": true, "role": "ROLE_SUPER_ADMIN", "detail": { "agent": { "id": 198, "companyId": 1, "userRole": { "id": 1, "role": "ROLE_SUPER_ADMIN", "name": "Account Owner" }, "firstName": "edited", "lastName": "test", "name": "edited test", "isActive": true, "isStarred": null, "user": 59, "signature": "", "ticketView": null, "isVerified": true, "source": "website", "authorisedClients": [ "7", "32" ], "activityNotifications": null }, "customer": { "id": 1246, "companyId": 1, "userRole": { "id": 4, "role": "ROLE_CUSTOMER", "name": "Customer" }, "firstName": "Jitendra", "lastName": "Singh", "name": "Jitendra Singh", "isActive": true, "isStarred": null, "user": 59, "signature": null, "ticketView": null, "isVerified": true, "source": "website", "authorisedClients": [], "activityNotifications": null } }, "timezone": "Africa/Accra", "updatedPassword": null }, "attachments": [ { "id": 9065, "name": "技术部岗位职责说明书.docx", "path": "https://s3-ap-southeast-1.amazonaws.com/opencart-hd/company/1/ticket/8480/91406/%E6%8A%80%E6%9C%AF%E9%83%A8%E5%B2%97%E4%BD%8D%E8%81%8C%E8%B4%A3%E8%AF%B4%E6%98%8E%E4%B9%A6.docx", "thread": 91406, "taskThread": null, "attachmentThumb": null, "attachmentOrginal": null, "contentType": "application/msword", "size": 168534 }, { "id": 9066, "name": "SamplePPTX.pptx", "path": "https://s3-ap-southeast-1.amazonaws.com/opencart-hd/company/1/ticket/8480/91406/SamplePPTX.pptx", "thread": 91406, "taskThread": null, "attachmentThumb": null, "attachmentOrginal": null, "contentType": "application/vnd.ms-powerpoint", "size": 413895 }, { "id": 9067, "name": "images (3).png", "path": "https://s3-ap-southeast-1.amazonaws.com/opencart-hd/company/1/ticket/8480/91406/images%20%283%29.png", "thread": 91406, "taskThread": null, "attachmentThumb": "https://s3-ap-southeast-1.amazonaws.com/opencart-hd/company/1/ticket/8480/91406/images%20%283%29.png", "attachmentOrginal": "https://s3-ap-southeast-1.amazonaws.com/opencart-hd/company/1/ticket/8480/91406/images%20%283%29.png", "contentType": "image/png", "size": 1931 }, { "id": 9068, "name": "pdf.pdf", "path": "https://s3-ap-southeast-1.amazonaws.com/opencart-hd/company/1/ticket/8480/91406/pdf.pdf", "thread": 91406, "taskThread": null, "attachmentThumb": null, "attachmentOrginal": null, "contentType": "application/pdf", "size": 433994 } ], "isLocked": false, "fullname": "Jitendra Singh", "bookmark": null, "viewedAt": null, "task": null } ], "pagination": { "last": 1, "current": 1, "numItemsPerPage": 10, "first": 1, "pageCount": 1, "totalCount": 1, "pageRange": 1, "startPage": 1, "endPage": 1, "pagesInRange": [ 1 ], "firstPageInRange": 1, "lastPageInRange": 1, "currentItemCount": 1, "firstItemNumber": 1, "lastItemNumber": 1, "url": "#id/8480/page/replacePage" } }

Add new Thread

Add a new thread to given ticket. Method: POST

Brief

URL Syntax /{_locale}/api/ticket/{id}/threads.{_format}
Method POST
Example POST /api/ticket/5271/threads.json

Requirements

Name Requirement Type Description
id \d+ integer ticket id
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
threadType string true threadtype: reply|forward|note
reply string true main content of thread
status integer false status id value: 1|2|3|4|5|6 for open|pending|resolved|closed|Spam|Answered repectively
to array false to in case of threadType:forward
files files false attachements
actAsType string false admin can actAsType customer, agent
actAsEmail string false provide with actAsType

Request Content Data

{ 
    "threadType": "reply",
    "reply": "replied content",
    "status": "1" 
}
                

Status: 200
{
    "message": "Success ! Reply added successfully.",
    "id": 91436
}
            

lock/unlock thread

Brief

URL Syntax /{_locale}/api/ticket/{ticketId}/thread/{id}.{_format}
Method PATCH
Example PATCH /api/ticket/5771/thread/83906.json

Requirements

Name Requirement Type Description
ticketId \d+ integer ticket id
id \d+
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
updateType string true options: lock/bookmark

Request Content Data

                { "updateType": "lock" }
            

{
    "message": "Success ! Thread locked successfully."
}
            

Edit existing thread

Brief

URL Syntax /{_locale}/api/ticket/{ticketId}/thread/{id}.{_format}
Method PUT
Example PUT /api/ticket/5771/thread/83906.json

Requirements

Name Requirement Type Description
ticketId \d+ integer ticket id
id \d+ integer thread id
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
reply string true main content of thread

Request Content Data

{ 
    "threadType": "reply",
    "reply": "replied content",
    "status": "1" 
}
                

Status: 200                
{
    "message": "Success ! Thread updated successfully."
}
            

DELETE thread

Brief

URL Syntax /{_locale}/api/ticket/{ticketId}/thread/{threadId}.{_format}
Method DELETE

Requirements

Name Requirement Type Description
ticketId \d+ integer ticket id
_format json|html
_locale en|fr|it|de
Status: 200                
{
    "message": "Success ! Thread removed successfully."
}
            

Member

This Api can be used to View, edit and remove Agent/Admins (members).

Edit profile

Brief

URL Syntax /{_locale}/api/member/profile.{_format}
Method PUT
Example PUT /api/member/profile.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
firstName string true firstName
lastName string true lastName
email email true email
contactNumber integer true Contact Number
signature string “” user’s signature
timezone string false timezone like Asia/Kolkata
password string false provide password in form of array of ‘first’ and ‘second’

Request Content Example

               {
                   "firstName": "sample",
                   "lastName": "user",
                   "email": "sample@email.com",
                   "contactNumber": "2147483647",
                   "timezone": "Asia\/Kolkata",
                   "signature": "",
                   "password": {
                       "first": "pass123456",
                       "second": "pass123456"
                   }
               }
Status: 200
{ 
    "message": "success! profile updated" 
}

Return a collection of members

This route shows list of all members. Below Given filters can be applied if needed.

Brief

URL Syntax /{_locale}/api/members.{_format}
Method GET
Example GET /api/members.json?sort=name

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Filters

Name Information
starred Datatype int
isActive Datatype int
sort Datatype string Pattern (CreatedAt|name|email) ASC|DESC Default CreatedAt
page Datatype int Default 1
search Datatype string Description search in all member’s name and email
fullList Datatype string Description To get All members without pagination and with minimum data
Status: 200                
{
    "users": [
        {
            "id": 3245,
            "email": "sampleagent@gmail.com",
            "smallThumbnail": null,
            "isActive": true,
            "name": "new test",
            "role": "ROLE_ADMIN"
        },
        {
            "id": 3242,
            "email": "ipdeer@ipdeer.com",
            "smallThumbnail": null,
            "isActive": true,
            "name": "user 001",
            "role": "ROLE_AGENT"
        },
        {
            "id": 3054,
            "email": "sampleemail1@email.com",
            "smallThumbnail": "https://s3-ap-southeast-1.amazonaws.com/opencart-hd/uvdesk/1/logo.jpg",
            "isActive": true,
            "name": "thested emerge",
            "role": "ROLE_AGENT"
        },
        {
            "id": 3216,
            "email": "sampleemail2@em.com",
            "smallThumbnail": null,
            "isActive": true,
            "name": "ankitNameLoooooooooooooooooooooooooog ydv",
            "role": "ROLE_ADMIN"
        },
        {
            "id": 3116,
            "email": "sampleemail3@gmail.com",
            "smallThumbnail": null,
            "isActive": false,
            "name": "name lname",
            "role": "ROLE_AGENT"
        },
        {
            "id": 3114,
            "email": "sampleemail4@zoho.com",
            "smallThumbnail": null,
            "isActive": true,
            "name": "anki yadav",
            "role": "ROLE_ADMIN"
        },
        {
            "id": 3104,
            "email": "sampleemail5@gmail.com",
            "smallThumbnail": null,
            "isActive": true,
            "name": "book books",
            "role": "ROLE_AGENT"
        },
        {
            "id": 3037,
            "email": "sampleemail6@mail.com",
            "smallThumbnail": null,
            "isActive": true,
            "name": "zondo cape",
            "role": "ROLE_ADMIN"
        },
        {
            "id": 2997,
            "email": "sampleemailtest@test.com",
            "smallThumbnail": null,
            "isActive": true,
            "name": "test test",
            "role": "ROLE_AGENT"
        },
        {
            "id": 376,
            "email": "sampleemail@gmail.com",
            "smallThumbnail": null,
            "isActive": true,
            "name": "Naveen Kumar",
            "role": "ROLE_ADMIN"
        }
    ],
    "pagination_data": {
        "last": 11,
        "current": 1,
        "numItemsPerPage": 10,
        "first": 1,
        "pageCount": 11,
        "totalCount": 104,
        "pageRange": 5,
        "startPage": 1,
        "endPage": 5,
        "next": 2,
        "pagesInRange": [
            1,
            2,
            3,
            4,
            5
        ],
        "firstPageInRange": 1,
        "lastPageInRange": 5,
        "currentItemCount": 10,
        "firstItemNumber": 1,
        "lastItemNumber": 10,
        "url": "#page/replacePage"
    }
}

View a member

This route shows details of a member. Method: GET
Note:Roles ROLE_ADMIN, ROLE_SUPER_ADMIN have full access for api, while for Agents Available roles will be listed.

Brief

URL Syntax /{_locale}/api/member/{id}.{_format}
Method GET
Example GET /api/member/1212.json

Requirements

Name Requirement Type Description
id \d+ integer id of member
_format json|html
_locale en|fr|it|de
Status: 200
{
    "id": 3245,
    "email": "sampleagent@gmail.com",
    "profileImage": null,
    "isEmailPending": true,
    "timezone": "Africa/Abidjan",
    "data": [{
        "id": 3421,
        "companyId": 1,
        "firstName": "new",
        "lastName": "test",
        "jobTitle": "",
        "createdAt": {
            "date": "2017-06-12 16:01:51",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "updatedAt": null,
        "isActive": true,
        "isVerified": false,
        "isStarred": null,
        "contactNumber": "8178563000",
        "source": null,
        "facebook": null,
        "twitter": null,
        "signature": null,
        "agentPrivilege": [
            "5"
        ],
        "defaultFiltering": null,
        "ticketView": 3,
        "authorisedClients": [],
        "activityNotifications": null,
        "userRole": {
            "id": 2,
            "role": "ROLE_ADMIN",
            "name": "Administrator"
        }
    }],
    "roles": "ROLE_ADMIN"
}                

Add new Member

Brief

URL Syntax /{_locale}/api/members.{_format}
Method POST
Example POST /api/members.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
firstName string true firstName
lastName string true lastName
email email true email
contactNumber integer true Contact Number
signature string “” user’s signature
timezone string false timezone like Asia/Kolkata
isActive boolean false provide value 0,1, true or false
agentPrivilege array false for role: ROLE_AGENT provide array agentPrivilege of agent privilege Ids
ticketView integer false for role: ROLE_AGENT, provide a ticketView Permission 1|2|3|4 for Global Access|Group Access|Team Access|Individual Access respectively
groups array false for role: ROLE_AGENT, you can provide array of groups Ids to which agent belongs
userSubGroup array false for role: ROLE_AGENT you can provide array of team/subgroup Ids to which agent belongs

Request Content Example:

{
    "firstName": "lazer",
    "lastName": "angelov",
    "email": "sampleagent@gmail.com",
    "jobTitle": "",
    "contactNumber": "8178563000",
    "timezone": "Africa\/Abidjan",
    "signature": "",
    "role": "ROLE_AGENT",
    "agentPrivilege": ["5"],
    "ticketView": "3",
    "isActive": "1"
}
Status: 200                
{
    "message": "Success ! Agent added successfully."
}                

Edit existing member

Edit details of a existing member. Method: PUT

Brief

URL Syntax /{_locale}/api/member/{id}.{_format}
Method PUT
Example PUT /api/member/1234.json

Requirements

Name Requirement Type Description
id \d+ integer id of member
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
firstName string true firstName
lastName string true lastName
email email true email
contactNumber integer true Contact Number
signature string “” user’s signature
timezone string false timezone like Asia/Kolkata
isActive boolean false provide value 0,1, true or false
agentPrivilege array false for role: ROLE_AGENT provide array agentPrivilege of agent privilege Ids
ticketView integer false for role: ROLE_AGENT, provide a ticketView Permission 1|2|3|4 for Global Access|Group Access|Team Access|Individual Access respectively
groups array false for role: ROLE_AGENT, you can provide array of groups Ids to which agent belongs
userSubGroup array false for role: ROLE_AGENT you can provide array of team/subgroup Ids to which agent belongs

Request Content Example:

{
	"firstName": "edited",
	"lastName": "test",
	"email": "asdtfile@gmail.com",
	"jobTitle": "manager",
	"contactNumber": "1234567890",
	"timezone": "Africa/Accra",
	"signature": "",
	"role": "ROLE_AGENT",
	"agentPrivilege": [
		"5"
	],
	"groups": [
		"39",
		"18"
	],
	"userSubGroup": {
		"1": "1"
	},
	"ticketView": "2"
}
Status: 200
{
    "message": "Success ! Agent saved successfully."
}

Delete a given member

Brief

URL Syntax /{_locale}/api/member/{id}.{_format}
Method DELETE
Example DELETE /api/member/5122.json

Requirements

Name Requirement Type Description
id \d+ integer id of member
_format json|html
_locale en|fr|it|de
Status: 200                
{
    "message": "Success ! Agent removed successfully."
}

View logged User

Brief

URL Syntax /{_locale}/api/me.{_format}
Method GET
Example GET /api/me.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de
Status: 200                
{
    "id": 59,
    "email": "jitendra@webkul.com",
    "profileImage": "https://sample/abc.jpg",
    "isEmailPending": true,
    "timezone": "Asia/Kolkata",
    "data": [
        {
            "id": 198,
            "companyId": 1,
            "firstName": "Jitendra",
            "lastName": "Singh",
            "jobTitle": "",
            "createdAt": {
                "date": "2016-02-29 12:13:08",
                "timezone_type": 3,
                "timezone": "Asia/Calcutta"
            },
            "updatedAt": null,
            "isActive": true,
            "isVerified": true,
            "isStarred": null,
            "contactNumber": "21",
            "source": "website",
            "facebook": null,
            "twitter": null,
            "signature": "j",
            "agentPrivilege": 8,
            "defaultFiltering": null,
            "ticketView": null,
            "authorisedClients": [
                "7",
                "32"
            ],
            "activityNotifications": null,
            "userRole": {
                "id": 1,
                "role": "ROLE_SUPER_ADMIN",
                "name": "Account Owner"
            }
        }
    ],
    "roles": [
        "ROLE_SUPER_ADMIN"
    ]
}

Task

This set of api can be used to View, Add, update Task. it also encompasses adding/ removing Follower to task, adding/ removing Thread from task.

Returns a collection of Tasks

Returns a collection of Tasks. Method: GET

Brief

URL Syntax /{_locale}/api/tasks.{_format}
Method GET
Example GET: /api/tasks.json?priority=2

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Filters

Name Information
sort Datatype string Pattern (tsk.id|u.email|name) ASC|DESC Default tsk.id
stage Datatype integer Description stageId 1|2|3 for New|in Progress|Done
priority Datatype integer Description value: 1|2|3|4 for Low|medium|High|Urgent
page Datatype int Default 1
search Datatype string Description search in all customer’s name and email
{
    "stageCount": {
        "1": "4", "2": "1", "3": "4", "all": "9"
    }
    ,
    "tasks": [ {
        "id": 38, "subject": "complete this work named something", "viewedUsers": [ 59], "stage": {
            "id": 1, "name": "New", "color": "#DF5B49"
        }
        ,
        "priority": {
            "id": 1, "name": "Low", "description": "Low", "color": "#5cb85c"
        }
        ,
        "deadlineTimestamp": 1497119400,
        "formatedDeadline": "2017-06-10",
        "timestamp": 1496860200,
        "formatedCreatedAt": "2017-06-08",
        "assignedAgent": {
            "id": 120, "email": "alex.mishra37@webkul.com", "name": "alex Mishra", "firstName": "Abhilash", "profileImage": null, "smallThumbnail": null
        }
        ,
        "user": {
            "id": 59, "email": "jex@email.com", "name": "jex john", "firstName": "edited", "profileImage": "https://sample-image/website/1/s4.jpg", "smallThumbnail": "https://sampleweb.s4.jpg"
        }
    }
    ,
    {
        "id": 37, "subject": "subject of task", "viewedUsers": [ 59], "stage": {
            "id": 2, "name": "In Progress", "color": "#F1BB52"
        }
        ,
        "priority": {
            "id": 1, "name": "Low", "description": "Low", "color": "#5cb85c"
        }
        ,
        "deadlineTimestamp": 1471977000,
        "formatedDeadline": "2016-08-23",
        "timestamp": 1471977000,
        "formatedCreatedAt": "2016-08-24",
        "assignedAgent": null,
        "user": {
            "id": 59, "email": "jitendra@webkul.com", "name": "edited test", "firstName": "edited", "profileImage": "https://s3-ap-southeast-1.amazonaws.com/opencart-hd/website/1/s4.jpg", "smallThumbnail": "https://s3-ap-southeast-1.amazonaws.com/opencart-hd/website/1/s4.jpg"
        }
    }
    ,
    {
        "id": 24, "subject": "Customization of CSV for separate column for separate custom attributes", "viewedUsers": [ 20, 59, 135, 61, 1], "stage": {
            "id": 3, "name": "Done", "color": "#90C059"
        }
        ,
        "priority": {
            "id": 2, "name": "Medium", "description": "Medium", "color": "#337ab7"
        }
        ,
        "deadlineTimestamp": 1461609000,
        "formatedDeadline": "2016-04-25",
        "timestamp": 1461177000,
        "formatedCreatedAt": "2016-04-21",
        "assignedAgent": {
            "id": 135, "email": "brian@email.com", "name": "brian agr", "firstName": "brian", "profileImage": "https://sample/brian.png", "smallThumbnail": "https://sample/brian-small-size.png"
        }
        ,
        "user": {
            "id": 20, "email": "nex@email.com", "name": "christian bale", "firstName": "christian", "profileImage": null, "smallThumbnail": null
        }
    }
    ,
    {
        "id": 23, "subject": "Customization for Automatic SKU", "viewedUsers": [ 157, 20, 59, 61], "stage": {
            "id": 3, "name": "Done", "color": "#90C059"
        }
        ,
        "priority": {
            "id": 2, "name": "Medium", "description": "Medium", "color": "#337ab7"
        }
        ,
        "deadlineTimestamp": 1461263400,
        "formatedDeadline": "2016-04-21",
        "timestamp": 1461090600,
        "formatedCreatedAt": "2016-04-20",
        "assignedAgent": {
            "id": 157, "email": "sampleuser@sample.com", "name": "fabian pot", "firstName": "fabien", "profileImage": "https://opencart-hd.s3-ap-southeast-1.amazonaws.com/website/1/mine.jpg", "smallThumbnail": "https://fabienasd.mine.jpg"
        }
        ,
        "user": {
            "id": 20, "email": "nex@email.com", "name": "christian bale", "firstName": "christian", "profileImage": null, "smallThumbnail": null
        }
    }
    ],
    "pagination": {
        "last": 1, "current": 1, "numItemsPerPage": 12, "first": 1, "pageCount": 1, "totalCount": 6, "pageRange": 1, "startPage": 1, "endPage": 1, "pagesInRange": [ 1], "firstPageInRange": 1, "lastPageInRange": 1, "currentItemCount": 9, "firstItemNumber": 1, "lastItemNumber": 9, "url": "#page/replacePage"
    }
}                
            

View a Task

Brief

URL Syntax /{_locale}/api/task/{id}.{_format}
Method GET
Example GET /api/task/37.json

Requirements

Name Requirement Type Description
id \d+ integer Task id
_format json|html
_locale en|fr|it|de
{
    "task": {
        "currentThread": null,
        "lastFollower": null,
        "formatedCreatedAt": "06-08-17 7:00",
        "formatedDeadline": "06-10-17 18:30"
    },
    "createThread": {
        "id": 105,
        "fullname": "jex lazer",
        "description": "complete this work named something",
        "threadType": "create",
        "createdAt": {
            "date": "2017-06-08 12:30:57",
            "timezone_type": 3,
            "timezone": "Asia/Calcutta"
        },
        "attachments": [],
        "user": {
            "id": 59,
            "email": "jex@email.com",
            "name": "edited test",
            "firstName": "edited",
            "profileImage": "https://sample/s4.jpg",
            "smallThumbnail": "https://sample/s4.jpg"
        },
        "formatedCreatedAt": "06-08-17 7:00"
    },
    "todo": [],
    "followers": [
        {
            "id": 59,
            "email": "jex@email.com",
            "name": "edited test",
            "smallThumbnail": "https://sample/s4.jpg"
        },
        {
            "id": 120,
            "email": "abhilash.mishra37@webkul.com",
            "name": "Abhilash Mishra",
            "smallThumbnail": null
        }
    ]
}                
            

Update an existing task

Brief

URL Syntax /{_locale}/api/task/{id}.{_format}
Method PUT
Example PUT /api/task/37.json

Requirements

Name Requirement Type Description
id \d+ integer Task id
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
priority integer true priority id
stage integer true stage id
subject string true subject
assignedAgent integer true assignedAgent id
description string true Description

Request Content Example

{
    "prioirty": "1",
    "stage": "1",
    "subject": "subject of task", 
    "assignedAgent": "2997",
    "description": "task description"
}
            

Status: 200
{
    "task": {
        "id": 38,
        "subject": "subject of task",
        "createdTypeThread": {
            "id": 105,
            "fullname": "jex lazer",
            "description": "task description",
            "threadType": "create",
            "createdAt": {
                "date": "2017-06-08 12:30:57",
                "timezone_type": 3,
                "timezone": "Asia/Calcutta"
            },
            "attachments": [],
            "user": {
                "id": 59,
                "email": "jex@email.com",
                "name": "edited test",
                "firstName": "jex",
                "profileImage": "https://sample/s4.jpg",
                "smallThumbnail": "https://sample/s4.jpg"
            },
            "formatedCreatedAt": "06-08-17 7:00"
        },
        "priority": {
            "id": 1,
            "name": "Low",
            "color": "#5cb85c"
        },
        "stage": {
            "id": 1,
            "name": "New",
            "color": "#DF5B49"
        },
        "assignedAgent": {
            "id": 2997,
            "email": "sampleuser@email.com",
            "name": "sample user",
            "firstName": "sample",
            "profileImage": null,
            "smallThumbnail": null
        },
        "formatedCreatedAt": "06-08-17 7:00",
        "formatedDeadline": "06-10-17 18:30"
    },
    "message": "Success ! Task updated successfully."
}
            

Add Follower

Brief of POST

URL Syntax /{_locale}/api/task/{id}/follower.{_format}
Method POST
Example POST /api/task/37/follower.json

Requirements

Name Requirement Type Description
id \d+ integer Task id
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
followerId integer true followerId
{ "followerId": "2997" }

Remove Follower

Brief

URL Syntax /{_locale}/api/task/{id}/follower.{_format}
Method DELETE
Example DELETE /api/task/37/follower.json

Requirements

Name Requirement Type Description
id \d+ integer Task id
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
followerId integer true followerId

Request Content Example

{
    "followerId": "2997"
}
            

{
    "alertClass": "success",
    "alertMessage": "Success ! Member removed successfully."
}
            

Add/remove thread

Add/remove thread from a task. Methods: POST,DELETE

Brief of POST

URL Syntax /{_locale}/api/task/{id}/thread.{_format}
Method POST
Example POST /api/task/37/thread/89014.json

Brief of DELETE

URL Syntax /{_locale}/api/task/{id}/thread.{_format}
Method DELETE
Example POST /api/task/37/thread/89014.json

Requirements

Name Requirement Type Description
id \d+
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
description string true Description
stage integer true stage id
{ "description": "new desc", "stage": "2" }

Add new Task

Add new task. Method: POST

Brief

URL Syntax /{_locale}/api/tasks.{_format}
Method POST
Example POST /api/tasks.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
subject string true task subject
description string true task description
assignedAgent integer true assignedAgent Id
deadline date true task deadline
ticket integer true ticket id
threadIds array true array of threadIds
{ "subject": "subject of task", "description": "description of task", "assignedAgent": "2", "deadline":"2016-08-24", 
"ticket":"5771","threadIds": [83906]  }

Delete existing task

Brief

URL Syntax /{_locale}/api/task/{id}.{_format}
Method DELETE
Example DELETE /api/task/37.json

Requirements

Name Requirement Type Description
id \d+ integer Task id
_format json|html
_locale en|fr|it|de
{ "name":"John" }

Company

This Api can be used to edit Company details like Spam Setting, Theme, and Business Hours. company setting is responsible for Home page settings.

Edit company details

Brief

URL Syntax /{_locale}/api/company.{_format}
Method PUT
Example PUT /api/company.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true support name
supportEmail integer true support email id
nextTicketId integer true it should be kept greater than last ticket id
timezone string true timezone like Asia/Kolkata
pendingSince integer true no. of hours since customer last replied, to disable set to 0
defaultMailbox integer false mailbox id
defaultStatus integer false default status
defaultPriority integer false default priority
timeFormat string false time format like m-d-y G:i
pendingNotificationEmailTemplate integer false EmailTemplate of pending Notification

Request Content Example

{
    "name": "sample Pvt Ltd",
    "supportEmail": "support@webkul.com",
    "nextTicketId": "5801",
    "defaultMailbox": "20",
    "defaultStatus": "1",
    "defaultPriority": "1",
    "timezone": "Asia\/Kolkata",
    "timeFormat": "m-d-y G:i",
    "pendingSince": "0",
    "pendingNotificationEmailTemplate": "1"
}
                    

Success: 200
{
    "message": "Success ! Company information saved successfully."
}
            

View company Business hours

Brief

URL Syntax /{_locale}/api/company/business-hours.{_format}
Method GET
Example GET /api/company/business-hours.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de
Status: 200
{ 
    "businessHours": {
                        "Monday": {
                                "is_active":"on",
                                "from":"9:00",
                                "to":"18:00"
                                },
                        "Tuesday": {
                                    "is_active":"on",
                                    "from":"9:00",
                                    "to":"18:00"
                                },
                        "Wednesday": {
                            "is_active":"on",
                            "from":"9:00",
                            "to":"18:00"
                            },
                        "Thursday": {
                            "is_active": "on",
                            "from": "9:00",
                            "to": "18:00"
                            },
                        "Friday": {
                            "is_active":"on",
                            "from":"9:00",
                            "to":"18:00"
                            },
                        "Saturday": {
                            "from":"00:00",
                            "to":"00:00"
                            },
                        "Sunday": {
                            "from":"00:00",
                            "to":"00:00"
                            }
                    } 
}
            

Edit company Business hours

Brief

URL Syntax /{_locale}/api/company/business-hours.{_format}
Method POST
Example POST /api/company/business-hours.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
business_hours string true business hours
Status: 200                
{
    "message": "Success ! Business Hours saved successfully.",
    "business_hours": {
        "Monday": {
            "is_active": "on",
            "from": "9:00",
            "to": "18:00"
        },
        "Tuesday": {
            "is_active": "on",
            "from": "9:00",
            "to": "18:00"
        },
        "Wednesday": {
            "is_active": "on",
            "from": "9:00",
            "to": "18:00"
        },
        "Thursday": {
            "is_active": "on",
            "from": "9:00",
            "to": "18:00"
        },
        "Friday": {
            "is_active": "on",
            "from": "9:00",
            "to": "18:00"
        },
        "Saturday": {
            "from": "00:00",
            "to": "00:00"
        },
        "Sunday": {
            "from": "00:00",
            "to": "00:00"
        }
    },
    "status": 1
}                
            

View company spam setting

Brief

URL Syntax /{_locale}/api/company/spam.{_format}
Method GET
Example GET /api/company/spam.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de
Status: 200                
{
    "blackList": "noreply@test.com,marketplace@test.com",
    "whiteList": null
}                
            

Edit Spam setting of company

Edit Spam setting of company Method.

Brief

URL Syntax /{_locale}/api/company/spam.{_format}
Method PUT
Example PUT /api/company/spam.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
blackList string true blacklist
whiteList string true whiteList

Post Data Example

{ 
    "blackList": "noreply@test.com", 
    "whiteList" : "" 
}
            

Status: 200
{
    "message": "Success ! Spam setting saved successfully."
}
            

Edit theme of company

Edit theme of given company.

Brief

URL Syntax /{_locale}/api/company/theme.{_format}
Method PUT
Example PUT /api/company/theme.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true company Name
domain string true domain name of website like webkul
Cname string false website name
status integer true 0|1 for deactivated|activated
logo file false Jpg, Jpeg, Png images are allowed. (50×50 px)
favicon file false Jpg, Jpeg, Png images are allowed. (50×50 px)
banner file false Jpg, Jpeg, Png images are allowed. (50×50 px)
customCSS file false css file
pageBackgroundColor string true page background color of theme
headerBackgroundColor string true header background color of theme
navTextColor string true navigation background color
linkColor string true link color of theme
linkHoverColor string true link hover color for theme
articleTextColor string true article text color for theme
script string true any required script fot theme
siteDescritption string true site description
metaDescription string true meta description
metaKeywords string true meta keywords to describe content on website
homepageContent string true home page content category|article
ticketCreateOption integer true if login required to create tickets

Request Content Example

    {
        "name": "sample Pvt Ltd",
        "domain": "myweb",
        "cName": "http:\/\/support.mywebsite.com",
        "status": "1",
        "pageBackgroundColor": "",
        "headerBackgroundColor": "",
        "navTextColor": "",
        "linkColor": "",
        "linkHoverColor": "",
        "articleTextColor": "",
        "script": "",
        "siteDescritption": "",
        "metaDescription": "In order to streamline support requests and better serve you, we utilize a support ticket system. Every support request is assigned a unique ticket number which you can use to track the progress and responses online.",
        "metaKeywords": "uvDesk, Customer support system, support ticket system, Webkul Support",
        "homepageContent": "category",
        "ticketCreateOption": "1"
    }
            

Status: 200
{
"message": "Success ! Theme settings has been saved successfully."
}

Tag

This Api can be used to add, Delete tags. Also, tags can be added or removed from Tickets or Articles.

Returns a collection of Tags

Brief

URL Syntax /{_locale}/api/tags.{_format}
Method GET
Example GET /api/tags.json?sort=name&direction=asc

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Filters

Name Information
sort Datatype string Pattern (id|name|ticketCount) Direction ASC|DESC Default id
page Datatype int Default 1
search Datatype string Description search for tag
{
    "tags": [
        {
            "id": 70,
            "name": "amp",
            "ticketCount": "1",
            "articleCount": "0"
        },
        {
            "id": 69,
            "name": "collabration",
            "ticketCount": "7",
            "articleCount": "0"
        },
        {
            "id": 68,
            "name": "support",
            "ticketCount": "7",
            "articleCount": "0"
        },
        {
            "id": 67,
            "name": "sear",
            "ticketCount": "7",
            "articleCount": "0"
        },
        {
            "id": 66,
            "name": "new ticket",
            "ticketCount": "23",
            "articleCount": "0"
        },
        {
            "id": 65,
            "name": "samples",
            "ticketCount": "44",
            "articleCount": "0"
        },
        {
            "id": 64,
            "name": "full",
            "ticketCount": "1",
            "articleCount": "0"
        },
        {
            "id": 63,
            "name": "gud",
            "ticketCount": "1",
            "articleCount": "0"
        },
        {
            "id": 62,
            "name": "integration",
            "ticketCount": "10",
            "articleCount": "0"
        },
        {
            "id": 61,
            "name": "ticket",
            "ticketCount": "10",
            "articleCount": "0"
        }
    ],
    "pagination_data": {
        "last": 4,
        "current": 1,
        "numItemsPerPage": 10,
        "first": 1,
        "pageCount": 4,
        "totalCount": 38,
        "pageRange": 4,
        "startPage": 1,
        "endPage": 4,
        "next": 2,
        "pagesInRange": [
            1,
            2,
            3,
            4
        ],
        "firstPageInRange": 1,
        "lastPageInRange": 4,
        "currentItemCount": 10,
        "firstItemNumber": 1,
        "lastItemNumber": 10,
        "url": "#page/replacePage"
    }
}
            

Delete a given Tag

Brief

URL Syntax /{_locale}/api/tag/{id}.{_format}
Method DELETE
Example DELETE /api/tag/16.json

Requirements

Name Requirement Type Description
id \d+ integer Tag id
_format json|html
_locale en|fr|it|de
Status: 200
{
    "message": "Success ! Tag removed successfully."
}
            

Edit existing Tag

Brief

URL Syntax /{_locale}/api/tag/{id}.{_format}
Method PUT
Example /api/tag/16.json

Requirements

Name Requirement Type Description
id \d+ integer Tag id
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true new tag name

Post Data Example

{
    "name": "important"
}
            

Status: 200
{
    "message": "Success ! Tag updated successfully."
}                
            

Add Tag to Ticket

Brief

URL Syntax /{_locale}/api/ticket/{id}/tags.{_format}
Method POST
Example POST /api/ticket/5784/tags.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true tagname required for POST
id integer true tagId required for DELETE

Post Data Example

            
{
    "name": "integration"
}
            

Status: 200                
{
    "tag": {
        "id": 69,
        "name": "integration"
    },
    "msg": "Success ! Tag added successfully."
}
            

delete Tag from Ticket

Brief

URL Syntax /{_locale}/api/ticket/{id}/tags.{_format}
Method DELETE
Example DELETE /api/ticket/5784/tags.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true tagname required for POST
id integer true tagId required for DELETE

Post Data Example

 
{ 
    "tagId": "2"
}
                

 { "tagId": "2" }

Add Tag to article

Brief for POST

URL Syntax /{_locale}/api/article/{article}/tags.{_format}
Method POST
Example POST /api/article/156/tags.json

Requirements

Name Requirement Type Description
article \d+ integer article id
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true tagname required for POST
id integer true tagId required for DELETE

Post Data Example

{
    "name": "erudicate tag"
}
            

{
    "id": 14,
    "message": "Success ! Tag added successfully."
}
                

delete tag from article

Brief of POST

URL Syntax /{_locale}/api/article/{article}/tags.{_format}
Method POST
Example POST /api/article/156/tags.json

Brief of DELETE

URL Syntax /{_locale}/api/article/{article}/tags.{_format}
Method DELETE
Example DELETE /api/article/156/tags.json

Requirements

Name Requirement Type Description
article \d+ integer article id
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true tagname required for POST
id integer true tagId required for DELETE

Post Data Example

    {
    "id": "14"
    }
            

Status: 200                
{
    "message": "Success ! Tag unassigned successfully."
}
            

Workflow

This Api can be used by Admin to View, Add, edit, reorder workflows. Reordering ordering workflows set priority for their execution.

Get collection of workflow

Brief

URL Syntax /{_locale}/api/workflows.{_format}
Method GET
Example GET /api/wokflows.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de
{ "name": "anyname" }
Add/Edit Workflow

Edit workflow

Brief

URL Syntax /{_locale}/api/workflow/{type}/{workflow}.{_format}
Method PUT
Example PUT /api/workflow/58.json

Requirements

Name Requirement Type Description
workflow \d+ integer workflow id
type \d+
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true workflow name
type integer true workflow nameworkflow type 0|1 for manual|automatic
actions array true action(s) to be performed . Contains subfields: type , value. Actions must be given in assosiative array format
events array false required for type:1 i.e. automatic. Events on which workflow to be triggered. Contains subfields: event, trigger .
conditions array false les conditions de travail. Contient des sous-champs: type de match, valeur.

POST Data Example

{
    "type":"1",
    "name":"Autworkflow",
    "description": "set priority on created",
    "events":[
        {
            "event":"ticket",
            "trigger":"created"
        }
    ],
    "conditions": [
            {
                "type": "subject",
                "match": "contains",
                "value": "abcd"
            }
    ],
    "actions": [
        {
            "type":"priority",
            "value": "1"
        }
    ]
}
{
    "message": "Success! Workflow has been updated successfully."
}                
Add new Workflow

Brief

URL Syntax /{_locale}/api/workflows.{_format}
Method POST
Example POST /api/workflows.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
name string true workflow name
type integer true workflow type 0|1 for manual|automatic
actions array true action(s) to be performed . Contains subfields: type , value. Actions must be given in assosiative array format
events array false required for type:1 i.e. automatic. Events on which workflow to be triggered. Contains subfields: event, trigger .
conditions array false conditions for workflow. Contains subfields: type, match,value.

Post Data Example

{ 
    "type": "1",
    "name": "new priority workflow",
    "description": "set priority on created",
    "events": [
        {
            "event":"ticket",
            "trigger":"created"
        }
    ],
    "conditions": [
        {
            "type":"subject",
            "match":"contains",
            "value":"abcd"
        }
    ],
    "actions": [
        {
            "type": "priority",
            "value":"1"
        }
    ] 
}
Status: 200                
{
    "message": "Success! Workflow has been added successfully.",
    "id": 280
}
Delete a given Workflow

Brief

URL Syntax /{_locale}/api/workflow/{type}/{id}.{_format}
Method DELETE
Example DELETE /api/workflow/121.json

Requirements

Name Requirement Type Description
id \d+ integer Workflow id
_format json|html
_locale en|fr|it|de
type
Status: 200
{
    "message": "Success! Workflow has been removed successfully."
}                
Reorder workflows

Brief

URL Syntax /{_locale}/api/workflows/order.{_format}
Method PUT
Example /api/workflows/order.json

Requirements

Name Requirement Type Description
_format json|html integer workflow id
_locale en|fr|it|de

Parameters

Parameter Type Required Description
auto array true assosiative array, in format workflow-id:position

Post Data Example

{
    "auto":
        {
            "1":"1",
            "2":"3",
            "3":"4",
            "4":"5",
            "5":"6",
            "123":"2"
        }
}
Status: 200
{
    "message": "Success! Order has been updated successfully."
}   

Ticket

This section lists all operations that can be used to view, create, update, delete or modify Tickets. You can also assign agents, add collaborator. This Api can also be used to perform Mass operations i.e. Performing same operations on multiple Tickets.

Note: incrementId({incrementId}) and ticketId({id}) are two different ids for Ticket. Use carefully
View a ticket

Brief

URL Syntax /{_locale}/api/ticket/{incrementId}.{_format}
Method GET
Example GET /api/ticket/4802.json

Requirements

Name Requirement Type Description
incrementId \d+ integer incrementId of ticket
_format json|html
_locale en|fr|it|de
{
  "ticket": {
    "id": 8524,
    "subject": "Welcome to UVdesk",
    "source": "website",
    "formatedCreatedAt": "02-Jun 05:29pm",
    "status": {
      "id": 1,
      "name": "Open",
      "description": "Open",
      "color": "#337ab7",
      "sortOrder": 1
    },
    "type": {
      "id": 807,
      "name": "Support",
      "description": "Support",
      "isActive": true
    },
    "priority": {
      "id": 1,
      "name": "Low",
      "description": "Low",
      "color": "#5cb85c"
    },
    "agent": null,
    "customer": {
      "id": 3073,
      "email": "hello@uvdesk.in",
      "profileImage": null,
      "smallThumbnail": null,
      "enabled": true,
      "role": null,
      "passwordLegal": null,
      "passwordObvious": true,
      "detail": {
        "customer": {
          "id": 3416,
          "companyId": 12,
          "userRole": {
            "id": 4,
            "role": "ROLE_CUSTOMER",
            "name": "Customer"
          },
          "firstName": "UVdesk",
          "lastName": "",
          "name": "UVdesk ",
          "isActive": true,
          "isStarred": null,
          "user": 3073,
          "signature": null,
          "userSavedFilters": [],
          "defaultFiltering": null,
          "managerGroup": null,
          "subGroup": [],
          "managerSubGroup": [],
          "agentPrivilege": [],
          "ticketView": null,
          "sessionId": null,
          "isVerified": false,
          "source": "website",
          "authorisedClients": []
        }
      },
      "timezone": null,
      "managerGroup": [],
      "teamleadSubGroup": null,
      "userSubGroup": null,
      "updatedPassword": null
    },
    "isStarred": null,
    "mailbox": null,
    "tags": [],
    "group": null,
    "rating": 0,
    "collaborators": [],
    "referenceIds": null,
    "isAgentView": true,
    "isCustomerView": null,
    "customFieldValues": [],
    "uniqueReplyTo": "support.c8e2cp5sfzehueoxybje5l@uvdesk.com",
    "isTrashed": false,
    "ticketLabels": [],
    "ratings": [],
    "isNew": true,
    "subgroup": null,
    "agentLastRepliedAt": null,
    "incrementId": 1,
    "socialChannel": null,
    "isSourceDeleted": false,
    "ipAddress": null,
    "isReplied": false
  },
  "labels": {
    "predefind": {
      "all": "1",
      "new": "1",
      "unassigned": "1",
      "notreplied": "1",
      "mine": "0",
      "starred": "0",
      "trashed": "0"
    },
    "custom": []
  },
  "todo": [],
  "userDetails": {
    "user": 3241,
    "name": "pnr status",
    "pic": null,
    "role": true
  },
  "createThread": {
    "id": 91425,
    "reply": "This is a reply",
    "fullname": "UVdesk",
    "source": "website",
    "threadType": "create",
    "replyTo": null,
    "cc": null,
    "bcc": null,
    "userType": "customer",
    "createdAt": {
        "date": "2017-06-02 17:29:52",
        "timezone_type": 3,
        "timezone": "Asia/Calcutta"
    },
    "viewedAt": null,
    "messageId": "<2u063jnmgt2h7w3hdxud@mail.uvdesk.com>",
    "isLocked": false,
    "bookmark": null,
    "attachments": [],
    "user": {
        "id": 3073,
        "email": "hello@uvdesk.in",
        "name": "UVdesk ",
        "firstName": "UVdesk",
        "lastName": "",
        "contactNumber": null,
        "profileImage": null,
        "smallThumbnail": null
    },
    "formatedCreatedAt": "02-Jun 05:29pm",
    "timestamp": 1496404740
  },
  "ticketTotalThreads": "0",
  "ticketTasks": [],
  "status": [
    {
        "id": 1,
        "name": "Open",
        "description": "Open",
        "color": "#337ab7",
        "sortOrder": 1
    },
    {
        "id": 2,
        "name": "Pending",
        "description": "Pending",
        "color": "#d9534f",
        "sortOrder": 2
    },
    {
        "id": 6,
        "name": "Answered",
        "description": "Answered",
        "color": "#F1BB52",
        "sortOrder": 3
    },
    {
        "id": 3,
        "name": "Resolved",
        "description": "Resolved",
        "color": "#5cb85c",
        "sortOrder": 4
    },
    {
        "id": 4,
        "name": "Closed",
        "description": "Closed",
        "color": "#767676",
        "sortOrder": 5
    },
    {
        "id": 5,
        "name": "Spam",
        "description": "Spam",
        "color": "#00A1F2",
        "sortOrder": 6
    }
  ],
  "group": [
    {
        "id": 835,
        "name": "Default",
        "subGroups": []
    }
  ],
  "priority": [
    {
        "id": 1,
        "name": "Low",
        "description": "Low",
        "color": "#5cb85c"
    },
    {
        "id": 2,
        "name": "Medium",
        "description": "Medium",
        "color": "#337ab7"
    },
    {
        "id": 3,
        "name": "High",
        "description": "High",
        "color": "#f0ad4e"
    },
    {
        "id": 4,
        "name": "Urgent",
        "description": "Urgent",
        "color": "#d9534f"
    }
  ],
  "type": [
    {
        "id": 807,
        "name": "Support",
        "description": "Support",
        "isActive": true
    }
  ]
}

Return a Collection of Tickets
Note: By default without actAsType this endpoint returns Open tickets only

Brief

URL Syntax /{_locale}/api/tickets.{_format}
Method GET
Example GET /api/tickets.json?trashed&sort=t.id&direction=asc

Filters

Name Information
new
unassigned
mine
starred Datatype int
trashed
label Datatype int Description labelId
status Datatype int Description statusId
agent Datatype int Description agentId
customer Datatype int Description customerId
priority Datatype int Description priorityId
group Datatype int Description groupId
team Datatype int Description teamId
tags Datatype int Description tagId
mailbox Datatype int Description mailboxId
sort Datatype string Pattern (t.id|t.updatedAt|agentName|c.email|name) ASC|DESC Default t.id
page Datatype int Default 1
search Datatype string Description search for Ticket
actAsType Datatype string Description Admin can actAs customer, options: customer, agent
actAsEmail Datatype string Description Email of acted user
{
  "tabs": {
    "1": "1",
    "2": 0,
    "3": 0,
    "4": 0,
    "5": 0,
    "6": 0
  },
  "tickets": [
    {
      "id": 8524,
      "incrementId": 1,
      "subject": "Welcome to UVdesk",
      "isStarred": null,
      "isAgentView": true,
      "isTrashed": false,
      "source": "website",
      "group": null,
      "team": null,
      "priority": {
        "id": 1,
        "name": "Low",
        "description": "Low",
        "color": "#5cb85c"
      },
      "type": "Support",
      "timestamp": 1496404740,
      "formatedCreatedAt": "02-Jun 05:29pm",
      "totalThreads": "0",
      "agent": null,
      "customer": {
        "id": 3073,
        "email": "hello@uvdesk.in",
        "name": "UVdesk "
      },
      "hasAttachments": 0
    }
  ],
  "pagination": {
    "last": 1,
    "current": 1,
    "numItemsPerPage": 15,
    "first": 1,
    "pageCount": 1,
    "totalCount": 1,
    "pageRange": 1,
    "startPage": 1,
    "endPage": 1,
    "pagesInRange": [
      1
    ],
    "firstPageInRange": 1,
    "lastPageInRange": 1,
    "currentItemCount": 1,
    "firstItemNumber": 1,
    "lastItemNumber": 1,
    "url": "#page/replacePage"
  },
  "labels": {
    "predefind": {
      "all": "1",
      "new": "1",
      "unassigned": "1",
      "notreplied": "1",
      "mine": "0",
      "starred": "0",
      "trashed": "0"
    },
    "custom": []
  },
  "userDetails": {
    "user": 3241,
    "name": "pnr status",
    "pic": null,
    "role": true
  },
  "status": [
    {
      "id": 1,
      "name": "Open",
      "description": "Open",
      "color": "#337ab7",
      "sortOrder": 1
    },
    {
      "id": 2,
      "name": "Pending",
      "description": "Pending",
      "color": "#d9534f",
      "sortOrder": 2
    },
    {
      "id": 6,
      "name": "Answered",
      "description": "Answered",
      "color": "#F1BB52",
      "sortOrder": 3
    },
    {
      "id": 3,
      "name": "Resolved",
      "description": "Resolved",
      "color": "#5cb85c",
      "sortOrder": 4
    },
    {
      "id": 4,
      "name": "Closed",
      "description": "Closed",
      "color": "#767676",
      "sortOrder": 5
    },
    {
      "id": 5,
      "name": "Spam",
      "description": "Spam",
      "color": "#00A1F2",
      "sortOrder": 6
    }
  ],
  "group": [
    {
      "id": 835,
      "name": "Default",
      "subGroups": []
    }
  ],
  "team": [],
  "priority": [
    {
      "id": 1,
      "name": "Low",
      "description": "Low",
      "color": "#5cb85c"
    },
    {
      "id": 2,
      "name": "Medium",
      "description": "Medium",
      "color": "#337ab7"
    },
    {
      "id": 3,
      "name": "High",
      "description": "High",
      "color": "#f0ad4e"
    },
    {
      "id": 4,
      "name": "Urgent",
      "description": "Urgent",
      "color": "#d9534f"
    }
  ],
  "type": [
    {
      "id": 807,
      "name": "Support",
      "description": "Support",
      "isActive": true
    }
  ],
  "mailbox": []
}

Download Attachment

Brief

URL Syntax /{_locale}/api/ticket/attachment/{id}.{_format}
Method GET
Example /api/ticket/attachment/786.json

Requirements

Name Requirement Type Description
id \d+ integer attachment id
_format json|html
_locale en|fr|it|de

Attachment File

Delete a given Ticket

Brief

URL Syntax /{_locale}/api/ticket/{id}.{_format}
Method DELETE
Example /api/ticket/4082.json

Requirements

Name Requirement Type Description
id \d+ integer id of ticket
_format json|html
_locale en|fr|it|de
Status: 200
{
  "message": "Success ! Ticket moved to trash successfully."
}
Edit given ticket's properties

Brief

URL Syntax /{_locale}/api/ticket/{id}.{_format}
Method PATCH
Example /api/ticket/5774.json

Requirements

Name Requirement Type Description
id \d+ integer id of ticket
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
editType string true property type that you want to edit. options : status|type|priority|group|label|star
value string false value for corresponding property, optional for editType:star

Request Post Data Example

{
 "editType": "priority", 
"value": "2" 
}

Possible parameters

editType Value
status 1|2|3|4|5|6 for open|pending|resolved|closed|Spam|Answered repectively
type {TicketTypeId} like 5 for Support
priority 1|2|3|4 for Low|medium|High|Urgent
group {groupId}
label (remove label) value: {labelId}
star starred
Status: 200 
{
 "message": "Success: priority updated"
}
Edit given ticket

Brief

URL Syntax /{_locale}/api/ticket/{id}.{_format}
Method PUT
Example /api/ticket/5784.json

Requirements

Name Requirement Type Description
id \d+ integer id of member
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
type int true 1|2|3|4|5|6 for open|pending|resolved|closed|Spam|Answered repectively
from email true email address
reply string true reply content
subject string true ticket subject

Request Post Example Data:

{ 
"type": "2",
 "from": "test@gmail.com",
 "reply": "This is a edited reply.",
 "subject": "subject of ticket"
}
Status: 200
{
 "message": "Success ! Ticket has been updated successfully."
}

Assign Agent to a ticket

Brief

URL Syntax /{_locale}/api/ticket/{id}/agent.{_format}
Method PUT
Example /api/ticket/5784/agent.json

Requirements

Name Requirement Type Description
id \d+ integer id of member
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
id integer true agent id

Post Data Example

{
    "id":
    "2997"
}
Status: 200                
    {
        "message": "Success ! Agent successfully assigned."
    }

Remove collaborator from Ticket

Brief

URL Syntax /{_locale}/api/ticket/{id}/collaborator.{_format}
Method DELETE
Example /api/ticket/4545/collaborator.json

Requirements

Name Requirement Type Description
id \d+ integer ticket's Id
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
collaboratorId integer true collaborator's Id

Sample Post Data

{ 
    "collaboratorId": "55"
}
Status: 200                
{
  "message": "Success ! Collaborator removed successfully."
}

Add collaborator for Ticket

Brief

URL Syntax /{_locale}/api/ticket/{id}/collaborator.{_format}
Method POST
Example /api/ticket/collabrator.json

requirements

Name Requirement Type Description
id \d+ integer id of member
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
email email true collaborator email

Post Data Example

    {
        "email": "abcdnew123@gmail.com"
    }
{
    "collaborator": {
        "id": 2997,
        "email": "abcdnew123@gmail.com",
        "profileImage": null,
        "smallThumbnail": null,
        "enabled": true,
        "userName": "abcdnew123@gmail.com",
        "role": "ROLE_AGENT",
        "timezone": "Africa/Accra",
        "managerGroup": [],
        "teamleadSubGroup": [],
        "userSubGroup": []
    },
    "message": "Success ! Collaborator added successfully."
}

Trash a given ticket

Brief

URL Syntax /{_locale}/api/ticket/{id}/trash.{_format}
Method PUT
Example /api/ticket/4802/trash.json

Requirements

Name Requirement Type Description
id \d+ integer id of ticket
_format json|html
_locale en|fr|it|de
Status: 200                
{
  "message": "Success ! Ticket moved to trash successfully."
}

Delete multiple Tickets

Brief

URL Syntax /{_locale}/api/tickets.{_format}
Method DELETE
Example DELETE /api/tickets.json

Requirements

Name Requirement Type Description
_format json|html

Parameters

Parameter Type Required Description
ids array true ticket ids to be deleted

Post Data Example

{ 
    "ids": [5576,5784]
}
{
  "deletedTickets": "5776,5784",
  "message": "Success ! Ticket(s) removed successfully."
}               

Trash multiple Tickets

Brief

URL Syntax /{_locale}/api/tickets/trash.{_format}
Method PUT
Example PUT /api/tickets/trash.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
ids array true ticket ids to be trashed

Post Data Example

{ 
    "ids": [5576,5784] 
}

 

Status: 200
{
  "message": "Success ! Tickets moved to trashed successfully."
}

Change Status of multiple Tickets

Brief

URL Syntax /{_locale}/api/tickets/status.{_format}
Method PUT
Example PUT /api/tickets/status.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
ids array true ticket ids to be trashed
statusId integer true status id
{ 
    "ids": [4802,5784], 
    "statusId": "1" 
}
Status: 200                
{
  "message": "Success ! Tickets status changed successfully."
}

Restore multiple Tickets

Brief

URL Syntax /{_locale}/api/tickets/restore.{_format}
Method PUT
Example PUT /api/tickets/restore.json

Requirements

Name Requirement Type Description
id \d+
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
ids array true ticket ids to be restored

Post Data Example

{ 
    "ids": [5576,5784],
    "statusId": 1
}
Status: 200                
{
  "warning": "Ticket(s) not found: 5576",
  "message": "Success ! Tickets restored successfully."
}

Change Priority of multiple Tickets

Brief

URL Syntax /{_locale}/api/tickets/priority.{_format}
Method PUT
Example PUT /api/tickets/priority.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
ids array true ticket ids
priorityId integer true priority id

Post Data Example

{ 
    "ids": [5784,5785],
    "priorityId": "2" 
}
Status: 200                
{
  "message": "Success ! Tickets priority changed successfully."
}

Add label to multiple Tickets

Brief

URL Syntax /{_locale}/api/tickets/label.{_format}
Method PUT
Example PUT /api/tickets/label.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
ids array true ticket ids
labelId integer true label id

Post Data Example

{ 
    "ids": [5784,5785],
    "labelId": "2" 
}
Status: 200                
{
  "message": "Success ! label added to Tickets successfully."
}

Change Group of multiple Tickets

Brief

URL Syntax /{_locale}/api/tickets/group.{_format}
Method PUT
Example PUT /api/tickets/group.json

Requirements

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
ids array true ticket ids
groupId integer true group id

Post Data Example

    { 
        "ids": [5771,5772],
        "groupId": "5" 
    }
Status: 200                
{
    "message": "Success ! Tickets group changed successfully."
}

Assign Agent to multiple Tickets

Brief

URL Syntax /{_locale}/api/tickets/agent.{_format}
Method PUT
Example PUT /api/tickets/agent.json

Requirement

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
ids array true ticket ids
agentId integer true agent id

Post Data Example

{ 
    "ids": [5576,5784],
    "id": "2997" 
}
Status: 200
{
  "message": "Success ! Agent assigned successfully."
}                
Add ticket

Create ticket. Method: POST

Brief

URL Syntax /{_locale}/api/tickets.{_format}
Method POST
Example POST /api/tickets.json

Requirement

Name Requirement Type Description
_format json|html
_locale en|fr|it|de

Parameters

Parameter Type Required Description
type integer true 1|2|3|4|5|6 for open|pending|resolved|closed|Spam|Answered repectively
name string true ticket name
from string true email address
reply string true reply content
subject string true ticket subject
customFields array false custom fields (if present) could be provided
actAsType string false admin can actAsType customer, agent
actAsEmail string false provide when acting as agent

Post Data Example

{ 
    "name": "customer name",
    "type": "2",
    "from": "test@gmail.com",
    "reply": "This is a demo reply.",
    "subject": "subject of ticket" 
}
Status: 200                
{
  "message": "Success ! Ticket has been created successfully.",
  "id": 2,
  "incrementId": 2,
  "ticketId": 8528
}

Request Format

The UVdesk API is a JSON API. You can supply a Content-Type: application/json header in PUT and POST requests. You can also set an Accept: application/json header on all requests.
Example:

POST https://{subdomain}.uvdesk.com/en/api/labels.json

{
 "name": "myLabel"
}

Response Format

The UVdesk API responds to successful requests with HTTP status codes in the 200 – 300 range. When you create or update a resource, the API provides the result in the JSON format in the response body.
Example:

Status: 200 Success
{
 "message": "Success ! Label created successfully.",
 "label": {
 "id": 89,
 "name": "myLabel",
 "color": null,
 "labelUser": 59
 }
}

Increase sale by better support

Shakehand with a company who deals in eCommerce since last 14 years

SIGN UP SCHEDULE A DEMO