Labels

Labels

You can use the API to get or set label information.

The Model

The API tag is used to implement internationalization and multilingual for the widget and chatbots.
Key
Type
Description
id
String
The unique identifier for the label which is given by Tiledesk.
data
Object
The label data model.
attributes
Object
The custom attributes which are set for the label.
createdAt
String
The time (ISO-8601 date string) when the label was created.
updatedAt
String
The time (ISO-8601 date string) when the label was updated.
createdBy
String
The unique identifier of the row creator
id_project
String
The unique identifier of the project

Label Data Model

Key
Type
Description
lang
String
The language identifier
data
Object
The translation labels data
category
String
The label data category
default
Boolean
Determines if this translation is the default for the project.
get
https://api.tiledesk.com
/v2/:project_id/labels
Get all labels for the project_id
Example
curl -v -X GET -H 'Content-Type: application/json' -u [email protected]:123456 https://api.tiledesk.com/v2/5b55e806c93dde00143163dd/labels
get
https://api.tiledesk.com
/v2/:project_id/labels/:id
Get a all the labels for the provided language
Example
curl -v -X GET -H 'Content-Type: application/json' -u [email protected]:123456 https://api.tiledesk.com/v2/5b55e806c93dde00143163dd/labels/EN
post
https://api.tiledesk.com
/v2/:project_id/labels
Create or update a label
Example:
curl -v -X POST -H 'Content-Type: application/json' -u [email protected]:123456 -d '{"lang":"andrea", "data":{OBJECT}}' https://api.tiledesk.com/v2/5b55e806c93dde00143163dd/labels
patch
https://api.tiledesk.com
/v2/:project_id/labels/:lang/default
Make a language as default for the project
Example:
curl -v -X PATCH -H 'Content-Type: application/json' -u [email protected]:123456 https://api.tiledesk.com/v2/5b55e806c93dde00143163dd/labels/EN/default
delete
https://api.tiledesk.com
/v2/:project_id/labels/:lang
Delete a label by language identifier
Example:
curl -v -X DELETE -H 'Content-Type: application/json' -u [email protected]:123456 https://api.tiledesk.com/v2/5b55e806c93dde00143163dd/labels/EN
delete
https://api.tiledesk.com
/v2/:project_id/labels/
Delete all the labels of the project
Example:
curl -v -X DELETE -H 'Content-Type: application/json' -u [email protected]:123456 https://api.tiledesk.com/v2/5b55e806c93dde00143163dd/labels/
get
https://api.tiledesk.com
/v2/:project_id/labels/default
Get all predefined labels
Example
curl -v -X GET -H 'Content-Type: application/json' -u [email protected]:123456 https://api.tiledesk.com/v2/5b55e806c93dde00143163dd/labels/default
get
https://api.tiledesk.com
/v2/:project_id/labels/default
Get all the standard pre-translated labels
Example
curl -v -X GET -H 'Content-Type: application/json' -u [email protected]:123456 https://api.tiledesk.com/v2/5b55e806c93dde00143163dd/labels/default
get
https://api.tiledesk.com
/v2/:project_id/labels/default/lang
Get the standard pre-translated label by language id
Example
curl -v -X GET -H 'Content-Type: application/json' -u [email protected]:123456 https://api.tiledesk.com/v2/5b55e806c93dde00143163dd/labels/default/EN
post
https://api.tiledesk.com
/v2/:project_id/labels/default/clone
Create a label clone from a pre-traslated language
Example:
curl -v -X POST -H 'Content-Type: application/json' -u [email protected]:123456 https://api.tiledesk.com/v2/5b55e806c93dde00143163dd/labels/default/clone
Last modified 6mo ago