Bots

The Bot model

Key

Type

Description

id

String

The unique identifier for the bot which is given by Tiledesk.

name

String

The bot name.

type

String

The bot type. Permitted values: internal, external

secret

String

The bot secret token used for JWT authentication

url

String

The bot external endpoint address

trashed

Boolean

The bot status

attributes

Object

The custom attributes which are set for the bot.

createdAt

String

The time when the bot was created.

updatedAt

String

The time when the bot was updated.

createdBy

String

The unique identifier of the row creator

id_project

String

The unique identifier of the project

get
Get all bots

https://api.tiledesk.com/v2/:project_id/faq_kb
Allows an account to list all the bots of 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
Response
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/v2/5b55e806c93dde00143163dd/faq_kb

get
Get a bot by id

https://api.tiledesk.com/v2/:project_id/faq_kb
Allows an account to get a bot of 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.
id
required
string
The bot identifier
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
Response
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/v2/5b55e806c93dde00143163dd/faq_kb/5be9b2ecc72a050015e14951

post
Create a new bot

https://api.tiledesk.com/v2/:project_id/faq_kb
Allows to add more bots.
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
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
Response
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/v2/5b55e806c93dde00143163dd/faq_kb

put
Update a bot

https://api.tiledesk.com/v2/:project_id/faq_kb/:id
Allows to update a bot.
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
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
Response
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/v2/5b55e806c93dde00143163dd/faq_kb/5be9b2ecc72a050015e14951

delete
Delete a bot

https://api.tiledesk.com/v2/:project_id/faq_kb/:id
Allows to delete a bot.
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
id
required
string
The bot identifier
Headers
Authorization
required
string
authorization token. Basic Auth or JWT
Response
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/v2/5b55e806c93dde00143163dd/faq_kb/5be9b2ecc72a050015e14951