DESKIE API
Overview
Introduction
The API is an interface for managing any software from the outside. This management is carried out with the help of collections of procedures and functions. An API integration serves as the connection between two platforms, letting them exchange data without any user intervention.

The Deskie API allows you to remotely: retrieve, update, create and delete data from your account. Here are some of the actions you are able to perform by using our API:

  • connecting your own request form;
  • getting a list of cases;
  • changing parameters of the cases;
  • getting a list of users;
  • blocking users;
  • creating and editing groups;
  • deactivating and deleting agents.

By default, the search option is used in many methods. Let's say you need to find a user with the following email address: [email protected]. The search result will include not only this address but also the ones ([email protected], [email protected]) you may not need. To search for an exact string, and not inclusion, use the symbol ^. Examples: ^string^ is searching for an exact string; ^string is searching for the strings that start with the entered value; string^ is searching for the strings that end with the entered value.

We do constantly add new API methods to cover all your needs in terms of integration with Deskie. In case we do not have a ready-to-use API method you are looking for, please contact us. The most demanded methods will be implemented first.

We recommend getting acquainted with some of the samples of API in PHP.
API rate limits depend on your plan:
- Basic — up to 50 RPM, but not less than 20 RPM;
- Standard — up to 750 RPM;
- Pro — up to 1 500 RPM.

RPM — requests per minute. The limit is 5 RPM per enabled agent for Basic and Standard plans, 10 RPM — for Pro plan. Sample calculations:
- 10 agents and Basic plan → the limit is 10 * 5 = 50 RPM;
- 100 agents and Standard plan → the limit is 100 * 5 = 500 RPM;
- 100 agents and Pro plan → the limit is 100 * 10 = 1 000 RPM.

If the rate limit is exceeded, the API returns "429 Too Many Requests" response code.

Write requests (POST, PUT, DELETE) count as 2 requests toward the rate limit.

To make sure you stay within the rate limit, your script must check headers in the response:
  • rate_limit_per_minute — maximum number of requests per minute;
  • api_calls_left — number of requests remaining in the current rate limit interval;
  • retry_after — numbers of seconds to wait until the rate limit is refreshed.
Authentication
To access the API you need to pass the authentication first. It is carried out with the help of the API key and the email address registered with an active agent account (not the admin account) since some methods imply actions on behalf of the employee. Use the email address of the agent account (staff_email) that is unlikely to ever be deactivated or deleted.
Request example

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/cases.json
How to get the API key?
  1. Log into the admin account
  2. Go to the "Settings" > "API"
  3. Click on the "add API key" link
General rules for the requests
To retrieve, create or update the data, you need to use identifiers or "URIs" within the request. The URL of any API request should be composed as follows:

https://[domain].deskie.io/api/[URI]
For example, to get a list of the cases for the robotsrule account, the request should be composed as follows:

https://robotsrule.deskie.io/api/cases.json
Methods for passing request parameters
Access to data
During authentication, in addition to the API key, you specify the email address registered with an active agent account. Therefore, the access to data and the option of updating the data are determined by the access rights granted to that particular agent account.

If the selected agent has a limited access level, you will not be able to get the list of all cases. It is for this reason, we do advise you to specify the email address registered with the agent account that has a full access level.