Requests

You can use the API to get the request information.

get
Get all requests

https://api.tiledesk.com/v1/:project_id/requests
Allows an account to list all the requests for the project.
Request
Response
Request
Path Parameters
project_id
required
string
the Project Id is a unique code assigned to your project when you create it in Tiledesk.
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
Query Parameters
sortField
optional
string
what field to sort the results by.
direction
optional
string
sort direction: 1 or -1. Return the results in ascending or descending order. defaults to desc
page
optional
number
what page of results to fetch. defaults to first page.
full_text
optional
string
make a fulltext search query
status
optional
string
filter by request status. Values: 100 for assigned requests, 200 for pooled requests, 1000 for closed requests
dept_id
optional
string
filter by department id
lead
optional
string
filter by lead id
Response
200: OK
{
"perPage":40,
"count":179,
"requests":[
{
"_id":"5c81593adf767b0017d1aa67",
"updatedAt":"2019-03-07T17:48:05.934Z",
"createdAt":"2019-03-07T17:47:38.405Z",
"request_id":"support-group-L_OG76RYhR0XFiMf2PK",
"requester_id":"5c81593adf767b0017d1aa66",
"first_text":"first text message",
"department":"5c34ba232c62730016da250e",
"sourcePage":"https://www.tiledesk.com",
"language":"it",
"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36",
"id_project":"5b55e806c93dde00143163dd",
"createdBy":"5c81593adf767b0017d1aa66",
"__v":2,
"waiting_time":21709,
"agents":[
{
"__v":0,
"createdBy":"5aaa99024c3b110014b478f0",
"user_available":true,
"role":"admin",
"id_user":"5ab0f3fa57066e0014bfd71e",
"id_project":"5b55e806c93dde00143163dd",
"createdAt":"2018-10-03T14:40:19.521Z",
"updatedAt":"2019-03-07T17:47:38.405Z",
"_id":"5bb4d4d39214830015742b00"
}
],
"tags":[
],
"messages_count":7,
"participants":[
"5aaa99024c3b110014b478f0"
],
"status":200,
"lead":{..}
}
...
]
}

Example

curl -v -X GET -u andrea.leo@f21.it:123456 https://api.tiledesk.com/v1/5b55e806c93dde00143163dd/requests

get
Get a request by id

https://api.tiledesk.com/v1/:project_id/requests/:id
Fetches a request by his or her request_id
Request
Response
Request
Path Parameters
id
required
string
the request identifier
project_id
required
string
the Project Id is a unique code assigned to your project when you create it in Tiledesk.
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
Response
200: OK
{
"_id":"5c81593adf767b0017d1aa67",
"updatedAt":"2019-03-07T17:48:05.934Z",
"createdAt":"2019-03-07T17:47:38.405Z",
"request_id":"support-group-L_OG76RYhR0XFiMf2PK",
"requester_id":"5c81593adf767b0017d1aa66",
"first_text":"first text message",
"department":"5c34ba232c62730016da250e",
"sourcePage":"https://www.tiledesk.com",
"language":"it",
"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36",
"id_project":"5b55e806c93dde00143163dd",
"createdBy":"5c81593adf767b0017d1aa66",
"__v":2,
"waiting_time":21709,
"agents":[
{
"__v":0,
"createdBy":"5aaa99024c3b110014b478f0",
"user_available":true,
"role":"admin",
"id_user":"5ab0f3fa57066e0014bfd71e",
"id_project":"5b55e806c93dde00143163dd",
"createdAt":"2018-10-03T14:40:19.521Z",
"updatedAt":"2019-03-07T17:47:38.405Z",
"_id":"5bb4d4d39214830015742b00"
}
],
"tags":[
],
"messages_count":7,
"participants":[
"5aaa99024c3b110014b478f0"
],
"status":200,
"lead":{..}
}

Example:

curl -v -X GET -u andrea.leo@f21.it:123456 https://api.tiledesk.com/v1/5b55e806c93dde00143163dd/requests/support-group-L_OG76RYhR0XFiMf2PK

put
Close a request by id.

