Bots

get
Get all bots

https://api.tiledesk.com/v1/:project_id/faq_kb
Allows an account to list all the bots of the project.
Request
Response
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
200: OK
[
{
"_id":"5be9b2ecc72a050015e14951",
"updatedAt":"2018-11-12T17:05:50.616Z",
"createdAt":"2018-11-12T17:05:48.544Z",
"name":"bot1",
"id_project":"5b55e806c93dde00143163dd",
"trashed":false,
"createdBy":"5ab0f3fa57066e0014bfd71e",
"__v":0,
"external":false
},
{
"_id":"5ce265596438e40017e3610d",
"updatedAt":"2019-05-20T08:29:14.524Z",
"createdAt":"2019-05-20T08:29:13.286Z",
"name":"bot2",
"id_project":"5b55e806c93dde00143163dd",
"trashed":false,
"createdBy":"5ab0f3fa57066e0014bfd71e",
"__v":0,
"external":false
}
]

Example

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

get
Get a bot by id

https://api.tiledesk.com/v1/:project_id/faq_kb
Allows an account to get a bot of the project.
Request
Response
Path Parameters
project_id
required
string
the Project Id is a unique code assigned to your project when you create it in Tiledesk.
id
required
string
The bot identifier
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
200: OK
{
"_id":"5be9b2ecc72a050015e14951",
"updatedAt":"2018-11-12T17:05:50.616Z",
"createdAt":"2018-11-12T17:05:48.544Z",
"name":"bot1",
"id_project":"5b55e806c93dde00143163dd",
"trashed":false,
"createdBy":"5ab0f3fa57066e0014bfd71e",
"__v":0,
"external":false
}

Example

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

post
Create a new bot

https://api.tiledesk.com/v1/:project_id/faq_kb
Allows to add more bots.
Request
Response
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
Content-Type
required
string
use "application/json" value
Body Parameters
name
required
string
The bot name
url
optional
string
The bot external endpoint
external
optional
boolean
True if external otherwise false for internal bot
200: OK
{
"_id":"5be9b2ecc72a050015e14951",
"updatedAt":"2018-11-12T17:05:50.616Z",
"createdAt":"2018-11-12T17:05:48.544Z",
"name":"bot1",
"id_project":"5b55e806c93dde00143163dd",
"trashed":false,
"createdBy":"5ab0f3fa57066e0014bfd71e",
"__v":0,
"external":false
}

Example:

curl -v -X POST -H 'Content-Type: application/json' -u andrea.leo@f21.it:123456 -d '{"name":"bot1"}' https://api.tiledesk.com/v1/5b55e806c93dde00143163dd/faq_kb

put
Update a bot

https://api.tiledesk.com/v1/:project_id/faq_kb/:id
Allows to update a bot.
Request
Response
Path Parameters
project_id
required
string
The project_id is a unique code assigned to your project when you create it in Tiledesk
id
required
string
The bot identifier
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
Content-Type
required
string
use "application/json" value
Body Parameters
name
required
string
The bot name
url
optional
string
The bot external endpoint
external
optional
boolean
True if external otherwise false for internal bot
200: OK
{
"_id":"5be9b2ecc72a050015e14951",
"updatedAt":"2018-11-12T17:05:50.616Z",
"createdAt":"2018-11-12T17:05:48.544Z",
"name":"bot1",
"id_project":"5b55e806c93dde00143163dd",
"trashed":false,
"createdBy":"5ab0f3fa57066e0014bfd71e",
"__v":0,
"external":false
}

Example:

curl -v -X PUT -H 'Content-Type: application/json' -u andrea.leo@f21.it:123456 -d '{"name":"bot1"}' https://api.tiledesk.com/v1/5b55e806c93dde00143163dd/faq_kb/5be9b2ecc72a050015e14951

delete
Delete a bot

https://api.tiledesk.com/v1/:project_id/faq_kb/:id
Allows to delete a bot.
Request
Response
Path Parameters
project_id
required
string
The project_id is a unique code assigned to your project when you create it in Tiledesk
id
required
string
The bot identifier
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
Content-Type
required
string
use "application/json" value
200: OK
{
"_id":"5be9b2ecc72a050015e14951",
"updatedAt":"2018-11-12T17:05:50.616Z",
"createdAt":"2018-11-12T17:05:48.544Z",
"name":"bot1",
"id_project":"5b55e806c93dde00143163dd",
"trashed":false,
"createdBy":"5ab0f3fa57066e0014bfd71e",
"__v":0,
"external":false
}

Example:

curl -v -X DELETE -H 'Content-Type: application/json' -u andrea.leo@f21.it:123456 https://api.tiledesk.com/v1/5b55e806c93dde00143163dd/faq_kb/5be9b2ecc72a050015e14951