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 preference

PATCH /customers/{id}
Updates the language 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

Copy link

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

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 preference

Copy link

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


Update the customer's language preference

Copy link

Updates the languagesetting 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.

{
    "language": "fr"
}   

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"
}