YOUR_TILEDESK_DOMAIN/:project_id/requests/:id/close
Only works for Tiledesk v2 environment (on-premises only).
Request
Response
Request
Path Parameters
id
required
string
the request_id field. It's the external request identifier
project_id
required
string
the Project Id is a unique code assigned to your project when you create it in Tiledesk.
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
Content-Type
required
string
use "application/json" value
Response
200: OK
{
"_id":"5c81593adf767b0017d1aa67",
"updatedAt":"2019-03-07T17:48:05.934Z",
"createdAt":"2019-03-07T17:47:38.405Z",
"request_id":"support-group-L_OG76RYhR0XFiMf2PK",
"requester_id":"5c81593adf767b0017d1aa66",
"first_text":"first text message",
"department":"5c34ba232c62730016da250e",
"sourcePage":"https://www.tiledesk.com",
"language":"it",
"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36",
"id_project":"5b55e806c93dde00143163dd",
"createdBy":"5c81593adf767b0017d1aa66",
"__v":2,
"waiting_time":21709,
"agents":[
{
"__v":0,
"createdBy":"5aaa99024c3b110014b478f0",
"user_available":true,
"role":"admin",
"id_user":"5ab0f3fa57066e0014bfd71e",
"id_project":"5b55e806c93dde00143163dd",
"createdAt":"2018-10-03T14:40:19.521Z",
"updatedAt":"2019-03-07T17:47:38.405Z",
"_id":"5bb4d4d39214830015742b00"
}
],
"tags":[
],
"messages_count":7,
"participants":[
"5aaa99024c3b110014b478f0"
],
"status":1000,
"lead":{..}
}

put
Reopen a request by id.

YOUR_TILEDESK_DOMAIN/:project_id/requests/:id/reopen
Only works for Tiledesk v2 environment (on-premises only).
Request
Response
Request
Path Parameters
id
required
string
the request_id field. It's the external request identifier
project_id
required
string
the Project Id is a unique code assigned to your project when you create it in Tiledesk.
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
Content-Type
required
string
use "application/json" value
Response
200: OK
{
"_id":"5c81593adf767b0017d1aa67",
"updatedAt":"2019-03-07T17:48:05.934Z",
"createdAt":"2019-03-07T17:47:38.405Z",
"request_id":"support-group-L_OG76RYhR0XFiMf2PK",
"requester_id":"5c81593adf767b0017d1aa66",
"first_text":"first text message",
"department":"5c34ba232c62730016da250e",
"sourcePage":"https://www.tiledesk.com",
"language":"it",
"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36",
"id_project":"5b55e806c93dde00143163dd",
"createdBy":"5c81593adf767b0017d1aa66",
"__v":2,
"waiting_time":21709,
"agents":[
{
"__v":0,
"createdBy":"5aaa99024c3b110014b478f0",
"user_available":true,
"role":"admin",
"id_user":"5ab0f3fa57066e0014bfd71e",
"id_project":"5b55e806c93dde00143163dd",
"createdAt":"2018-10-03T14:40:19.521Z",
"updatedAt":"2019-03-07T17:47:38.405Z",
"_id":"5bb4d4d39214830015742b00"
}
],
"tags":[
],
"messages_count":7,
"participants":[
"5aaa99024c3b110014b478f0"
],
"status":100,
"lead":{..}
}

put
Route a request to a department

YOUR_TILEDESK_DOMAIN/:project_id/requests/:id/departments
Routes a request to a department. Only works for Tiledesk v2 environment (on-premises only).
Request
Response
Request
Path Parameters
id
required
string
the request_id field. It's the external request identifier
project_id
required
string
the Project Id is a unique code assigned to your project when you create it in Tiledesk.
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
Content-Type
required
string
use "application/json" value
Body Parameters
departmentid
required
string
the department identifier
nobot
optional
boolean
esclude a bot from the assignment
Response
200: OK
{
"_id":"5c81593adf767b0017d1aa67",
"updatedAt":"2019-03-07T17:48:05.934Z",
"createdAt":"2019-03-07T17:47:38.405Z",
"request_id":"support-group-L_OG76RYhR0XFiMf2PK",
"requester_id":"5c81593adf767b0017d1aa66",
"first_text":"first text message",
"department":"5c34ba232c62730016da250e",
"sourcePage":"https://www.tiledesk.com",
"language":"it",
"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36",
"id_project":"5b55e806c93dde00143163dd",
"createdBy":"5c81593adf767b0017d1aa66",
"__v":2,
"waiting_time":21709,
"agents":[
{
"__v":0,
"createdBy":"5aaa99024c3b110014b478f0",
"user_available":true,
"role":"admin",
"id_user":"5ab0f3fa57066e0014bfd71e",
"id_project":"5b55e806c93dde00143163dd",
"createdAt":"2018-10-03T14:40:19.521Z",
"updatedAt":"2019-03-07T17:47:38.405Z",
"_id":"5bb4d4d39214830015742b00"
}
],
"tags":[
],
"messages_count":7,
"participants":[
"5aaa99024c3b110014b478f0"
],
"status":100,
"lead":{..}
}

