Skip to content
FacebookYouTubeX (Twitter)

Labels

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

The API tag is used to implement internationalization and multilingual for the widget and chatbots.

FieldTypeDescription
idStringThe unique identifier for the label which is given by Pingstreams.
dataObjectThe label data model.
attributesObjectThe custom attributes which are set for the label.
createdAtStringThe time (ISO-8601 date string) when the label was created.
updatedAtStringThe time (ISO-8601 date string) when the label was updated.
createdByStringThe unique identifier of the row creator
id_projectStringThe unique identifier of the project
FieldTypeDescription
langStringThe language identifier
dataObjectThe translation labels data
categoryStringThe label data category
defaultBooleanDetermines if this translation is the default for the project.

GET https://api.pingstreams.com/v3/:project_id/labels

Allows an account to list all the labels.

ParameterTypeDescription
project_idstringthe Project Id is a unique code assigned to your project when you create it in Pingstreams.
HeaderTypeDescription
Authorizationstringauthorization token. Basic Auth or JWT
curl -v -X GET -H 'Content-Type: application/json' -u user@example.com:123456 https://api.pingstreams.com/v3/5b55e806c93dde00143163dd/labels

Get a all the labels for the provided language

Section titled “Get a all the labels for the provided language”

GET https://api.pingstreams.com/v3/:project_id/labels/:id

Fetches the labels by the provided language

ParameterTypeDescription
idstringthe language iso identifier(Ex. EN, IT, ES, etc.)
project_idstringThe project_id is a unique code assigned to your project when you create it in Pingstreams
HeaderTypeDescription
Authorizationstringauthorization token. Basic Auth or JWT
Content-Typestringuse “application/json” value
curl -v -X GET -H 'Content-Type: application/json' -u user@example.com:123456 https://api.pingstreams.com/v3/5b55e806c93dde00143163dd/labels/EN

POST https://api.pingstreams.com/v3/:project_id/labels

Allows to add or update labels.

ParameterTypeDescription
project_idstringThe project_id is a unique code assigned to your project when you create it in Pingstreams
HeaderTypeDescription
Authorizationstringauthorization token. Basic Auth or JWT
Content-Typestringuse “application/json” value
FieldTypeDescription
langstringthe language identifier
dataobjectthe data object
defaultbooleanDermine if this is the default language
curl -v -X POST -H 'Content-Type: application/json' -u user@example.com:123456 -d '{"lang":"andrea", "data":{OBJECT}}' https://api.pingstreams.com/v3/5b55e806c93dde00143163dd/labels

Make a language as default for the project

Section titled “Make a language as default for the project”

PATCH https://api.pingstreams.com/v3/:project_id/labels/:lang/default

Make a language as default for the project

ParameterTypeDescription
project_idstringThe project_id is a unique code assigned to your project when you create it in Pingstreams
langstringThe language identifier
HeaderTypeDescription
Authorizationstringauthorization token. Basic Auth or JWT
Content-Typestringuse “application/json” value
curl -v -X PATCH -H 'Content-Type: application/json' -u user@example.com:123456 https://api.pingstreams.com/v3/5b55e806c93dde00143163dd/labels/EN/default

DELETE https://api.pingstreams.com/v3/:project_id/labels/:lang

Allows to delete a label by language identifier.

ParameterTypeDescription
project_idstringThe project_id is a unique code assigned to your project when you create it in Pingstreams
langstringThe lang indentifier.
HeaderTypeDescription
Authorizationstringauthorization token. Basic Auth or JWT
curl -v -X DELETE -H 'Content-Type: application/json' -u user@example.com:123456 https://api.pingstreams.com/v3/5b55e806c93dde00143163dd/labels/EN

DELETE https://api.pingstreams.com/v3/:project_id/labels/

Allows to delete all the labels of the project

ParameterTypeDescription
project_idstringThe project_id is a unique code assigned to your project when you create it in Pingstreams
HeaderTypeDescription
Authorizationstringauthorization token. Basic Auth or JWT
curl -v -X DELETE -H 'Content-Type: application/json' -u user@example.com:123456 https://api.pingstreams.com/v3/5b55e806c93dde00143163dd/labels/

GET https://api.pingstreams.com/v3/:project_id/labels/default

ParameterTypeDescription
project_idstringthe Project Id is a unique code assigned to your project when you create it in Pingstreams.
HeaderTypeDescription
Authorizationstringauthorization token. Basic Auth or JWT
curl -v -X GET -H 'Content-Type: application/json' -u user@example.com:123456 https://api.pingstreams.com/v3/5b55e806c93dde00143163dd/labels/default

Get the standard pre-translated label by language id

Section titled “Get the standard pre-translated label by language id”

GET https://api.pingstreams.com/v3/:project_id/labels/default/lang

ParameterTypeDescription
project_idstringthe Project Id is a unique code assigned to your project when you create it in Pingstreams.
HeaderTypeDescription
Authorizationstringauthorization token. Basic Auth or JWT
curl -v -X GET -H 'Content-Type: application/json' -u user@example.com:123456 https://api.pingstreams.com/v3/5b55e806c93dde00143163dd/labels/default/EN

Create a label clone from a pre-traslated language

Section titled “Create a label clone from a pre-traslated language”

POST https://api.pingstreams.com/v3/:project_id/labels/default/clone

ParameterTypeDescription
project_idstringThe project_id is a unique code assigned to your project when you create it in Pingstreams
HeaderTypeDescription
Authorizationstringauthorization token. Basic Auth or JWT
Content-Typestringuse “application/json” value
FieldTypeDescription
langstringthe language identifier
curl -v -X POST -H 'Content-Type: application/json' -u user@example.com:123456 https://api.pingstreams.com/v3/5b55e806c93dde00143163dd/labels/default/clone