Desk360 Docs
Search…
API Documentation

​
πŸ’¬
Introduction

​Desk360 API is a Representational State Transfer (REST) ​​structure that provides operations such as:
β—Ύ
Reading
β—Ύ
Modifying
β—Ύ
Adding data
β—Ύ
Deleting data from your help desk.
Desk360 APIs also support Cross-Origin Resource Sharing (CORS).

​
✨
HTTP Methods

The list of API commands used by Desk360
Command
Description
GET
Fetches object(s)
POST
Creates an object
PUT
Updates/Modifies an object
All API requests must reach the secure endpoint i.e. HTTPS only

​
πŸ’¨
Rate Limit

This rate limit applies are based on IP address.
The limits will be company based rather than IP based in the future.
Plan
Rate Limit/Minute
Free
10
Premium
50
Business
100
Enterprise
Up to your demand. For further requests, contact us.
    Make sure to apply the rate limit-best practices and it stays within the rate limit.
    Make sure to make API calls in a safe layer such as your backend, not front-end or your mobile application.
    Remind that even invalid requests are included in the rate limit.
Check your current rate limit status by looking at the following HTTP headers returned in response to each API request:
1
HTTP/1.1 200 OK
2
Content-Type: application/json
3
X-RateLimit-Limit: 180
4
X-RateLimit-Remaining: 178
Copied!
Title
Description
X-RateLimit-Limit
Total number of API calls allowed per minute.
X-RateLimit-Remaining
The number of requests remaining in the current rate limit window.
X-RateLimit-Reset
The reset time in Unix epoch time format.
Retry-After
The number of seconds you should wait in order to trigger your next API request.
This header is returned only when the rate limit is reached.
If your API request is received after the rate limit is reached, Desk360 will return an error in the response. The Retry-After value in the response header will tell you how long to wait before sending another API request.
1
HTTP/1.1 200 OK
2
Content-Type: application/json
3
Retry-After: 26
Copied!

​
πŸš€
Getting Started

​
πŸ”’
Authentication

Who can access my helpdesk? Can anyone see my data?
Before prioritizing a ticket or responding to a customer or using any of the APIs listed above, you must authenticate or log in as you sign in to your helpdesk web portal.
To authenticate the request, you can use your personal. You can access this API key directly from the panel, or you can obtain your API token with a request with your username and password.
All Desk360 API endpoints (except login) need this token in order to respond to your request.
Option 1: Obtain your token with a request.
If you enable password access from your Desk360 Panel / Settings / API you can directly use v1/login endpoint in order to create/obtain an API token. This API will return an API token if it is already created, if not it will auto-generate a token and returns it.
To make it secure, the maximum wrong login attempt is fixed to 5 per minute.
Correct attempts do not affect the limits.
get
https://api.desk360.com
/v1/login
Login
cURL
C#
Java
JavaScript
PHP
Python
1
curl --location --request POST 'https://api.desk360.com/v1/login' \
2
--header 'Content-Type: application/json' \
3
--data-raw '{
4
"email": "[email protected]",
5
"password": "YOUR_PASSWORD"
6
}'
Copied!
1
var client = new RestClient("https://api.desk360.com/v1/login");
2
client.Timeout = -1;
3
var request = new RestRequest(Method.POST);
4
request.AddHeader("Content-Type", "application/json");
5
request.AddParameter("application/json", "{\n \"email\": \"[email protected]\",\n \"password\": \"YOUR_PASSWORD\"\n}", ParameterType.RequestBody);
6
IRestResponse response = client.Execute(request);
7
Console.WriteLine(response.Content);
Copied!
1
OkHttpClient client = new OkHttpClient().newBuilder()
2
.build();
3
MediaType mediaType = MediaType.parse("application/json");
4
RequestBody body = RequestBody.create(mediaType, "{\n \"email\": \"[email protected]\",\n \"password\": \"YOUR_PASSWORD\"\n}");
5
Request request = new Request.Builder()
6
.url("https://api.desk360.com/v1/login")
7
.method("POST", body)
8
.addHeader("Content-Type", "application/json")
9
.build();
10
Response response = client.newCall(request).execute();
Copied!
1
var axios = require('axios');
2
var data = JSON.stringify({"email":"[email protected]","password":"YOUR_PASSWORD"});
3
​
4
var config = {
5
method: 'post',
6
url: 'https://api.desk360.com/v1/login',
7
headers: {
8
'Content-Type': 'application/json'
9
},
10
data : data
11
};
12
​
13
axios(config)
14
.then(function (response) {
15
console.log(JSON.stringify(response.data));
16
})
17
.catch(function (error) {
18
console.log(error);
19
});
Copied!
1
<?php
2
$client = new http\Client;
3
$request = new http\Client\Request;
4
$request->setRequestUrl('https://api.desk360.com/v1/login');
5
$request->setRequestMethod('POST');
6
$body = new http\Message\Body;
7
$body->append('{
8
"email": "[email protected]",
9
"password": "YOUR_PASSWORD"
10
}');
11
$request->setBody($body);
12
$request->setOptions(array());
13
$request->setHeaders(array(
14
'Content-Type' => 'application/json'
15
));
16
$client->enqueue($request)->send();
17
$response = $client->getResponse();
18
echo $response->getBody();
Copied!
1
import requests
2
​
3
url = "https://api.desk360.com/v1/login"
4
​
5
payload="{\n \"email\": \"[email protected]\",\n \"password\": \"YOUR_PASSWORD\"\n}"
6
headers = {
7
'Content-Type': 'application/json'
8
}
9
​
10
response = requests.request("POST", url, headers=headers, data=payload)
11
​
12
print(response.text)
13
​
Copied!
Option 2: Create a token from Panel
    1.
    Login to your Desk360 Panel.
    2.
    Go to Settings.
    3.
    Click API.
    4.
    Create a token for a user.

