PUT
/
api
/
v1
/
language_groups
import { SyllableSDK } from "syllable-sdk";

const syllableSDK = new SyllableSDK({
  apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});

async function run() {
  const result = await syllableSDK.languageGroups.update({
    name: "Call Center 1 Languages",
    description: "Languages spoken by operators at Call Center 1",
    languageConfigs: [
      {
        languageCode: "es-US",
        voiceProvider: "ElevenLabs",
        voiceDisplayName: "Will",
        dtmfCode: 1,
      },
      {
        languageCode: "es-US",
        voiceProvider: "ElevenLabs",
        voiceDisplayName: "Will",
        dtmfCode: 1,
      },
      {
        languageCode: "yue-HK",
        voiceProvider: "Google",
        voiceDisplayName: "George",
        dtmfCode: 1,
      },
    ],
    skipCurrentLanguageInMessage: true,
    id: 1,
    editComments: "Added Spanish support.",
  });

  // Handle the result
  console.log(result);
}

run();
{
  "name": "Call Center 1 Languages",
  "description": "Languages spoken by operators at Call Center 1",
  "language_configs": [
    {
      "language_code": "en-US",
      "voice_provider": "OpenAI",
      "voice_display_name": "Alloy",
      "dtmf_code": 1
    }
  ],
  "skip_current_language_in_message": true,
  "id": 1,
  "edit_comments": "Added Spanish support.",
  "agents_info": [
    {
      "id": 1,
      "name": "Test Agent"
    }
  ],
  "updated_at": "2023-11-07T05:31:56Z",
  "last_updated_by": "user@mail.com"
}

Authorizations

Syllable-API-Key
string
header
required

Body

application/json
name
string
required

The name of the language group.

Example:

"Call Center 1 Languages"

language_configs
object[]
required

Voice and DTMF configurations for each language in the group.

Voice and DTMF configurations for a language in a language group. List of available voices and their supported languages can be fetched from GET /agents/voices/available/.

skip_current_language_in_message
boolean
required

Whether a message using the language group to generate a language DTMF menu should skip the agent's current language in the menu.

id
integer
required

The ID of the language group to update.

Example:

1

description
string | null

Description of the language group.

Example:

"Languages spoken by operators at Call Center 1"

edit_comments
string | null

Comments for the most recent edit to the language group.

Example:

"Added Spanish support."

Response

200
application/json
Successful Response
name
string
required

The name of the language group.

Example:

"Call Center 1 Languages"

language_configs
object[]
required

Voice and DTMF configurations for each language in the group.

Voice and DTMF configurations for a language in a language group. List of available voices and their supported languages can be fetched from GET /agents/voices/available/.

skip_current_language_in_message
boolean
required

Whether a message using the language group to generate a language DTMF menu should skip the agent's current language in the menu.

id
integer
required

The ID of the language group to update.

Example:

1

updated_at
string
required

Timestamp of the last update to the language group.

last_updated_by
string
required

Email of the user who last updated the language group.

Example:

"user@mail.com"

description
string | null

Description of the language group.

Example:

"Languages spoken by operators at Call Center 1"

edit_comments
string | null

Comments for the most recent edit to the language group.

Example:

"Added Spanish support."

agents_info
object[] | null

IDs and names of the agents linked to the language group

Information about an agent linked to a language group.