patch
Update a request by id

YOUR_TILEDESK_DOMAIN/:project_id/requests/:id/
Only works for Tiledesk v2 environment (on-premises only).
Request
Response
Request
Path Parameters
id
required
string
the request_id field. It's the external request identifier
project_id
required
string
the Project Id is a unique code assigned to your project when you create it in Tiledesk.
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
Content-Type
required
string
use "application/json" value
Body Parameters
first_text
optional
string
the request first text
lead
optional
string
the lead identifier
status
optional
number
the request status
tags
optional
array
the request tags
rating
optional
number
the request rating
rating_message
optional
string
the request rating message
language
optional
string
the request language
sourcePage
optional
string
the request source page
Response
200: OK
{
"_id":"5c81593adf767b0017d1aa67",
"updatedAt":"2019-03-07T17:48:05.934Z",
"createdAt":"2019-03-07T17:47:38.405Z",
"request_id":"support-group-L_OG76RYhR0XFiMf2PK",
"requester_id":"5c81593adf767b0017d1aa66",
"first_text":"first text message",
"department":"5c34ba232c62730016da250e",
"sourcePage":"https://www.tiledesk.com",
"language":"it",
"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36",
"id_project":"5b55e806c93dde00143163dd",
"createdBy":"5c81593adf767b0017d1aa66",
"__v":2,
"waiting_time":21709,
"agents":[
{
"__v":0,
"createdBy":"5aaa99024c3b110014b478f0",
"user_available":true,
"role":"admin",
"id_user":"5ab0f3fa57066e0014bfd71e",
"id_project":"5b55e806c93dde00143163dd",
"createdAt":"2018-10-03T14:40:19.521Z",
"updatedAt":"2019-03-07T17:47:38.405Z",
"_id":"5bb4d4d39214830015742b00"
}
],
"tags":[
],
"messages_count":7,
"participants":[
"5aaa99024c3b110014b478f0"
],
"status":100,
"lead":{..}
}

post
Add a participant to a request

YOUR_TILEDESK_DOMAIN/:project_id/requests/:id/participants
Add a participant (agent or bot) to a request. Only works for Tiledesk v2 environment (on-premises only).
Request
Response
Request
Path Parameters
id
required
string
the request_id field. It's the external request identifier
project_id
required
string
the Project Id is a unique code assigned to your project when you create it in Tiledesk.
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
Content-Type
required
string
use "application/json" value
Body Parameters
member
required
string
the participant (agent or bot) identifier
Response
200: OK
{
"_id":"5c81593adf767b0017d1aa67",
"updatedAt":"2019-03-07T17:48:05.934Z",
"createdAt":"2019-03-07T17:47:38.405Z",
"request_id":"support-group-L_OG76RYhR0XFiMf2PK",
"requester_id":"5c81593adf767b0017d1aa66",
"first_text":"first text message",
"department":"5c34ba232c62730016da250e",
"sourcePage":"https://www.tiledesk.com",
"language":"it",
"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36",
"id_project":"5b55e806c93dde00143163dd",
"createdBy":"5c81593adf767b0017d1aa66",
"__v":2,
"waiting_time":21709,
"agents":[
{
"__v":0,
"createdBy":"5aaa99024c3b110014b478f0",
"user_available":true,
"role":"admin",
"id_user":"5ab0f3fa57066e0014bfd71e",
"id_project":"5b55e806c93dde00143163dd",
"createdAt":"2018-10-03T14:40:19.521Z",
"updatedAt":"2019-03-07T17:47:38.405Z",
"_id":"5bb4d4d39214830015742b00"
}
],
"tags":[
],
"messages_count":7,
"participants":[
"5aaa99024c3b110014b478f0"
],
"status":100,
"lead":{..}
}

put
Set the request participants