​
πŸ“Ž
Attachments

The following endpoints are supported with attachments:
​
β—Ύ
Replying to a ticket
β—Ύ
Adding a note to a ticket
Please follow the guidelines listed below:
    Only files on a local machine can be added using the API. You can not use links!
    Content-Type should always be multi-part/form-data for attached requests.

​
❌
Errors

I received an error. How can I solve it?
API requests that cause errors will return an appropriate HTTP status code to help determine the type of error. You can use the following table to understand what each code means:
HTTP Status Code
Status Code Definition
Description
400
Client or Validation Error
The request body/query string is not in the correct format.
For example, the Create a ticket API requires the email field to be submitted as part of the request, and if it is missing, this status code is returned.
401
Authentication Failure
This indicates that the Authorization field is either missing or incorrect.
Check Authentication for more information.
404
Requested Resource not Found
The request contains an invalid ID / Desk360 domain or invalid parameters in the URL. For example, an API call to retrieve a ticket with an invalid ID will return an HTTP 404 status code to inform you that no such ticket exists.
405
Method not allowed
This API request has used the wrong HTTP method.
For example, a DELETE requested on /products endpoint will return an HTTP 405 as /products allows only GET requests.
406
Unsupported Accept Header
Only application/json and */* are supported. When uploading files multipart/form-data are supported.
415
Unsupported Content-type
Only application/json is supported.
429
Rate Limit Exceeded
The API rate limit allowed for your Desk360 domain has been exhausted. Check Rate Limit.
500
Unexpected Server Error
You can't do much more here. This indicates an error on the Desk360 side. Please email us your API script with response headers. We will contact you and fix this issue as soon as possible.
Sample error response
In addition to the HTTP status code, most errors also return a response with more information to help you troubleshoot the error. An example error response is shown below. The format of the error response is explained after the example.
1
"error": {
2
"code": "failed_validation",
3
"message": "The status field is required."
4
"doc_url": "https://docs.desk360.com/api"
5
}
6
}
Copied!
Error Response Fields
Field
Description
code
Custom error code that is machine-parseable.
message
Descriptive error message.
doc_url
A link to guide you if there is a solution on the documentation.

Error Codes

Code
Description
authentication_exception
Authentication failed. The token is missing or invalid. Do not forget to put "Bearer" in the beginning of your token. eg: "Bearer YOUR-API-TOKEN"
method_not_allowed_exception
If the method and endpoint is mismatched, you will get this error. Please check the endpoint method. eg: Products only allows GET method.
not_found_exception
You may have made a typo in your request URL.
model_not_found_exception
Requested resource not found, the resource maybe deleted or maybe the resource is not yours.
internal_server_error
The error is coming from our servers. If you have been receiving this error message for a while, contact us.
insecure_request_exception
HTTP is not allowed. Use HTTPS instead.
too_many_requests_exception
Check Rate Limit.
invalid_credentials
You typed your email/password wrong.
password_access_disabled
You can enable password access from your Desk360 Panel Settings. Check Authentication to learn how to enable password access.
too_many_attempts
If you entered your email/password wrong more than 5 times, you should wait for a minute.
not_authorized
You do not have permission to modify the resource.
not_found
Requested resource not found, the resource maybe deleted or maybe the resource is not yours.
status_update_failed
Status update failed. You can only set Resolved (1) or Waiting (2), also, if the ticket is resolved you can not change the reason.
facebook_integration_error
instagram_integration_error
twitter_integration_error
Check your integration is still active from your Desk360 Panel. If it is active and you getting the error, the issue might be coming from Facebook/Twitter servers.
email_error
There is an error while sending the email. The email might be invalid.
non_custom_type
You can not update/delete non-custom types.
failed_validation
This is a validation error, please read the message and apply what it says.

​
πŸ“„
Pagination

API responses that return a list of objects are paginated, for example, View Ticket List. Add the parameter page to the query string to navigate through the pages. The page number starts from 1 and each page is fixed to show 20 objects.
1
https://api.desk360.com/api/v1/products/1/tickets?page=1
Copied!
The "Link" header in the response will be showing the next page if it exists:
1
Headers
2
"Link" : <https://api.desk360.com/v1/products/1/tickets?page=2>; rel=next
Copied!
If you are on the last page the link header will not be filled.

​
βœ…
Best Practices

    Whenever it is possible, please queue API calls on your side. This allows you to buffer recent calls to avoid reaching the rate limit. Once you reach the rate limit, retry API calls after the retry period.
    Whenever it is feasible, cache the data that does not change much on your side. For example, the mapping between agent name and ID is extremely unlikely to change, so it is a useful approach to cache this data to avoid the rate limit.
    Avoid making API calls directly from a mobile app, instead, send the request to your servers and make API calls from there. This ensures that if an API endpoint is changed, you can make and deploy the change on your server instead of updating your application and forcing your customers to the latest version.

​
🎫
Products & Tickets

Apart from its competitors, Desk360 enables its customers to manage multiple products under one account. Therefore, for the ticket transactions, you must first determine the product under which you will perform these transactions. For exampleproducts/1/tickets shows tickets for the product with the Product ID 1.
In order to find your Product ID, visit Products.
get
https://api.desk360.com
/v1/products
Products
Code Samples
cURL
C#
Java
JavaScript
PHP
Python
1
curl --location --request GET 'https://api.desk360.com/v1/products' \
2
--header 'Authorization: Bearer YOUR_API_TOKEN'
Copied!
1
var client = new RestClient("https://api.desk360.com/v1/products");
2
client.Timeout = -1;
3
var request = new RestRequest(Method.GET);
4
request.AddHeader("Authorization", "Bearer YOUR_API_TOKEN");
5
IRestResponse response = client.Execute(request);
6
Console.WriteLine(response.Content);
Copied!
1
OkHttpClient client = new OkHttpClient().newBuilder()
2
.build();
3
Request request = new Request.Builder()
4
.url("https://api.desk360.com/v1/products")
5
.method("GET", null)
6
.addHeader("Authorization", "Bearer YOUR_API_TOKEN")
7
.build();
8
Response response = client.newCall(request).execute();
Copied!
1
var axios = require('axios');
2
​
3
var config = {
4
method: 'get',
5
url: 'https://api.desk360.com/v1/products',
6
headers: {
7
'Authorization': 'Bearer YOUR_API_TOKEN'
8
}
9
};
10
​
11
axios(config)
12
.then(function (response) {
13
console.log(JSON.stringify(response.data));
14
})
15
.catch(function (error) {
16
console.log(error);
17
});
18
​
Copied!
1
<?php
2
​
3
$curl = curl_init();
4
​
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://api.desk360.com/v1/products',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'GET',
14
CURLOPT_HTTPHEADER => array(
15
'Authorization: Bearer YOUR_API_TOKEN'
16
),
17
));
18
​
19
$response = curl_exec($curl);
20
​
21
curl_close($curl);
22
echo $response;
23
​
Copied!
1
import requests
2
​
3
url = "https://api.desk360.com/v1/products"
4
​
5
payload={}
6
headers = {
7
'Authorization': 'Bearer YOUR_API_TOKEN'
8
}
9
​
10
response = requests.request("GET", url, headers=headers, data=payload)
11
​
12
print(response.text)
Copied!
get
https://api.desk360.com
/v1/products/:productId/tickets
Get Ticket List
Code Samples
cURL
C#
Java
JavaScript
PHP
Python
1
curl --location --request GET 'https://api.desk360.com/v1/products/1/tickets?page=1' \
2
--header 'Authorization: Bearer YOUR_API_TOKEN'
Copied!
1
var client = new RestClient("https://api.desk360.com/v1/products/1/tickets");
2
client.Timeout = -1;
3
var request = new RestRequest(Method.GET);
4
request.AddHeader("Authorization", "Bearer YOUR_API_TOKEN");
5
IRestResponse response = client.Execute(request);
6
Console.WriteLine(response.Content);
Copied!
1
OkHttpClient client = new OkHttpClient().newBuilder()
2
.build();
3
Request request = new Request.Builder()
4
.url("https://api.desk360.com/v1/products/1/tickets")
5
.method("GET", null)
6
.addHeader("Authorization", "Bearer YOUR_API_TOKEN")
7
.build();
8
Response response = client.newCall(request).execute();
Copied!
1
var axios = require('axios');
2
​
3
var config = {
4
method: 'get',
5
url: 'https://api.desk360.com/v1/products/1/tickets',
6
headers: {
7
'Authorization': 'Bearer YOUR_API_TOKEN'
8
}
9
};
10
​
11
axios(config)
12
.then(function (response) {
13
console.log(JSON.stringify(response.data));
14
})
15
.catch(function (error) {
16
console.log(error);
17
});
18
​
Copied!
1
<?php
2
​
3
$curl = curl_init();
4
​
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://api.desk360.com/v1/products/1/tickets',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'GET',
14
CURLOPT_HTTPHEADER => array(
15
'Authorization: Bearer YOUR_API_TOKEN'
16
),
17
));
18
​
19
$response = curl_exec($curl);
20
​
21
curl_close($curl);
22
echo $response;
23
​
Copied!
1
import requests
2
​
3
url = "https://api.desk360.com/v1/products/1/tickets"
4
​
5
payload={}
6
headers = {
7
'Authorization': 'Bearer YOUR_API_TOKEN'
8
}
9
​
10
response = requests.request("GET", url, headers=headers, data=payload)
11
​
12
print(response.text)
Copied!

Descriptive Tables

Priority
Platform
Status
Message Types
Priority
Value
Low
0
Medium
1
High
2
Urgent
3
Platform
Value
Desk360 SDK iOS contact us tickets
iOS
AppStore review tickets
AppStore
GooglePlay review tickets
GooglePlay
Web contact us tickets
Web
Desk360 SDK Android tickets
Android
Email tickets
Mail
Facebook tickets
Facebook
Twitter mention tickets
Mention
Internal created tickets
Internal
Twitter direct message tickets
DirectMessage
Twitter retweet comment tickets
RetweetComment
Twitter tweet tickets
Tweet
Facebook messenger tickets
Messenger
Status
Value
Unresolved
0
Resolved
1
Waiting
2
Reopen
3
Type
Value
Text Message
0
GIF
1
Image
2
Video
3
External Message
4
Twitter Message
5
Note
6
Auto Reply
7
Slack
8
get
https://api.desk360.com
/v1/products/:productId/tickets/:ticketId
Get Ticket Details
Code Samples
cURL
C#
Java
JavaScript
PHP
Python
1
curl --location --request GET 'https://api.desk360.com/v1/products/1/tickets/1' \
2
--header 'Authorization: Bearer YOUR_API_TOKEN'
Copied!
1
var client = new RestClient("https://api.desk360.com/v1/products/1/tickets/1");
2
client.Timeout = -1;
3
var request = new RestRequest(Method.GET);
4
request.AddHeader("Authorization", "Bearer YOUR_API_TOKEN");
5
IRestResponse response = client.Execute(request);
6
Console.WriteLine(response.Content);
Copied!
1
OkHttpClient client = new OkHttpClient().newBuilder()
2
.build();
3
Request request = new Request.Builder()
4
.url("https://api.desk360.com/v1/products/1/tickets/1")
5
.method("GET", null)
6
.addHeader("Authorization", "Bearer YOUR_API_TOKEN")
7
.build();
8
Response response = client.newCall(request).execute();
Copied!
1
var axios = require('axios');
2
​
3
var config = {
4
method: 'get',
5
url: 'https://api.desk360.com/v1/products/1/tickets/1',
6
headers: {
7
'Authorization': 'Bearer YOUR_API_TOKEN'
8
}
9
};
10
​
11
axios(config)
12
.then(function (response) {
13
console.log(JSON.stringify(response.data));
14
})
15
.catch(function (error) {
16
console.log(error);
17
});
18
​
Copied!
1
<?php
2
​
3
$curl = curl_init();
4
​
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://api.desk360.com/v1/products/1/tickets/1',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'GET',
14
CURLOPT_HTTPHEADER => array(
15
'Authorization: Bearer YOUR_API_TOKEN'
16
),
17
));
18
​
19
$response = curl_exec($curl);
20
​
21
curl_close($curl);
22
echo $response;
23
​
Copied!
1
import requests
2
​
3
url = "https://api.desk360.com/v1/products/1/tickets/1"
4
​
5
payload={}
6
headers = {
7
'Authorization': 'Bearer YOUR_API_TOKEN'
8
}
9
​
10
response = requests.request("GET", url, headers=headers, data=payload)
11
​
12
print(response.text)
13
​
Copied!
get
https://api.desk360.com
/v1/products/:productId/tickets/:ticketId/logs
Get Ticket Logs
Code Samples
cURL
C#
Java
JavaScript
PHP
Python
1
curl --location --request GET 'api.localhost:10380/v1/products/1/tickets/1/logs' \
2
--header 'Authorization: Bearer YOUR_API_TOKEN'