Desk Platform API v1
Desk Platform API
Desk Platform API
Version 1

Translation

Copy link

The Translation feature enables AI-powered translation of agents' messages into the customer's preferred language and vice versa. This facilitates seamless communication between agents and customers who speak different languages.


Actions

Copy link
  • API endpoints are relative to the base URL allocated to your application. In this page, the /customers endpoint refers to https://desk-api-{application_id}.sendbird.com/platform/v1/customers.

Note: If you want to know your application ID, sign in to your dashboard, go to the Settings > Application > General, and then check the Application ID.

  • It's recommended that the parameter values in API URLs be urlencoded, such as {ticket_id}.

List of actions

Copy link
ActionHTTP request

Update the customer's language and country preference

PATCH /{id}
Updates the language or country setting of the customer.

Note: You can create a customer account with language value by following the steps in our guide on Create a customer.


Supported languages and countries

Copy link

The following list shows the language and country codes supported by Sendbird Desk at this moment.

LanguageCountry
AVAILABLE_TRANSLATION_LANGUAGE_SET = (
    "ar",     # Arabic
    "az",     # Azerbaijani
    "cs",     # Czech
    "da",     # Danish
    "de",     # German
    "el",     # Greek
    "en",     # English
    "es",     # Spanish
    "fi",     # Finnish
    "fil",    # Filipino
    "fr",     # French
    "he",     # Hebrew
    "hi",     # Hindi
    "hr",     # Croatian
    "hu",     # Hungarian
    "id",     # Indonesian
    "it",     # Italian
    "ja",     # Japanese
    "ko",     # Korean
    "ms",     # Malay
    "nb",     # Norwegian Bokmål
    "nl",     # Dutch
    "pl",     # Polish
    "pt",     # Portuguese
    "ro",     # Romanian
    "ru",     # Russian
    "sv",     # Swedish
    "th",     # Thai
    "tr",     # Turkish
    "uk",     # Ukrainian
    "vi",     # Vietnamese
    "zh-cn",  # Chinese (Simplified)
    "zh-tw",  # Chinese (Traditional)
)

Create a customer with language and country preference

Copy link

Refer to our guide on creating a customer to set the preferred language and country for customers. The AI translation feature uses these preferences to determine the appropriate translation or localization.


Update the customer's language and country preference

Copy link

Updates the language or country setting of a customer.

HTTP request

Copy link
PATCH https://desk-api-{application_id}.sendbird.com/platform/v1/customers/{id}

Parameters

Copy link
RequiredTypeDescription

id

string

Specifies the unique ID of a customer.

Request body example

Copy link
RequiredTypeDescription

language

string

Specifies the language preference of the customer. This should be a two-letter code in IETF BCP 47 format.

country

string

Specifies the country preference of the customer. This should be a two-letter country code in ISO 3166-1 alpha-2 format.

{
    "language": "fr",
    "country": "CH"
}   

Response

Copy link

If successful, this action returns data export details in the response body like the following:

{
"id": 231,
"sendbird_id": "kathkath",
"channel_type": "SENDBIRD",
"project": 12,
"created_at": "2019-08-24T14:15:22Z",
"display_name": "kathy",
"photo_thumbnail_url": "https://sendbird.com/main/img/profiles/leave_vacation.png",
"custom_fields": [],
"language": "fr",
"country": "CH"
}