EddyDesk API V2
Overview ¶
HOST: https://system_domain/api/v2
Authorization
Authorization is performed using Basic Authorization, as parameters it is necessary to pass the user’s e-mail and API key. System administrator API key can be found in Administration->Global settings->System, other user’s keys can be found in the user card, keys are visible only to the main administrator.
The key in the “Authorization: Basic” header is a combination of email:api_key encoded with base64 (i.e. base64(email:api_key))
Authorization header example:
Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=
Permissions
Each user in the system has an API key, the key can be obtained through the methods get user and list of users. API responses are always filtered according to the permissions of the user on whose behalf the API request is being made. Permissions allow for some conditional permissions for full integration through a single user.
Speed limits
The API is rate limited, the default API limit is 300 requests per minute (RPM). If the limit is exceeded, access will be automatically blocked for 20 minutes.
You can use the following response headers to validate the current rate limit for the system and keep track of the number of requests left in the current minute:
X-Rate-Limit: 300
X-Rate-Limit-Remaining: 299
Departments ¶
Departments ¶
List of departmentsGET/departments/
CURL Example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/departments/"
URI example
200
Title
Content-Type: application/json
Body
{
"data": [
{
"id":1,
"name":{
"en":"Support Department"
}
},{
"id":2,
"name":{
"en":"Test department"
}
]
}
Work with requests ¶
Tickets ¶
Get ticketsGET/tickets/{?page,search,exact_search,user_list,owner_list,status_list,priority_list,type_list,freeze,deleted,from_date_created,to_date_created,from_date_updated,to_date_updated,order_by}
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/&tickets/?page=1"
URI example
- page
number
(optional) Example: 2Page number
- search
string
(optional) Example: JohnSearch by requests
- exact_search
number
(optional) Example: 1Search for an exact match of
search
.1
- full match search,0
- standard search- user_list
string
(optional) Example: 1,14,22Search for requests by owner ID, separated by commas
- owner_list
string
(optional) Example: 1,44,21Search for orders by order executor ID, separated by commas
- status_list
string
(optional) Example: open,closedSearch for tickets by ticket status ID, separated by commas
- priority_list
string
(optional) Example: 1,3Search for tickets by ticket priority ID, separated by commas
- type_list
string
(optional) Example: 0,1Search for tickets by ticket type ID, separated by commas
- freeze
number
(optional) Example: 0Filter by frozen orders. The value
0
- only active orders, the value1
- only frozen orders. By default, all applications are listed.- deleted
number
(optional) Example: 0Filter by deleted orders. The value
0
- only active orders, the value1
- only remote orders. The default value is0
.- from_date_created
string
(optional) Example: 2017-12-31 00:00:00Creation date from
- to_date_created
string
(optional) Example: 2017-12-31 00:00:00Creation date before
- from_date_updated
string
(optional) Example: 2017-12-31 00:00:00Update date from
- to_date_updated
string
(optional) Example: 2017-12-31 00:00:00Modified date before
- order_by
string
(optional)Order sorting, can be specified separated by commas. Applications can be sorted by parameters: date_created, date_updated, viewed_by_staff, viewed_by_client. The sort order is {asc} (ascending) and {desc} (descending). Default value: date_created{desc}
200
+Headers
Title
Content-Type: application/json
Body
{
data: {
"10": {
"id":10,
pid: 0
"unique_id":"YWP-43009",
"date_created":"2017-01-13 12:36:58",
"date_updated":"2017-01-17 13:36:46",
"title":"New ticket",
"source": "email",
"status_id":"open",
"priority_id":2,
"type_id":0,
"department_id":2,
"department_name":"Support department",
"owner_id":1,
"owner_name":"Ivan",
"owner_lastname":"Petrov",
"owner_email":"ivan.petrov@example.com",
"user_id":41,
"username":"John",
"user_lastname":"Do",
"user_email":"john.doe@example.com",
"cc": [],
"bcc": [],
"followers": [],
"ticket_lock":0,
"sla_date":"13.01.2017 12:36",
"freeze_date":"null",
freeze:0,
"deleted":0,
"viewed_by_staff": 1,
"viewed_by_client": 1,
"rate": "like",
"rate_comment": "Nice",
"rate_date": "2017-01-17 13:33:30",
"custom_fields":[
{
"id":3,
"field_type":"textarea",
"field_value":"4345"
},{
"id":4,
"field_type":"checkbox",
"field_value":1
}
],
"tags": [
"one",
"2",
"3"
],
"jira_issues": []
},
"nine": {
"id":9,
pid: 0
"unique_id":"IQV-84397",
"date_created":"2016-08-15 17:05:19",
"date_updated":"2017-01-18 11:44:13",
"title":"Test ticket",
"source": "email",
"status_id":"process",
"priority_id":3,
"type_id":1,
"department_id":2,
"department_name":"Support department"
Get ticketGET/tickets/{id}
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/tickets/9"
URI example
- id
number
(required) Example: 9ticket ID
200
Title
Content-Type: application/json
Body
{
"data": {
"id": 9,
"pid": 0,
"unique_id": "IQV-84397",
"date_created": "2016-08-15 17:05:19",
"date_updated": "2017-01-18 11:44:13",
"title": "Test ticket",
"source": "email",
"status_id": "process",
"priority_id": 3,
"type_id": 1,
"department_id": 2,
"department_name": "Support department",
"owner_id": 1,
"owner_name": "Ivan",
"owner_lastname": "Petrov",
"owner_email": "ivan.petrov@example.com",
"user_id": 41,
"user_name": "John",
"user_lastname": "Doe",
"user_email": "john.doe@example.com",
"cc": [],
"bcc": [],
"followers": [],
"ticket_lock": 0,
"sla_date": "17.01.2017 16:00",
"freeze_date": "null",
"freeze": 0,
"deleted": 0,
"viewed_by_staff": 1,
"viewed_by_client": 1,
"rate": "",
"rate_comment": "",
"rate_date": "",
"custom_fields": [
{
"id": 3,
"field_type": "textarea",
"field_value": "4345"
},
{
"id": 4,
"field_type": "checkbox",
"field_value": 1
}
],
"tags": [
"1",
"2",
"3"
],
"jira_issues": []
}
}
404
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-404",
"title": "Not found",
"details": "Ticket with id {9} does not exist"
}
]
}
Create requestPOST/tickets/
CURL example
curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-title'with%cache" -H "Cache-Control: no-title'with%cache=" 20email&description=Problem%20with%20email%20info%40example.com&custom_fields%5B6%5D=field%20value&custom_fields%5B2%5D=4' "https://system_domain/api/v2/tickets/"
URI example
- pid
number
(optional) Example: 23parent ticket ID
- title
string
(required) Example: Problem with emailTitle of the ticket
- description
string
(required) Example: <p>Problem with email info@example.com</p>Request text
- sla_date
date
(optional) Example: 01.01.1970 00:00SLA date and time
- freeze_date
date
(optional) Example: 01.01.1970 00:00Freeze the request to date and time
- status_id
string
(optional) Example: processRequest status
- priority_id
number
(optional) Example: 1priority ID
- type_id
number
(optional) Example: 2type ID
- department_id
number
(optional) Example: 1department ID
- ticket_lock
boolean
(optional) Example: falseTicket lock.
true
- block the request.false
- unblock the order.- owner_id
number
(optional) Example: 1artist ID
- user_id
number
(optional) Example: 2ticket owner ID
- user_email
string
(optional) Example: email@example.comIf the ticket owner ID is not specified, then the user’s e-mail will be used to create the ticket, if the user does not exist, it will be automatically created
- cc
mailbox array
(optional)Letter copy
- bcc
mailbox array
(optional)Bcc message
- followers
array user_id
(optional)List of users following the request, the user must be an employee.
- create_from_user
number
(optional) Example: 1The first response in the application on behalf of the employee is
0
, on behalf of the user1
, by default1
- custom_fields
array
(optional) Example: [1 => 3, 2 => 0]Array of custom order fields, example: custom_fields[field_id] = value, in case of a hierarchical field, the level must be specified custom_fields[field_id][level] = value
- files
array of files
(optional)Array of applications
200
Title
Content-Type: application/json
Body
{
"data": {
"id": 9,
"pid": 0,
"unique_id": "IQV-84397",
"date_created": "2016-08-15 17:05:19",
"date_updated": "2017-01-18 11:44:13",
"title": "Test ticket",
"source": "email",
"status_id": "process",
"priority_id": 3,
"type_id": 1,
"department_id": 2,
"department_name": "Support department",
"owner_id": 1,
"owner_name": "Ivan",
"owner_lastname": "Petrov",
"owner_email": "ivan.petrov@example.com",
"user_id": 41,
"user_name": "John",
"user_lastname": "Doe",
"user_email": "john.doe@example.com",
"cc": [],
"bcc": [],
"followers": [],
"ticket_lock": 0,
"sla_date": "17.01.2017 16:00",
"freeze_date": "null",
"freeze": 0,
"deleted": 0,
"viewed_by_staff": 1,
"viewed_by_client": 1,
"rate": "",
"rate_comment": "",
"rate_date": "",
"custom_fields": [
{
"id": 3,
"field_type": "textarea",
"field_value": "4345"
},
{
"id": 4,
"field_type": "checkbox",
"field_value": 1
}
],
"tags": [
"1",
"2",
"3"
],
"jira_issues": []
}
}
400
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-411",
"title": "Bad request",
"details": "Field {sla_date} value is incorrect or empty (date format 01.01.1970 00:00)"
},
{
"code": "e-411",
"title": "Bad request",
"details": "Field {owner_id} with id {5} does not exist"
},
{
"code": "e-411",
"title": "Bad request",
"details": "Field {owner_id} value is incorrect, user must be with staff permissions"
},
{
"code": "e-411",
"title": "Bad request",
"details": "Field {type_id} value is incorrect or empty"
}
]
}
Update ticketPUT/tickets/{id}
CURL example
curl -X PUT -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{"status_id" :"2", "owner_id": "1", "custom_fields": {"6": "test", "2": "18"}}' "https://system_domain/api/v2/tickets/9 "
URI example
- id
number
(required) Example: 9ticket ID
- title
string
(optional) Example: Problem with emailTitle of the ticket
- sla_date
date
(optional) Example: 01.01.1970 00:00SLA date and time
- freeze_date
date
(optional) Example: 01.01.1970 00:00Freeze the request to date and time
- status_id
string
(optional) Example: processRequest status
- priority_id
number
(optional) Example: 1priority ID
- type_id
number
(optional) Example: 2type ID
- department_id
number
(optional) Example: 1department ID
- cc
mailbox array
(optional)Letter copy
- bcc
mailbox array
(optional)Bcc message
- followers
array user_id
(optional)List of users following the request, the user must be an employee.
- ticket_lock
boolean
(optional) Example: falseTicket lock.
true
- block the request.false
- unblock the order.- owner_id
number
(optional) Example: 1artist ID
- user_id
number
(optional) Example: 2ticket owner ID
- custom_fields
array
(optional) Example: [1 => 3, 2 => 0]Array of custom order fields, example: custom_fields[field_id] = value, in case of a hierarchical field, the level must be specified custom_fields[field_id][level] = value
200
Title
Content-Type: application/json
Body
{
"data": {
"id": 9,
"pid": 0,
"unique_id": "IQV-84397",
"date_created": "2016-08-15 17:05:19",
"date_updated": "2017-01-18 11:44:13",
"title": "Test ticket",
"source": "email",
"status_id": "process",
"priority_id": 3,
"type_id": 1,
"department_id": 2,
"department_name": "Support department",
"owner_id": 1,
"owner_name": "Ivan",
"owner_lastname": "Petrov",
"owner_email": "ivan.petrov@example.com",
"user_id": 41,
"user_name": "John",
"user_lastname": "Doe",
"user_email": "john.doe@example.com",
"cc": [],
"bcc": [],
"followers": [],
"ticket_lock": 0,
"sla_date": "17.01.2017 16:00",
"freeze_date": "null",
"freeze": 0,
"deleted": 0,
"viewed_by_staff": 1,
"viewed_by_client": 1,
"rate": "",
"rate_comment": "",
"rate_date": "",
"custom_fields": [
{
"id": 3,
"field_type": "textarea",
"field_value": "4345"
},
{
"id": 4,
"field_type": "checkbox",
"field_value": 1
}
],
"tags": [
"1",
"2",
"3"
],
"jira_issues": []
}
}
400
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-411",
"title": "Bad request",
"details": "Field {sla_date} value is incorrect or empty (date format 01.01.1970 00:00)"
},
{
"code": "e-411",
"title": "Bad request",
"details": "Field {owner_id} with id {5} does not exist"
},
{
"code": "e-411",
"title": "Bad request",
"details": "Field {owner_id} value is incorrect, user must be with staff permissions"
},
{
"code": "e-411",
"title": "Bad request",
"details": "Field {type_id} value is incorrect or empty"
}
]
}
404
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-404",
"title": "Not found",
"details": "Ticket with id {9} does not exist"
}
]
}
Delete orderDELETE/tickets/{id}
CURL example
curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache_do" v2/tickets/9"
URI example
- id
number
(required) Example: 9ticket ID
- delete
boolean
(optional) Example: truefalse
- move the order to the deleted ones.true
- complete removal of the order. Default value isfalse
200
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "s-204",
"title": "No content",
"details": "Ticket with id {9} successfully deleted"
}
]
}
404
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-404",
"title": "Not found",
"details": "Ticket with id {9} does not exist"
}
]
}
Ticket replies ¶
Get repliesGET/tickets/{ticket_id}/posts/
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/tickets/page=1"
URI example
- ticket_id
number
(required) Example: 9ticket ID,
- page
number
(optional) Example: 1Page number
200
Title
Content-Type: application/json
Body
{
"data":[
{
"ticket_id":9,
"id":139,
"user_id":1,
"text":"<p>post content</p>",
"date_created":"17:45:00 26.01.2017",
"date_updated":"17:45:00 26.01.2017",
"files":[]
},{
"ticket_id":9,
"id":138,
"user_id":1,
"text":"<p>1</p><p>2</p><p>3</p>",
"date_created":"14:59:00 17.01.2017",
"date_updated":"14:59:00 17.01.2017",
"files":[
{
"name":"test.gif",
"url":"https://system_domain/en/file/download/f8bb43e593d867d27c965d38dfec721fbb084cf9",
"data_type":"gif"
},{
"name":"test.png",
"url":"https://system_domain/en/file/download/b818daf594dd3b61098cce7fef7954bc0314edd5",
"data_type":"png"
}
]
},
],
"pagination":{
"total":85,
"per_page":30,
"current_page":1,
"total_pages":3
}
}
Add replyPOST/tickets/{ticket_id}/posts/
CURL example
curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'text=Problem with email' "https://system_domain/api/v2/tickets/9/posts/"
URI example
- ticket_id
number
(required) Example: 9ticket ID
- text
string
(required) Example: Problem with emailComment text
- user_id
number
(optional) Example: 1The owner of the comment, if not specified, the owner will be the API user.
- files
array of files
(optional)Array of applications
200
Title
Content-Type: application/json
Body
{
"data": {
"ticket_id": 9,
"id": 150,
"user_id": 1,
"text": "<p>Problem with email</p>",
"date_created": "17:02:00 17.01.2017",
"date_updated": "17:02:00 17.01.2017",
"files": [
{
"name": "test.gif",
"url": "https://system_domain/en/file/download/f8bb43e593d867d27c965d38dfec721fbb084cf9",
"data_type": "gif"
},
{
"name": "test.png",
"url": "https://system_domain/en/file/download/b818daf594dd3b61098cce7fef7954bc0314edd5",
"data_type": "png"
}
]
}
}
400
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-411",
"title": "Required {text} request",
"details": "Required field is missing or empty"
}
]
}
404
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-404",
"title": "Not found",
"details": "Ticket with id {9} does not exist"
}
]
}
Update replyPUT/tickets/{ticket_id}/posts/{id}
CURL example
curl -X PUT -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'text=Problem with email' "https://system_domain/api/v2/tickets/9/posts/150"
URI example
- ticket_id
number
(required) Example: 9ticket ID
- id
number
(required) Example: 15post ID
- text
string
(required) Example: Problem with emailComment text
200
Title
Content-Type: application/json
Body
{
"data": {
"ticket_id": 9,
"id": 150,
"user_id": 1,
"text": "<p>Problem with email</p>",
"date_created": "17:02:00 17.01.2017",
"date_updated": "17:02:00 17.01.2017",
"files": [
{
"name": "test.gif",
"url": "https://system_domain/en/file/download/f8bb43e593d867d27c965d38dfec721fbb084cf9",
"data_type": "gif"
},
{
"name": "test.png",
"url": "https://system_domain/en/file/download/b818daf594dd3b61098cce7fef7954bc0314edd5",
"data_type": "png"
}
]
}
}
404
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-404",
"title": "Not found",
"details": "Ticket with id {9} does not exist"
}
]
}
Delete replyDELETE/tickets/{ticket_id}/posts/{id}
CURL example
curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/tickets/9/posts/15"
URI example
- ticket_id
number
(required) Example: 9ticket ID
- id
number
(required) Example: 15post ID
200
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "s-204",
"title": "No content",
"details": "Post with id {15} in ticket with id {9} successfully deleted"
}
]
}
404
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-404",
"title": "Not found",
"details": "Post with id {15} in ticket with id {9} does not exist"
}
]
}
Internal notes ¶
Get internal notesGET/tickets/{ticket_id}/comments/
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/tickets/9/comments/?page=1"
URI example
- ticket_id
number
(required) Example: 9ticket ID
- page
number
(optional) Example: 1Page number
200
Title
Content-Type: application/json
Body
{
"data": [
{
"ticket_id": 9,
"id": 6,
"user_id": 1,
"text": "test",
"date_created": "18:18:34 05.01.2017",
"visible": "staff",
"files": [
{
"name": "test.gif",
"url": "https://system_domain/en/file/download/f8bb43e593d867d27c965d38dfec721fbb084cf9",
"data_type": "gif"
},
{
"name": "test.png",
"url": "https://system_domain/en/file/download/b818daf594dd3b61098cce7fef7954bc0314edd5",
"data_type": "png"
}
]
}
],
"pagination": {
"total": 1,
"per_page": 30,
"current_page": 1,
"total_pages": 1
}
}
Add internal notePOST/tickets/{ticket_id}/comments/
CURL example
curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'text=Problem with email' "https://system_domain/api/v2/tickets/9/comments/"
URI example
- ticket_id
number
(required) Example: 9ticket ID
- text
string
(required) Example: Problem with emailInternal note text
- user_id
number
(optional) Example: 1The owner of the internal note. If not specified, the owner will be the API user.
- files
array of files
(optional)Array of applications
200
Title
Content-Type: application/json
Body
{
"data": {
"ticket_id": 9,
"id": 6,
"user_id": 1,
"text": "test",
"date_created": "18:18:34 05.01.2017",
"visible": "staff",
"files": [
{
"name": "test.gif",
"url": "https://system_domain/en/file/download/f8bb43e593d867d27c965d38dfec721fbb084cf9",
"data_type": "gif"
},
{
"name": "test.png",
"url": "https://system_domain/en/file/download/b818daf594dd3b61098cce7fef7954bc0314edd5",
"data_type": "png"
}
]
}
}
400
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-411",
"title": "Required {text} request",
"details": "Required field is missing or empty"
}
]
}
404
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-404",
"title": "Not found",
"details": "Ticket with id {9} does not exist"
}
]
}
Update internal notePUT/tickets/{ticket_id}/comments/{id}
CURL example
curl -X PUT -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'text=Problem with email' "https://system_domain/api/v2/tickets/9/comments/6"
URI example
- ticket_id
number
(required) Example: 9ticket ID
- id
number
(required) Example: 6Internal note ID
- text
string
(required) Example: Problem with emailInternal note text
200
Title
Content-Type: application/json
Body
{
"data": {
"ticket_id": 9,
"id": 6,
"user_id": 1,
"text": "Problem with email",
"date_created": "18:18:34 05.01.2017",
"visible": "staff",
"files": [
{
"name": "test.gif",
"url": "https://system_domain/en/file/download/f8bb43e593d867d27c965d38dfec721fbb084cf9",
"data_type": "gif"
},
{
"name": "test.png",
"url": "https://system_domain/en/file/download/b818daf594dd3b61098cce7fef7954bc0314edd5",
"data_type": "png"
}
]
}
}
404
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-404",
"title": "Not found",
"details": "Ticket with id {9} does not exist"
}
]
}
Delete internal noteDELETE/tickets/{ticket_id}/comments/{id}
CURL example
curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/tickets/9/comments/15"
URI example
- ticket_id
number
(required) Example: 9ticket ID
- id
number
(required) Example: 15internal note ID
200
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "s-204",
"title": "No content",
"details": "Comment with id {15} in ticket with id {9} successfully deleted"
}
]
}
404
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-404",
"title": "Not found",
"details": "Comment with id {15} in ticket with id {9} does not exist"
}
]
}
Audit ¶
Audit requestGET/tickets/{id}/audit/
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/tickets/11/audit/?page=1"
URI example
- id
number
(required) Example: 11ticket ID
- page
number
(optional) Example: 1Page number
- event_list
string
(optional) Example: ``Search for audit by event, separated by commas
- user_list
string
(optional) Example: 1,14,22Search for an audit by user ID, separated by commas
- from_date_created
string
(optional) Example: 2017-12-31 00:00:00Creation date from
- to_date_created
string
(optional) Example: 2017-12-31 00:00:00Creation date before
200
Title
Content-Type: application/json
Body
{
"data": {
"0": {
"id": 2012,
"event": "ticket_view",
"text": {
"ru": "Просмотр заявки",
"en": "View request",
"ua": "Перегляд заявки"
},
"user_id": 1,
"user_name": "John",
"date_created": "11:11:27 30.01.2017"
},
"1": {
"id": 2009,
"event": "ticket_answer",
"text": {
"ru": "Добавление ответа на заявку",
"en": "Add a response to the request",
"ua": "Додавання відповіді на заявку"
},
"user_id": 1,
"user_name": "John",
"date_created": "11:11:23 30.01.2017"
},
"2": {
"id": 2010,
"event": "ticket_answer",
"text": {
"ru": "Отправление письма на э-почту \"info@EddyDesk.com\"</strong>",
"en": "Send a message to email \"info@EddyDesk.com\"</strong>",
"ua": "Відправлення листа на е-пошту \"info@EddyDesk.com\"</strong>"
},
"user_id": 1,
"user_name": "John",
"date_created": "11:11:23 30.01.2017"
},
"3": {
"id": 2011,
"event": "ticket_view",
"text": {
"ru": "Просмотр заявки",
"en": "View request",
"ua": "Перегляд заявки"
},
"user_id": 1,
"user_name": "John",
"date_created": "11:11:23 30.01.2017"
},
"4": {
"id": 2008,
"event": "ticket_view",
"text": {
"ru": "Просмотр заявки",
"en": "View request",
"ua": "Перегляд заявки"
},
"user_id": 1,
"user_name": "John",
"date_created": "11:11:17 30.01.2017"
},
"5": {
"id": 2006,
"event": "ticket_view",
"text": {
"ru": "Просмотр заявки",
"en": "View request",
"ua": "Перегляд заявки"
},
"user_id": 1,
"user_name": "John",
"date_created": "11:10:57 30.01.2017"
},
"6": {
"id": 2005,
"event": "status_update",
"text": {
"ru": "Изменение статуса заявки с \"Открыто\"</strong> на \"В процессе\"</strong>",
"en": "Changing request status from \"Открыто\"</strong> to \"В процессе\"</strong>",
"ua": "Зміна статусу заявки з \"Открыто\"</strong> на \"В процессе\"</strong>"
},
"user_id": 1,
"user_name": "John",
"date_created": "11:10:56 30.01.2017"
},
"7": {
"id": 2004,
"event": "owner_update",
"text": {
"ru": "Изменение исполнителя заявки с \"Неприсвоенный\"</strong> на \"John \"</strong>",
"en": "Changing responsible party from \"Unassigned\"</strong> to \"John \"</strong>",
"ua": "Зміна виконавця заявки з \"Неприсвоений\"</strong> на \"John \"</strong>"
},
"user_id": 1,
"user_name": "John",
"date_created": "11:10:51 30.01.2017"
},
"8": {
"id": 2003,
"event": "ticket_view",
"text": {
"ru": "Просмотр заявки",
"en": "View request",
"ua": "Перегляд заявки"
},
"user_id": 1,
"user_name": "John",
"date_created": "11:10:46 30.01.2017"
}
},
"pagination": {
"total": "9",
"per_page": 30,
"current_page": 1,
"total_pages": 1
}
}
Billing ¶
Request billingGET/tickets/{id}/billing/
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/tickets/11/billing/?page=1"
URI example
- id
number
(required) Example: 11ticket ID
- page
number
(optional) Example: 1Page number
- staff_list
string
(optional) Example: 1,14,22Search by employee, separated by commas
- creator_list
string
(optional) Example: 1,14,22Search by ticket creator, separated by commas
- from_date_created
string
(optional) Example: 2017-12-31 00:00:00Creation date from
- to_date_created
string
(optional) Example: 2017-12-31 00:00:00Creation date before
- from_billing_date
string
(optional) Example: 2017-12-31 00:00:00Billing date from
- to_billing_date
string
(optional) Example: 2017-12-31 00:00:00Billing date to
200
Title
Content-Type: application/json
Body
{
"data": [
{
"id": 5949,
"action": "create-post",
"comment": "Adding reply",
"spent_seconds": 26,
"paid_seconds": 26,
"staff_id": 1,
"staff_name": "Administrator",
"billing_date": "16:25:42 12.02.2021",
"creator_id": -1,
"creator_name": "System",
"date_created": "16:25:42 12.02.2021"
},
{
"id": 5948,
"action": null,
"comment": "234234",
"spent_seconds": 180,
"paid_seconds": 180,
"staff_id": 1,
"staff_name": "Administrator",
"billing_date": "23:37:00 08.02.2021",
"creator_id": 1,
"creator_name": "Administrator",
"date_created": "23:37:54 08.02.2021"
},
{
"id": 5947,
"action": null,
"comment": "Hello",
"spent_seconds": 118800,
"paid_seconds": 1198800,
"staff_id": -1,
"staff_name": "System",
"billing_date": "23:12:00 08.02.2021",
"creator_id": 1,
"creator_name": "Administrator",
"date_created": "23:28:44 08.02.2021"
},
{
"id": 5946,
"action": null,
"comment": "test",
"spent_seconds": 7200,
"paid_seconds": 10800,
"staff_id": 1,
"staff_name": "Administrator",
"billing_date": "23:12:00 08.02.2021",
"creator_id": -1,
"creator_name": "System",
"date_created": "23:27:38 08.02.2021"
},
{
"id": 5945,
"action": null,
"comment": "test",
"spent_seconds": 63,
"paid_seconds": 122,
"staff_id": 15,
"staff_name": "TEST TEST",
"billing_date": "23:12:00 08.02.2021",
"creator_id": 1,
"creator_name": "Administrator",
"date_created": "23:21:26 08.02.2021"
}
],
"pagination": {
"total": 5,
"per_page": 30,
"current_page": 1,
"total_pages": 1
}
}
Ticket fields ¶
Get ticket fieldsGET/custom_fields/
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/custom_fields/"
URI example
200
Title
Content-Type: application/json
Body
{
"data": {
"2": {
"id": 2,
"name": {
"en": "Select"
},
"field_type": "select",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required_to_create_ticket": false,
"required_to_close_ticket": true
},
"user": {
"view": true,
"edit": true,
"required_to_create_ticket": false,
"required_to_close_ticket": true
}
}
},
"3": {
"id": 3,
"name": {
"en": "Date"
},
"field_type": "date",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required_to_create_ticket": false,
"required_to_close_ticket": false
},
"user": {
"view": true,
"edit": true,
"required_to_create_ticket": false,
"required_to_close_ticket": false
}
}
},
"4": {
"id": 4,
"name": {
"fr": "Checkbox",
},
"field_type": "checkbox",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required_to_create_ticket": false,
"required_to_close_ticket": true
},
"user": {
"view": true,
"edit": true,
"required_to_create_ticket": false,
"required_to_close_ticket": false
}
}
},
"5": {
"id": 5,
"name": {
"en": "Text"
},
"field_type": "text",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required_to_create_ticket": false,
"required_to_close_ticket": true
},
"user": {
"view": true,
"edit": true,
"required_to_create_ticket": true,
"required_to_close_ticket": true
}
}
},
"6": {
"id": 6,
"name": {
"en": "Textarea",
},
"field_type": "textarea",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required_to_create_ticket": false,
"required_to_close_ticket": true
},
"user": {
"view": true,
"edit": true,
"required_to_create_ticket": false,
"required_to_close_ticket": false
}
}
},
"7": {
"id": 7,
"name": {
"en": "Number"
},
"field_type": "number",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required_to_create_ticket": false,
"required_to_close_ticket": true
},
"user": {
"view": true,
"edit": true,
"required_to_create_ticket": false,
"required_to_close_ticket": false
}
}
},
"8": {
"id": 8,
"name": {
"1": {
"en": "Related"
},
"2": {
"en": "Related 2"
},
"3": {
"en": "Related 3",
},
"4": {
"en": "Related 4"
}
},
"field_type": "hierarchy",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required_to_create_ticket": false,
"required_to_close_ticket": true
},
"user": {
"view": true,
"edit": true,
"required_to_create_ticket": true,
"required_to_close_ticket": false
}
}
}
},
"pagination": {
"total": 7,
"per_page": 30,
"current_page": 1,
"total_pages": 1
}
}
Get ticket fieldsGET/custom_fields/{id}
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/custom_fields/2"
URI example
- id
number
(required) Example: 2field ID
200
Title
Content-Type: application/json
Body
{
"data": {
"2": {
"id": 2,
"name": {
"ru": "Select",
"en": "Select",
"ua": "Select"
},
"field_type": "select",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required_to_create_ticket": false,
"required_to_close_ticket": true
},
"user": {
"view": true,
"edit": true,
"required_to_create_ticket": false,
"required_to_close_ticket": true
}
}
}
}
}
Ticket field options ¶
Attention
Methods are available only for fields with type (field_type
): dropdown list (select
) and associated fields (hierarchy
)!
Get optionsGET/custom_fields/{custom_field_id}/options/
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/custom_fields/2/options"
URI example
- custom_field_id
number
(required) Example: 2field ID
200
Title
Content-Type: application/json
Body
{
"data": [
{
"id": 5,
"pid": 0,
"name": {
"en": "1"
}
},
{
"id": 6,
"pid": 0,
"name": {
"en": "2"
}
},
{
"id": 7,
"pid": 0,
"name": {
"en": "3"
}
},
{
"id": 171,
"pid": 0,
"name": {
"en": "4"
}
}
],
"pagination": {
"total": 4,
"per_page": 50,
"current_page": 1,
"total_pages": 1
}
}
Add/update optionsPOST/custom_fields/{custom_field_id}/options/
CURL example
Add/update options
The general limit for adding/updating options is 100 entries per request. The required option parameter is name.
-
To add a new option, you must specify name -
{"options":[{"name":{"en":"new option","en":"new option","ua":"new option"}}]}
-
To add a new option for associated fields at any level - use pid (id of the parent option) -
{"options":[{"pid": 21, "name":{"en" :"new option","en":"new option","ua":"new option"}}]}
-
To update an existing option, use the id parameter, only the name parameter is available for changes -
{"options":[{"id": 20,"name":{"en":"update option ","en":"update option","ua":"update option"}}]}
Moving associated field options across levels is prohibited. All new options are added to the end of the list. This query will return all affected options as a result.
curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" -H 'content-type: application/json' -d '{"options":[{"name":{"ru":"new option","en":"new option","ua":"new option"}}, {"pid": 21, "name":{"ru":"new option","en":"new option","ua":"new option"}}, {"id": 20,"name":{"ru":"update option","en":"update option","ua":"update option"}}]}' "https://system_domain/api/v2/custom_fields/2/options"
URI example
- custom_field_id
number
(required) Example: 2field ID
- options
array
(required) Example: {"options":[{"id": "20", "name":{"en":"update option","en":"update option","ua":"update option" }}]}Add/update options
200
Title
Content-Type: application/json
Body
{
"data": [
{
"id": 20,
"pid": 0,
"name": {
"en": "update option"
}
},
{
"id": 233,
"pid": 0,
"name": {
"en": "new option"
}
},
{
"id": 234,
"pid": 21,
"name": {
"en": "new option"
}
}
]
}
Delete optionDELETE/custom_fields/{custom_field_id}/options/{option_id}
CURL example
curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/custom_fields/2/options/233"
URI example
- custom_field_id
number
(required) Example: 233field ID
- option_id
number
(required) Example: 233option ID
200
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "s-204",
"title": "No content",
"details": "Option with id {233} successfully deleted"
}
]
}
Statuses ¶
Status listGET/statuses/
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/statuses/"
URI example
200
Title
Content-Type: application/json
Body
{
"data":[
{
"id":"open",
"name":{
"en":"Open",
}
},{
"id":"process",
"name":{
"en":"In progress",
}
},{
"id":"closed",
"name":{
"en":"Closed",
}
}
]
}
Priorities ¶
Priority ListGET/priorities/
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/priorities/"
URI example
200
Title
Content-Type: application/json
Body
{
"data":[
{
"id":2,
"name":{
"en":"Standard",
}
},{
"id":3,
"name":{
"en":"Medium",
}
},{
"id":1,
"name":{
"en":"Very urgent",
}
}
]
}
Types ¶
List of typesGET/types/
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/types/"
URI example
200
Title
Content-Type: application/json
Body
{
"data":[
{
"id":0,
"name":{
"en":"Without type",
}
},{
"id":1,
"name":{
"en":"Problem",
}
},{
"id":2,
"name":{
"en":"Task",
}
},{
"id":3,
"name":{
"en":"Bug",
}
}
]
}
Work with contacts ¶
Users ¶
List of usersGET/users/{?page,search,exact_search,group_list,from_date_created,to_date_created,from_date_updated,to_date_updated,order_by}
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/?page=1"
URI example
- page
number
(optional) Example: 1Page number
- search
string
(optional) Example: John DoeSearch by user
- exact_search
number
(optional) Example: 1Search for an exact match of
search
.1
- full match search,0
- standard search- group_list
number
(optional) Example: 1,2Search for users by group ID, separated by commas
- id_list
number
(optional) Example: 1,2,3Search for users by ID, separated by commas
- from_date_created
string
(optional) Example: 2018-12-31 00:00:00Creation date from
- to_date_created
string
(optional) Example: 2018-12-31 00:00:00Creation date before
- from_date_updated
string
(optional) Example: 2018-12-31 00:00:00Update date from
- to_date_updated
string
(optional) Example: 2018-12-31 00:00:00Update date before
- order_by
string
(optional) Example: nameUser sorting, can be specified separated by commas. Users can be sorted by parameters: date_created, date_updated, name. The sort order is {asc} (ascending) and {desc} (descending). Default value: name{asc}
200
Title
Content-Type: application/json
Body
{
"data": [
{
"id": 1,
"date_created": "2019-01-01 00:00:00",
"date_updated": "2019-01-01 00:00:00",
"name": "Admin",
"lastname": "",
"email": "test@eddydesk.com",
"phone": "+37129770143",
"skype": "",
"website": "",
"organization": "",
"status": "active",
"language": "en",
"notifications": 0,
"api_key": "a32858b4-a65e-49ef-a960-0b7e8d5d1e47",
"group": {
"id": 2,
"type": "staff",
"name": {
"ru": "Администратор",
"en": "Administrator",
"ua": ""
},
"disable": 0
},
"department": [
1,
2
],
"ldap_username": "",
"user_status": "online",
"custom_fields": [
{
"id": 87,
"field_type": "textarea",
"field_value": "test"
},
{
"id": 88,
"field_type": "checkbox",
"field_value": 1
}
]
},
{
"id": 6,
"date_created": "2019-01-01 00:00:00",
"date_updated": "2019-01-01 00:00:00",
"name": "Test",
"lastname": "",
"email": "test@test.lv",
"phone": "",
"skype": "",
"website": "",
"organization": "",
"status": "active",
"language": "en",
"notifications": 0,
"api_key": "a43e6bdc-2ff9-483b-8ebf-ea3ade763864",
"group": {
"id": 1,
"type": "user",
"name": {
"ru": "Клиент",
"en": "Client",
"ua": "Клиент"
},
"disable": 0
},
"department": [
1,
2
],
"ldap_username": "",
"user_status": "online",
"custom_fields": [
{
"id": 87,
"field_type": "textarea",
"field_value": "test"
},
{
"id": 88,
"field_type": "checkbox",
"field_value": 1
}
]
}
],
"pagination": {
"total": 2,
"per_page": 30,
"current_page": 1,
"total_pages": 1
}
}
Get userGET/users/{id}
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/1"
URI example
- id
number
(required) Example: 1user ID
200
Title
Content-Type: application/json
Body
{
"data": {
"id": 1,
"date_created": "2019-01-01 00:00:00",
"date_updated": "2019-01-01 00:00:00",
"name": "Admin",
"lastname": "",
"email": "test@eddydesk.com",
"phone": "+37129770143",
"skype": "",
"website": "",
"organization": "",
"status": "active",
"language": "en",
"notifications": 0,
"api_key": "a32858b4-a65e-49ef-a960-0b7e8d5d1e47",
"group": {
"id": 2,
"type": "staff",
"name": {
"ru": "Администратор",
"en": "Administrator",
"ua": "Администратор"
},
"disable": 0
},
"department": [
1,
2
],
"ldap_username": "",
"user_status": "online",
"custom_fields": [
{
"id": 87,
"field_type": "textarea",
"field_value": "test"
},
{
"id": 88,
"field_type": "checkbox",
"field_value": 1
}
]
}
}
Add userPOST/users/
CURL example
curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'name=John&email=info@example.com3&group_id=1&department[0]=1&department[1]=2&password=12345678&custom_fields[2]=4&custom_fields[4]=test' "https://system_domain/api/v2/users/"
URI example
- name
string
(required) Example: JohnName
- lastname
string
(optional) Example: DoeLast name
string
(required) Example: info@example.comEmail
- phone
string
(optional) Example: 37192345678Phone
- skype
string
(optional) Example: ``Skype
- website
string
(optional) Example: http://example.comWebsite
- organization
string
(optional) Example: OrganizationOrganization. The name of new organization. If filled, the organiz_id field is not taken into account.
- organiz_id
number
(optional) Example: ``ID of an existing organization
- status
string
(optional) Example: test userUser status. Available statuses:
active
,inactive
,disabled
,fired
.- language
string
(optional) Example: enUser language. All active languages in the system are available.
- notifications
number
(optional) Example: 1Email notifications.
0
- disabled. Available values are1
and0
- group_id
number
(required) Example: 1group ID
- department
array
(required) Example: [0 => 1, 1 => 2]User departments
- password
string
(required) Example: 123456Password
- user_status
string
(optional) Example: onlineUser activity status
- custom_fields
array
(optional) Example: [87 => 'test', 2 => 1]Array of custom contact fields, example: custom_fields[field_id] = value, in case of a hierarchical field, the level must be specified custom_fields[field_id][level] = value
200
Title
Content-Type: application/json
Body
{
"data": {
"id": 22,
"date_created": "2019-01-01 00:00:00",
"date_updated": "2019-01-01 00:00:00",
"name": "John",
"lastname": "Doe",
"email": "info@example.com",
"phone": "37192345678",
"skype": "",
"website": "http://example.com",
"organization": {
"id": 8,
"name": "Organization",
"domains": "",
"address": "",
"phone": "37192345678",
"email": "info@example.com",
"web": "http://example.com"
},
"status": "active",
"language": "en",
"notifications": 0,
"api_key": "cf780f93-8bd4-460d-8a56-1f6adadb8e46",
"group": {
"id": 1,
"type": "user",
"name": {
"ru": "Клиент",
"en": "Client",
"ua": "Клиент"
},
"disable": 0
},
"department": [
1,
2
],
"ldap_username": "",
"user_status": "online",
"custom_fields": [
{
"id": 87,
"field_type": "textarea",
"field_value": "test"
},
{
"id": 88,
"field_type": "checkbox",
"field_value": 1
}
]
}
}
400
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-411",
"title": "Required {name} field",
"details": "Required field {name} is missing or empty"
},
{
"code": "e-411",
"title": "Required {email} field",
"details": "Required field {email} is missing or empty"
},
{
"code": "e-411",
"title": "Required {group_id} field",
"details": "Required field {group_id} is missing or empty"
},
{
"code": "e-411",
"title": "Required {department} field",
"details": "Required field {department} is missing or empty"
},
{
"code": "e-411",
"title": "Required {password} field",
"details": "Required field {password} is missing or empty"
}
]
}
Update userPUT/users/{id}
CURL example
curl -X PUT -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{"lastname":"Doe", "custom_fields": {"6": "test", "2": "18"}}' "https://system_domain/api/v2/users/22"
URI example
- id
number
(required) Example: 22user ID
- name
string
(optional) Example: JohnName
- lastname
string
(optional) Example: DoeLast name
string
(optional) Example: info@example.comEmail
- phone
string
(optional) Example: 37192345678Phone
- skype
string
(optional) Example: ``Skype
- website
string
(optional) Example: http://example.comWebsite
- organization
string
(optional) Example: OrganizationOrganization. The name of new organization. If filled, the organiz_id field is not taken into account.
- organiz_id
number
(optional) Example: ``ID of an existing organization
- status
string
(optional) Example: test userUser status. Available statuses:
active
,inactive
,disabled
,fired
.- language
string
(optional) Example: enUser language. All active languages in the system are available.
- notifications
number
(optional) Example: 1Email notifications.
0
- disabled. Available values are1
and0
- group_id
number
(optional) Example: 1group ID
- department
array
(optional) Example: [0 => 1, 1 => 2]User departments
- password
string
(optional) Example: 123456Password
- user_status
string
(optional) Example: onlineUser activity status
- custom_fields
array
(optional) Example: [87 => 'test', 2 => 1]Array of custom contact fields example: custom_fields[field_id] = value, in case of a hierarchical field, the level must be specified custom_fields[field_id][level] = value
200
Title
Content-Type: application/json
Body
{
"data": {
"id": 22,
"date_created": "2019-01-01 00:00:00",
"date_updated": "2019-01-01 00:00:00",
"name": "John",
"lastname": "Doe",
"email": "info@example.com",
"phone": "37192345678",
"skype": "",
"website": "http://example.com",
"organization": {
"id": 8,
"name": "Organization",
"domains": "",
"address": "",
"phone": "37192345678",
"email": "info@example.com",
"web": "http://example.com"
},
"status": "active",
"language": "en",
"notifications": 0,
"api_key": "cf780f93-8bd4-460d-8a56-1f6adadb8e46",
"group": {
"id": 1,
"type": "user",
"name": {
"ru": "Клиент",
"en": "Client",
"ua": "Клиент"
},
"disable": 0
},
"department": [
1,
2
],
"ldap_username": "",
"user_status": "online",
"custom_fields": [
{
"id": 87,
"field_type": "textarea",
"field_value": "test"
},
{
"id": 88,
"field_type": "checkbox",
"field_value": 1
}
]
}
}
400
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-411",
"title": "Required {name} field",
"details": "Required field {name} is missing or empty"
},
{
"code": "e-411",
"title": "Required {email} field",
"details": "Required field {email} is missing or empty"
},
{
"code": "e-411",
"title": "Required {group_id} field",
"details": "Required field {group_id} is missing or empty"
},
{
"code": "e-411",
"title": "Required {department} field",
"details": "Required field {department} is missing or empty"
},
{
"code": "e-411",
"title": "Required {password} field",
"details": "Required field {password} is missing or empty"
}
]
}
Delete userDELETE/users/{id}
CURL example
curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/22"
URI example
- id
number
(required) Example: 22user ID
200
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "s-204",
"title": "No content",
"details": "User with id {22} successfully deleted"
}
]
}
404
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-404",
"title": "Not found",
"details": "User with id {22} does not exist"
}
]
}
User fields ¶
Get user fieldsGET/users/custom_fields/
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/custom_fields/"
URI example
200
Title
Content-Type: application/json
Body
{
"data": {
"2": {
"id": 2,
"name": {
"en": "Select"
},
"field_type": "select",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required": false
},
"user": {
"view": true,
"edit": true,
"required": false
}
}
},
"3": {
"id": 3,
"name": {
"en": "Date"
},
"field_type": "date",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required": false
},
"user": {
"view": true,
"edit": true,
"required": false
}
}
},
"4": {
"id": 4,
"name": {
"ru": "Checkbox"
},
"field_type": "checkbox",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required": false
},
"user": {
"view": true,
"edit": true,
"required": false
}
}
},
"5": {
"id": 5,
"name": {
"en": "Text",
},
"field_type": "text",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required": false
},
"user": {
"view": true,
"edit": true,
"required": true
}
}
},
"6": {
"id": 6,
"name": {
"en": "Textarea",
},
"field_type": "textarea",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required": false
},
"user": {
"view": true,
"edit": true,
"required": false
}
}
},
"7": {
"id": 7,
"name": {
"en": "Number",
},
"field_type": "number",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required": false
},
"user": {
"view": true,
"edit": true,
"required": false
}
}
},
"8": {
"id": 8,
"name": {
"1": {
"en": "Related"
},
"2": {
"en": "Related 2"
},
"3": {
"en": "Related 3"
},
"4": {
"en": "Related 4"
}
},
"field_type": "hierarchy",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required": false
},
"user": {
"view": true,
"edit": true,
"required": true
}
}
}
},
"pagination": {
"total": 7,
"per_page": 30,
"current_page": 1,
"total_pages": 1
}
}
Get user fieldGET/users/custom_fields/{id}
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/custom_fields/2"
URI example
- id
number
(required) Example: 2field ID
200
Title
Content-Type: application/json
Body
{
"data": {
"2": {
"id": 2,
"name": {
"en": "Select"
},
"field_type": "select",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required": false
},
"user": {
"view": true,
"edit": true,
"required": false
}
}
}
}
}
User field options ¶
Attention
Methods are only available for fields with type (field_type
): dropdown list (select
) and associated fields (hierarchy
)!
Get optionsGET/users/custom_fields/{custom_field_id}/options/
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/custom_fields/2/options"
URI example
- custom_field_id
number
(required) Example: 2field ID
200
Title
Content-Type: application/json
Body
{
"data": [
{
"id": 5,
"pid": 0,
"name": {
"en": "1",
}
},
{
"id": 6,
"pid": 0,
"name": {
"en": "2",
}
},
{
"id": 7,
"pid": 0,
"name": {
"en": "3",
}
},
{
"id": 171,
"pid": 0,
"name": {
"en": "4",
}
}
],
"pagination": {
"total": 4,
"per_page": 50,
"current_page": 1,
"total_pages": 1
}
}
Add/update optionsPOST/users/custom_fields/{custom_field_id}/options/
CURL example
Add/update options
The general limit for adding/updating options is 100 entries per request. The required option parameter is name.
-
To add a new option, you must specify name -
{"options":[{"name":{"en":"new option","en":"new option","ua":"new option"}}]}
-
To add a new option for associated fields at any level - use pid (id of the parent option) -
{"options":[{"pid": 21, "name":{"en" :"new option","en":"new option","ua":"new option"}}]}
-
To update an existing option, use the id parameter, only the name parameter is available for changes -
{"options":[{"id": 20,"name":{"en":"update option ","en":"update option","ua":"update option"}}]}
Moving associated field options across levels is prohibited. All new options are added to the end of the list. This query will return all affected options as a result.
curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" -H 'content-type: application/json' -d '{"options":[{"name":{"ru":"new option","en":"new option","ua":"new option"}}, {"pid": 21, "name":{"ru":"new option","en":"new option","ua":"new option"}}, {"id": 20,"name":{"ru":"update option","en":"update option","ua":"update option"}}]}' "https://system_domain/api/v2users/users/custom_fields/2/options"
URI example
- custom_field_id
number
(required) Example: 2field ID
- options
array
(required) Example: {"options":[{"id": "20", "name":{"ru":"update option","en":"update option","ua":"update option"}}]}Add/Update Options
200
Title
Content-Type: application/json
Body
{
"data": [
{
"id": 20,
"pid": 0,
"name": {
"en": "update option"
}
},
{
"id": 233,
"pid": 0,
"name": {
"en": "new option"
}
},
{
"id": 234,
"pid": 21,
"name": {
"en": "new option"
}
}
]
}
Delete optionDELETE/users/custom_fields/{custom_field_id}/options/{option_id}
CURL example
curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/custom_fields/2/options/233"
URI example
- custom_field_id
number
(required) Example: 233field ID
- option_id
number
(required) Example: 233option ID
200
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "s-204",
"title": "No content",
"details": "Option with id {233} successfully deleted"
}
]
}
User notes ¶
Get noteGET/users/{user_id}/notes/{?page}
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/22/notes"
URI example
- user_id
number
(required) Example: 22user ID
- page
number
(optional) Example: 1Page number
200
Title
Content-Type: application/json
Body
{
"data": [
{
"id": 79,
"creator_id": 1,
"user_id": 22,
"text": "",
"date_created": "19:41:09 19.03.2019",
"date_updated": "19:41:09 19.03.2019",
"file": {
"name": "test_image_png.png",
"url": "https://system_domain/en/file/download/d73a880871041e53a70bac2f05c439b6fd5ed0c7",
"data_type": "png"
}
},
{
"id": 78,
"creator_id": 1,
"user_id": 22,
"text": "test",
"date_created": "19:40:52 19.03.2019",
"date_updated": "19:40:53 19.03.2019",
"file": []
}
],
"pagination": {
"total": 2,
"per_page": 30,
"current_page": 1,
"total_pages": 1
}
}
404
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-404",
"title": "Not found",
"details": "User with id {22} does not exist"
}
]
}
Add notePOST/users/{user_id}/notes/
CURL example
curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'text=test' "https://system_domain/api/v2/users/22/notes"
URI example
- user_id
number
(required) Example: 22User ID
- text
string
(optional) Example: testText of note
- file
file
(optional) Example: ``File of note
200
Title
Content-Type: application/json
Body
{
"data": {
"id": 81,
"creator_id": 1,
"user_id": 22,
"text": "test",
"date_created": "19:46:56 19.03.2019",
"date_updated": "19:46:56 19.03.2019",
"file": []
}
}
404
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-404",
"title": "Not found",
"details": "User with id {22} does not exist"
}
]
}
Delete noteDELETE/users/{user_id}/notes/{note_id}
CURL example
curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/22/notes/80"
URI example
- user_id
number
(required) Example: 22User ID
- note_id
number
(required) Example: 80Note ID
200
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "s-204",
"title": "No content",
"details": "Note with id {80} successfully deleted"
}
]
}
404
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "s-204",
"title": "No content",
"details": "Note with id {80} in user with id {22} does not exist"
}
]
}
User statuses ¶
User status historyGET/users/{user_id}/statuses_log/{?page,from_date_created,to_date_created,statuses}
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/22/statuses_log"
URI example
- user_id
number
(required) Example: 22User ID
- page
number
(optional) Example: 1Page number
- from_date_created
string
(optional) Example: 2017-12-31 00:00:00Creation date from
- to_date_created
string
(optional) Example: 2017-12-31 00:00:00Creation date before
- statuses
string
(optional) Example: online,offlineList of statuses, separated by commas
200
Title
Content-Type: application/json
Body
{
"data": [
{
"id": 2,
"status_id": "on-hold",
"name": {
"en": "On hold"
},
"date_created": "2020-11-30 23:28:36"
},
{
"id": 1,
"status_id": "online",
"name": {
"en": "Online"
},
"date_created": "2020-10-08 23:11:45"
}
],
"pagination": {
"total": 26,
"per_page": 30,
"current_page": 1,
"total_pages": 1
}
}
404
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-404",
"title": "Not found",
"details": "User with id {22} does not exist"
}
]
}
Organizations ¶
List of organizationsGET/organizations/{?page,search,exact_search,from_date_created,to_date_created,from_date_updated,to_date_updated}
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/organizations/?page=1"
URI example
- page
number
(optional) Example: 1Page number
- search
string
(optional) Example: hdeSearch by organization
- exact_search
number
(optional) Example: 1Search for an exact match of
search
.1
- full match search,0
- standard search- from_date_created
string
(optional) Example: 2018-12-31 00:00:00Creation date from
- to_date_created
string
(optional) Example: 2018-12-31 00:00:00Creation date before
- from_date_updated
string
(optional) Example: 2018-12-31 00:00:00Update date from
- to_date_updated
string
(optional) Example: 2018-12-31 00:00:00Modified date before
- order_by
string
(optional) Example: nameOrganization sorting, can be specified separated by commas. Organizations can be sorted by the following parameters: date_created, date_updated, name. The sort order is {asc} (ascending) and {desc} (descending). Default value: name{asc}
200
Title
Content-Type: application/json
Body
{
"data": [
{
"id": 2,
"date_created": "2019-01-01 00:00:00",
"date_updated": "2019-01-01 00:00:00",
"name": "EddyDesk",
"domains": "@eddydesk.com",
"address": "",
"phone": "",
"email": "",
"web": "https://eddydesk.com",
"minute_limit": 0,
"employees": [
1506760,
1506763,
1506743
],
"managers": [],
"custom_fields": [
{
"id": 89,
"field_type": "textarea",
"field_value": "test"
},
{
"id": 90,
"field_type": "checkbox",
"field_value": 1
}
]
},
{
"id": 11,
"date_created": "2019-01-01 00:00:00",
"date_updated": "2019-01-01 00:00:00",
"name": "Test",
"domains": "@hde.com",
"address": "",
"phone": "",
"email": "1555@ED.com",
"web": "",
"minute_limit": 10000,
"employees": [
1506780,
1506782,
1506783
],
"managers": [
1506783
],
"custom_fields": [
{
"id": 89,
"field_type": "textarea",
"field_value": "test"
},
{
"id": 90,
"field_type": "checkbox",
"field_value": 1
}
]
}
],
"pagination": {
"total": "2",
"per_page": 30,
"current_page": 1,
"total_pages": 1
}
}
Get organizationGET/organizations/{id}
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/organizations/2"
URI example
- id
number
(required) Example: 2Organization ID
200
Title
Content-Type: application/json
Body
{
"data": {
"id": 2,
"date_created": "2019-01-01 00:00:00",
"date_updated": "2019-01-01 00:00:00",
"name": "EddyDesk",
"domains": "@eddydesk.com",
"address": "",
"phone": "",
"email": "",
"web": "https://eddydesk.com",
"minute_limit": 0,
"employees": [
1506760,
1506763,
1506743
],
"managers": [],
"custom_fields": [
{
"id": 89,
"field_type": "textarea",
"field_value": "test"
},
{
"id": 90,
"field_type": "checkbox",
"field_value": 1
}
]
}
}
Add organizationPOST/organizations/
CURL example
curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'name=Eddydesk99&custom_fields[2]=4&custom_fields[4]=test' "https://system_domain/api/v2/organization/"
URI example
- name
string
(required) Example: EddyDeskOrganization name
- domains
string
(optional) Example: @EddyDesk.com, @hde.comOrganization domains, separated by commas
- address
string
(optional) Example: Moscow, RussiaAddress
- phone
string
(optional) Example: 749934687445Phone
string
(optional) Example: info@EddyDesk.comEmail
- web
string
(optional) Example: http://example.comWebsite
- minute_limit
number
(optional) Example: 0Allotted time for ticket execution per month (minutes)
- employees
array
(optional) Example: [0 => 1, 1 => 2]Company employees
- managers
array
(optional) Example: [0 => 2]Company managers
- custom_fields
array
(optional) Example: [87 => 'test', 2 => 1]Array of custom contact fields, example: custom_fields[field_id] = value, in case of a associated field, the level must be specified custom_fields[field_id][level] = value
200
Title
Content-Type: application/json
Body
{
"data": {
"id": 36,
"date_created": "2019-01-01 00:00:00",
"date_updated": "2019-01-01 00:00:00",
"name": "Eddydesk99",
"domains": "",
"address": "",
"phone": "",
"email": "",
"web": "",
"minute_limit": 0,
"employees": [],
"managers": [],
"custom_fields": [
{
"id": 89,
"field_type": "textarea",
"field_value": "test"
},
{
"id": 90,
"field_type": "checkbox",
"field_value": 1
}
]
}
}
400
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-411",
"title": "Bad request",
"details": "Organization name {Eddydesk99} already exists"
}
]
}
Update organizationPUT/organizations/{id}
CURL example
curl -X PUT -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{"name":"Eddydesk2","domains":"@eddydesk.com", "custom_fields": {"6": "test", "2": "18"}}' "https://system_domain/api/v2/organizations/2"
URI example
- id
number
(required) Example: 2Organization ID
- name
string
(optional) Example: EddydeskOrganization name
- domains
string
(optional) Example: @eddydesk.com, @hde.comOrganization domains, separated by commas
- address
string
(optional) Example: Moscow, RussiaAddress
- phone
string
(optional) Example: 749934687445Phone
string
(optional) Example: info@eddydesk.comEmail
- web
string
(optional) Example: http://example.comWebsite
- minute_limit
number
(optional) Example: 0Allotted time for ticket execution per month (minutes)
- employees
array
(optional) Example: [0 => 1, 1 => 2]Company employees
- managers
array
(optional) Example: [0 => 2]Company managers
- custom_fields
array
(optional) Example: [87 => 'test', 2 => 1]Array of custom contact fields, example: custom_fields[field_id] = value, in case of an associated field, the level must be specified custom_fields[field_id][level] = value
200
Title
Content-Type: application/json
Body
{
"data": {
"id": 2,
"date_created": "2019-01-01 00:00:00",
"date_updated": "2019-01-01 00:00:00",
"name": "Eddydesk2",
"domains": "@eddydesk.com",
"address": "adress",
"phone": "+7 (499) 346-87-44",
"email": "",
"web": "https://eddydesk.com",
"minute_limit": 10,
"employees": [
1506760,
1506763,
1506743
],
"managers": [],
"custom_fields": [
{
"id": 89,
"field_type": "textarea",
"field_value": "test"
},
{
"id": 90,
"field_type": "checkbox",
"field_value": 1
}
]
}
}
400
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-411",
"title": "Bad request",
"details": "Organization name {Eddydesk2} already exists"
}
]
}
Delete organizationDELETE/organizations/{id}
CURL example
curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/organizations/36"
URI example
- id
number
(required) Example: 36Organization ID
200
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "s-204",
"title": "No content",
"details": "Organization with id {36} successfully deleted"
}
]
}
404
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-404",
"title": "Not found",
"details": "Organization with id {36} does not exist"
}
]
}
Organization fields ¶
Get organization fieldsGET/organizations/custom_fields/
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/organizations/custom_fields/"
URI example
200
Title
Content-Type: application/json
Body
{
"data": {
"2": {
"id": 2,
"name": {
"en": "Select"
},
"field_type": "select",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required": false
},
"user": {
"view": true,
"edit": true,
"required": false
}
}
},
"3": {
"id": 3,
"name": {
"en": "Date"
},
"field_type": "date",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required": false
},
"user": {
"view": true,
"edit": true,
"required": false
}
}
},
"4": {
"id": 4,
"name": {
"ru": "Checkbox",
},
"field_type": "checkbox",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required": false
},
"user": {
"view": true,
"edit": true,
"required": false
}
}
},
"5": {
"id": 5,
"name": {
"en": "Text"
},
"field_type": "text",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required": false
},
"user": {
"view": true,
"edit": true,
"required": true
}
}
},
"6": {
"id": 6,
"name": {
"en": "Textarea"
},
"field_type": "textarea",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required": false
},
"user": {
"view": true,
"edit": true,
"required": false
}
}
},
"7": {
"id": 7,
"name": {
"en": "Number"
},
"field_type": "number",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required": false
},
"user": {
"view": true,
"edit": true,
"required": false
}
}
},
"8": {
"id": 8,
"name": {
"1": {
"en": "Related"
},
"2": {
"en": "Related 2"
},
"3": {
"en": "Related 3"
},
"4": {
"en": "Related 4"
}
},
"field_type": "hierarchy",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required": false
},
"user": {
"view": true,
"edit": true,
"required": true
}
}
}
},
"pagination": {
"total": 7,
"per_page": 30,
"current_page": 1,
"total_pages": 1
}
}
Get organization fieldGET/organizations/custom_fields/{id}
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/organizations/custom_fields/2"
URI example
- id
number
(required) Example: 2Field ID
200
Title
Content-Type: application/json
Body
{
"data": {
"2": {
"id": 2,
"name": {
"en": "Select"
},
"field_type": "select",
"permissions": {
"staff": {
"view": true,
"edit": true,
"required": false
},
"user": {
"view": true,
"edit": true,
"required": false
}
}
}
}
}
Organization field options ¶
Attention
Methods are only available for fields with type (field_type
): dropdown list (select
) and related fields (hierarchy
)!
Get optionsGET/organizations/custom_fields/{custom_field_id}/options/
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/organizations/custom_fields/2/options"
URI example
- custom_field_id
number
(required) Example: 2Field ID
200
Title
Content-Type: application/json
Body
{
"data": [
{
"id": 5,
"pid": 0,
"name": {
"en": "1"
}
},
{
"id": 6,
"pid": 0,
"name": {
"en": "2"
}
},
{
"id": 7,
"pid": 0,
"name": {
"en": "3"
}
},
{
"id": 171,
"pid": 0,
"name": {
"en": "4"
}
}
],
"pagination": {
"total": 4,
"per_page": 50,
"current_page": 1,
"total_pages": 1
}
}
Add/update optionsPOST/organizations/custom_fields/{custom_field_id}/options/
CURL example
Add/update options
The general limit for adding/updating options is 100 entries per request. The required option parameter is name.
-
To add a new option, you must specify name -
{"options":[{"name":{"en":"new option","en":"new option","ua":"new option"}}]}
-
To add a new option for associated fields at any level - use pid (id of the parent option) -
{"options":[{"pid": 21, "name":{"en" :"new option","en":"new option","ua":"new option"}}]}
-
To update an existing option, use the id parameter, only the name parameter is available for changes -
{"options":[{"id": 20,"name":{"en":"update option ","en":"update option","ua":"update option"}}]}
Moving associated field options across levels is prohibited. All new options are added to the end of the list. This query will return all affected options as a result.
curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" -H 'content-type: application/json' -d '{"options":[{"name":{"ru":"new option","en":"new option","ua":"new option"}}, {"pid": 21, "name":{"ru":"new option","en":"new option","ua":"new option"}}, {"id": 20,"name":{"ru":"update option","en":"update option","ua":"update option"}}]}' "https://system_domain/api/v2users/organizations/custom_fields/2/options"
URI example
- custom_field_id
number
(required) Example: 2Field ID
- options
array
(required) Example: {"options":[{"id": "20", "name":{"ru":"update option","en":"update option","ua":"update option"}}]}Add/Update Options
200
Title
Content-Type: application/json
Body
{
"data": [
{
"id": 20,
"pid": 0,
"name": {
"en": "update option"
}
},
{
"id": 233,
"pid": 0,
"name": {
"en": "new option"
}
},
{
"id": 234,
"pid": 21,
"name": {
"en": "new option"
}
}
]
}
Delete optionDELETE/organizations/custom_fields/{custom_field_id}/options/{option_id}
CURL example
curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/organizations/custom_fields/2/options/233"
URI example
- custom_field_id
number
(required) Example: 233field ID
- option_id
number
(required) Example: 233option ID
200
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "s-204",
"title": "No content",
"details": "Option with id {233} successfully deleted"
}
]
}
Organization notes ¶
Get noteGET/organizations/{organiz_id}/notes/{?page}
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/organizations/2/notes"
URI example
- organiz_id
number
(required) Example: 2Organization ID
- page
number
(optional) Example: 1Page number
200
Title
Content-Type: application/json
Body
{
"data": [
{
"id": 83,
"creator_id": 1,
"organiz_id": 2,
"text": "",
"date_created": "20:02:05 19.03.2019",
"date_updated": "20:02:05 19.03.2019",
"file": {
"name": "test2.png",
"url": "https://system_domain/en/file/download/154356e5b627857e09f937192abcbc671e778dc3",
"data_type": "png"
}
},
{
"id": 82,
"creator_id": 1,
"organiz_id": 2,
"text": "test2",
"date_created": "20:01:27 19.03.2019",
"date_updated": "20:02:10 19.03.2019",
"file": []
}
],
"pagination": {
"total": 2,
"per_page": 30,
"current_page": 1,
"total_pages": 1
}
}
404
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-404",
"title": "Not found",
"details": "Organization with id {2} does not exist"
}
]
}
Add notePOST/organizations/{organiz_id}/notes/
CURL example
curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'text=test' "https://system_domain/api/v2/organizations/2/notes"
URI example
- organiz_id
number
(required) Example: 2User ID
- text
string
(optional) Example: testNote text
- file
file
(optional)Note file
200
Title
Content-Type: application/json
Body
{
"data": {
"id": 84,
"creator_id": 1,
"organiz_id": 2,
"text": "test",
"date_created": "20:07:10 19.03.2019",
"date_updated": "20:07:10 19.03.2019",
"file": []
}
}
404
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "e-404",
"title": "Not found",
"details": "Organization with id {2} does not exist"
}
]
}
Delete noteDELETE/organizations/{organiz_id}/notes/{note_id}
CURL example
curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/organizations/22/notes/80"
URI example
- organiz_id
number
(required) Example: 2User ID
- note_id
number
(required) Example: 80Note ID
200
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "s-204",
"title": "No content",
"details": "Note with id {85} successfully deleted"
}
]
}
404
Title
Content-Type: application/json
Body
{
"errors": [
{
"code": "s-204",
"title": "No content",
"details": "Note with id {85} in organizations with id {2} does not exist"
}
]
}
Groups ¶
List of groupsGET/groups/
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/groups"
URI example
200
Title
Content-Type: application/json
Body
{
"data": [
{
"id": 1,
"type": "user",
"name": {
"ru": "Клиент",
"en": "Client",
"ua": "Клиент"
},
"disable": 0
},
{
"id": 2,
"type": "staff",
"name": {
"ru": "Администратор",
"en": "Administrator",
"ua": "Администратор"
},
"disable": 0
},
{
"id": 3,
"type": "staff",
"name": {
"ru": "Сотрудник",
"en": "Employee",
"ua": "Сотрудник"
},
"disable": 0
}
]
}
Statuses ¶
List of user statusesGET/user_statuses/
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/user_statuses"
URI example
200
Title
Content-Type: application/json
Body
{
"data": [
{
"id": "online",
"name": {
"en": "Online"
},
"color": "#67c23a"
},
{
"id": "on-hold",
"name": {
"en": "On hold"
},
"color": "#e6a23c"
},
{
"id": "obed",
"name": {
"en": "Lunch break"
},
"color": "#28D611"
},
{
"id": "offline",
"name": {
"en": "Offline"
},
"color": "#f56c6c"
}
]
}
Knowledge Base ¶
Knowledge base API overview
API responses are always filtered according to the permissions of the user on whose behalf the API request is made. For example, when a user requests a list of articles in a section, the API returns only those articles that the user can view in the knowledge base. The exception is public categories and articles, all users will get the same response.
Speed limits
The knowledge base API is limited in speed, the default limit is 60 requests per minute (RPM). Knowledge base API limits do not count against other API limits. If the limit is exceeded, access will be automatically blocked for 1 hour.
You can use the following response headers to confirm the current speed limit for the system and keep track of the number of requests remaining in the current minute:
X-Rate-Limit: 60
X-Rate-Limit-Remaining: 59
EddyDesk reserves the right to adjust the speed limit and blocking time for the knowledge base API to ensure high quality service for all customers.
Categories ¶
List of categoriesGET/knowledge_base/categories{?page,public,parent_list,from_date_created,to_date_created,from_date_updated,to_date_updated,order_by}
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/knowledge_base/categories?page=1"
URI example
- page
number
(optional) Example: 1Page number
- public
boolean
(optional) Example: falseSearch by public categories
- parent_list
string
(optional) Example: 1,2,3Search for categories by parent categories, separated by commas
- from_date_created
string
(optional) Example: 2017-12-31 00:00:00Creation date from
- to_date_created
string
(optional) Example: 2017-12-31 00:00:00Creation date before
- from_date_updated
string
(optional) Example: 2017-12-31 00:00:00Update date from
- to_date_updated
string
(optional) Example: 2017-12-31 00:00:00Update date before
- order_by
string
(optional) Example: positionSorting categories, can be specified separated by commas. Categories can be sorted by parameters: date_created, date_updated, position. The sort order is {asc} (ascending) and {desc} (descending). Default value: position{asc}
200
Title
Content-Type: application/json
Body
{
"data": {
"1": {
"id": 1,
"parent_id": 0,
"position": 23,
"date_created": "2017-03-24 15:47:01",
"date_updated": "2019-03-05 20:19:40",
"access": "staff",
"access_by_groups": [
1,
3,
2
],
"title": {
"en": "test category 1"
}
},
"2": {
"id": 2,
"parent_id": 1,
"position": 21,
"date_created": "2017-05-29 11:57:24",
"date_updated": "2018-12-06 15:25:57",
"access": "user",
"access_by_groups": [
3,
5,
6,
7,
8,
10,
11,
2
],
"title": {
"en": "test category 2"
}
},
"-1": {
"id": -1,
"parent_id": 0,
"position": 1,
"date_created": "2015-12-31 23:00:00",
"date_updated": "2019-01-30 15:54:21",
"access": "public",
"access_by_groups": [
1,
3,
2
],
"title": {
"en": "Templates"
}
},
"-2": {
"id": -2,
"parent_id": 0,
"position": 3,
"date_created": "2018-01-01 00:00:00",
"date_updated": "2019-03-16 01:06:45",
"access": "user",
"access_by_groups": [
1,
3,
2
],
"title": {
"en": "News"
}
}
},
"pagination": {
"total": 4,
"per_page": 30,
"current_page": 1,
"total_pages": 1
}
}
Articles ¶
List of articlesGET/knowledge_base/articles{?page,public,from_date_created,to_date_created,from_date_updated,to_date_updated,order_by}
CURL example
curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/knowledge_base/articles?page=1"
URI example
- page
number
(optional) Example: 1Page number
- public
boolean
(optional) Example: falseSearch for public articles
- category_list
string
(optional) Example: 1,2,3Search for articles by category, separated by commas
- from_date_created
string
(optional) Example: 2017-12-31 00:00:00Creation date from
- to_date_created
string
(optional) Example: 2017-12-31 00:00:00Creation date before
- from_date_updated
string
(optional) Example: 2017-12-31 00:00:00Update date from
- to_date_updated
string
(optional) Example: 2017-12-31 00:00:00Update date before
- order_by
string
(optional) Example: viewsSorting of articles, can be specified separated by commas. Articles can be sorted by parameters: date_created, date_updated, views, pin. The sort order is {asc} (ascending) and {desc} (descending). Default value: date_created{desc}
200
Title
Content-Type: application/json
Body
{
"data": {
"56": {
"id": 56,
"date_created": "2018-07-17 15:15:00",
"date_updated": "2018-07-24 17:12:55",
"show_me_only": false,
"access": "public",
"pin": false,
"views_count": 130,
"categories": [
1
],
"title": {
"en": "test article"
},
"tags": {
"en": []
},
"body": {
"en": "<p>test body</p>"
},
"files": []
},
"57": {
"id": 57,
"date_created": "2018-07-17 15:15:00",
"date_updated": "2018-07-24 17:27:27",
"show_me_only": false,
"access": "staff",
"pin": false,
"views_count": 43,
"categories": [
1,
2
],
"title": {
"en": "test article"
},
"tags": {
"ru": [
"test",
"info"
],
"en": []
},
"body": {
"en": "<p>test body</p>"
},
"files": []
},
"58": {
"id": 58,
"date_created": "2018-07-17 15:15:00",
"date_updated": "2018-07-17 15:15:00",
"show_me_only": false,
"access": "user",
"pin": false,
"views_count": 3,
"categories": [
2
],
"title": {
"en": "test article"
},
"tags": {
"en": []
},
"body": {
"en": "<p>test body</p>"
},
"files": []
},
"60": {
"id": 60,
"date_created": "2018-07-24 17:24:00",
"date_updated": "2019-02-01 18:04:21",
"show_me_only": false,
"access": "public",
"pin": false,
"views_count": 32,
"categories": [
-2,
2
],
"title": {
"en": "test article"
},
"tags": {
"en": []
},
"body": {
"en": "<p>test body</p>"
},
"files": [
{
"name": "test.gif",
"url": "https://system_domain/en/knowledge_base/download/60/file/f8bb43e593d867d27c965d38dfec721fbb084cf9",
"data_type": "gif"
},
{
"name": "test.png",
"url": "https://system_domain/en/knowledge_base/download/60/file/b818daf594dd3b61098cce7fef7954bc0314edd5",
"data_type": "png"
}
]
}
},
"pagination": {
"total": 4,
"per_page": 10,
"current_page": 1,
"total_pages": 1
}
}
Additional features ¶
API versions ¶
Overview
If you have any questions related to changes in the API, please contact support@eddydesk.com or any convenient channel.
Sincerely, EddyDesk team
Current version
10.11.2021
- Added API limit headers
01.10.2021
-
Added
user_status
field to users -
Added new method List of user statuses
Update 3.1
16.04.2021
- Added new method History of user statuses
15.02.2021
- Added new method Billing requests
27.01.2021
- Added filters to the List of users method:
id_list
- allows you to get multiple users by IDorganization_list
- allows you to get users by organization ID
Update 3.0
20.10.2020
- Links with Jira issues added to tickets (field
jira_issues
)
31.08.2020
-
A parent has been added to requests (the
pid
field), the parent can be specified when creating an application -
5 new types of fields have been added to order methods and order field methods. New types: Multi-button, Button,File,Time,Regular expression.
12.08.2020
- Added tags to requests (field
tags
)
Update 2.97
25.05.2020
- Added the
event
field and theevent_list
filter to the audit-request method
01.07.2020
- Added filter
exact_search
, which allows you to search for an exact match. Filter added to methods:
Update 2.96
21.04.2020
-
Added knowledge base API in BETA mode
-
Added group filter (
group_list
) to list of users
10.04.2020
Breaking changes in ticket, user, and organization fields
The changes concern the methods:
To optimize the work with the fields, pagination has been added, in the future 30 fields per page. The options
fields parameter will be disabled, separate methods for working with options for drop-down lists and related fields have been added to the API.
We recommend switching to new methods of working with options.
The changes will take effect no earlier than 11/01/2020, the deadline may be delayed due to active API integrations. The new mode of operation can be enabled on systems upon request to the support team. If you need to delay changes or help with the transition - please contact our support team.
Current limit of 300 fields per page, options
field available
-
Added pagination to methods of working with fields. Temporary limit 300, in the future 30 fields per page.
-
Added new methods
- Get request field
- Get order field options
- Add/update post-bid field options
- Delete ticket field option
- Get user-field
- Get user-field-options
- Add/update user-field options
- Delete user field option
- Get organization-field
- Get account-field-options
- Add/update account-field options
- Remove an organization-field option
13.03.2020
-
New types of events have been added to the application-audit method
-
Records about events performed by the system (dispatcher, SLA, sending emails, etc.)
-
Added
user_list
filter to audit request method
25.02.2020
-
Added
ldap_username
field to users and search -
Added 2 filters to audit request
from_date_created
- from creation dateto_date_created
- before creation date
29.01.2020
-
Added a new field source of the request (
source
) to requests -
Limits ban time changed from 48 hours to 20 minutes due to more frequent bans. Time is subject to change.
Update 2.95
03.10.2019
-
Added language field (
language
) to users -
The ability to change the
email
field has been added to the update user method
19.09.2019
- Added 3 new application fields
cc
- array of CC mailboxes of the requestbcc
- array of BCC request mailboxesfollowers
- an array of users watching the request