YOUR_TILEDESK_DOMAIN/:project_id/requests/:id/participants
Set the request participants (agent or bot). Only works for Tiledesk v2 environment (on-premises only).
Request
Response
Request
Path Parameters
id
required
string
the request_id field. It's the external request identifier
project_id
required
string
the Project Id is a unique code assigned to your project when you create it in Tiledesk.
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
Content-Type
required
string
use "application/json" value
Body Parameters
required
array
the participants (agent or bot) identifiers array
Response
200: OK
{
"_id":"5c81593adf767b0017d1aa67",
"updatedAt":"2019-03-07T17:48:05.934Z",
"createdAt":"2019-03-07T17:47:38.405Z",
"request_id":"support-group-L_OG76RYhR0XFiMf2PK",
"requester_id":"5c81593adf767b0017d1aa66",
"first_text":"first text message",
"department":"5c34ba232c62730016da250e",
"sourcePage":"https://www.tiledesk.com",
"language":"it",
"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36",
"id_project":"5b55e806c93dde00143163dd",
"createdBy":"5c81593adf767b0017d1aa66",
"__v":2,
"waiting_time":21709,
"agents":[
{
"__v":0,
"createdBy":"5aaa99024c3b110014b478f0",
"user_available":true,
"role":"admin",
"id_user":"5ab0f3fa57066e0014bfd71e",
"id_project":"5b55e806c93dde00143163dd",
"createdAt":"2018-10-03T14:40:19.521Z",
"updatedAt":"2019-03-07T17:47:38.405Z",
"_id":"5bb4d4d39214830015742b00"
}
],
"tags":[
],
"messages_count":7,
"participants":[
"5aaa99024c3b110014b478f0"
],
"status":100,
"lead":{..}
}

delete
Delete a participant from the request

YOUR_TILEDESK_DOMAIN/:project_id/requests/:id/participants/:participantid
Delete a participant (agent or bot) from the request. Only works for Tiledesk v2 environment (on-premises only).
Request
Response
Request
Path Parameters
participantid
required
string
the participant (agent or bot) identifier
id
required
string
the request_id field. It's the external request identifier
project_id
required
string
the Project Id is a unique code assigned to your project when you create it in Tiledesk.
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
Response
200: OK
{
"_id":"5c81593adf767b0017d1aa67",
"updatedAt":"2019-03-07T17:48:05.934Z",
"createdAt":"2019-03-07T17:47:38.405Z",
"request_id":"support-group-L_OG76RYhR0XFiMf2PK",
"requester_id":"5c81593adf767b0017d1aa66",
"first_text":"first text message",
"department":"5c34ba232c62730016da250e",
"sourcePage":"https://www.tiledesk.com",
"language":"it",
"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36",
"id_project":"5b55e806c93dde00143163dd",
"createdBy":"5c81593adf767b0017d1aa66",
"__v":2,
"waiting_time":21709,
"agents":[
{
"__v":0,
"createdBy":"5aaa99024c3b110014b478f0",
"user_available":true,
"role":"admin",
"id_user":"5ab0f3fa57066e0014bfd71e",
"id_project":"5b55e806c93dde00143163dd",
"createdAt":"2018-10-03T14:40:19.521Z",
"updatedAt":"2019-03-07T17:47:38.405Z",
"_id":"5bb4d4d39214830015742b00"
}
],
"tags":[
],
"messages_count":7,
"participants":[
"5aaa99024c3b110014b478f0"
],
"status":100,
"lead":{..}
}

patch
Update the request attributes

YOUR_TILEDESK_DOMAIN/:project_id/requests/:id/attributes
Update the request custom attributes. Only works for Tiledesk v2 environment (on-premises only).
Request
Response
Request
Path Parameters
id
required
string
the request_id field. It's the external request identifier
project_id
required
string
the Project Id is a unique code assigned to your project when you create it in Tiledesk.
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
Content-Type
required
string
use "application/json" value
Body Parameters
required
object
the request attributes
Response
200: OK
{
"_id":"5c81593adf767b0017d1aa67",
"updatedAt":"2019-03-07T17:48:05.934Z",
"createdAt":"2019-03-07T17:47:38.405Z",
"request_id":"support-group-L_OG76RYhR0XFiMf2PK",
"requester_id":"5c81593adf767b0017d1aa66",
"first_text":"first text message",
"department":"5c34ba232c62730016da250e",
"sourcePage":"https://www.tiledesk.com",
"language":"it",
"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36",
"id_project":"5b55e806c93dde00143163dd",
"createdBy":"5c81593adf767b0017d1aa66",
"__v":2,
"waiting_time":21709,
"agents":[
{
"__v":0,
"createdBy":"5aaa99024c3b110014b478f0",
"user_available":true,
"role":"admin",
"id_user":"5ab0f3fa57066e0014bfd71e",
"id_project":"5b55e806c93dde00143163dd",
"createdAt":"2018-10-03T14:40:19.521Z",
"updatedAt":"2019-03-07T17:47:38.405Z",
"_id":"5bb4d4d39214830015742b00"
}
],
"tags":[
],
"messages_count":7,
"participants":[
"5aaa99024c3b110014b478f0"
],
"status":100,
"lead":{..}
}