Messages

You can use the API to get the message information.

get
Get the messages of a request by id

https://api.tiledesk.com/v1/:project_id/requests/:id/messages
Fetches the messages by his or her request_id
Request
Response
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
200: OK
[
{
"_id":"5c81593adf767b0017d1aa68",
"updatedAt":"2019-03-07T17:47:38.411Z",
"createdAt":"2019-03-07T17:47:38.411Z",
"sender":"SRbb2PfbSFcgICv9VQBcURZeloh1",
"senderFullname":"Guest",
"recipient":"support-group-L_OG76RYhR0XFiMf2PK",
"text":"test56",
"id_project":"5b55e806c93dde00143163dd",
"createdBy":"SRbb2PfbSFcgICv9VQBcURZeloh1",
"__v":0,
"status":200
},
{
"_id":"5c81593adf767b0017d1aa69",
"updatedAt":"2019-03-07T17:47:38.625Z",
"createdAt":"2019-03-07T17:47:38.625Z",
"sender":"system",
"senderFullname":"Bot",
"recipient":"support-group-L_OG76RYhR0XFiMf2PK",
"text":"La stiamo mettendo in contatto con un operatore. Attenda...",
"id_project":"5b55e806c93dde00143163dd",
"createdBy":"system",
"__v":0,
"status":200
},
...
]

Example:

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

get
Get the message by request id and message id

https://api.tiledesk.com/v1/:project_id/requests/:id/messages/:message_id
Fetche the message by his or her id
Request
Response
Path Parameters
id
required
string
the request identifier
message_id
required
string
the message 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
200: OK
{
"_id":"5c81593adf767b0017d1aa68",
"updatedAt":"2019-03-07T17:47:38.411Z",
"createdAt":"2019-03-07T17:47:38.411Z",
"sender":"SRbb2PfbSFcgICv9VQBcURZeloh1",
"senderFullname":"Guest",
"recipient":"support-group-L_OG76RYhR0XFiMf2PK",
"text":"test56",
"id_project":"5b55e806c93dde00143163dd",
"createdBy":"SRbb2PfbSFcgICv9VQBcURZeloh1",
"__v":0,
"status":200
}

Example:

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