PUT
/
api
/
v1
/
language_groups
import os
import syllable_sdk
from syllable_sdk import SyllableSDK


with SyllableSDK(
    api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:

    res = ss_client.language_groups.update(request={
        "name": "Call Center 1 Languages",
        "description": "Languages spoken by operators at Call Center 1",
        "language_configs": [
            {
                "language_code": syllable_sdk.LanguageCode.EN_US,
                "voice_provider": syllable_sdk.TtsProvider.OPEN_AI,
                "voice_display_name": syllable_sdk.AgentVoiceDisplayName.ALLOY,
                "dtmf_code": 1,
            },
            {
                "language_code": syllable_sdk.LanguageCode.ES_US,
                "voice_provider": syllable_sdk.TtsProvider.GOOGLE,
                "voice_display_name": syllable_sdk.AgentVoiceDisplayName.ALEJANDRO,
                "dtmf_code": 1,
            },
        ],
        "skip_current_language_in_message": True,
        "id": 1,
        "edit_comments": "Added Spanish support.",
    })

    # Handle response
    print(res)
{
  "name": "Call Center 1 Languages",
  "description": "Languages spoken by operators at Call Center 1",
  "language_configs": [
    {
      "dtmf_code": 1,
      "language_code": "en-US",
      "voice_display_name": "Alloy",
      "voice_provider": "OpenAI"
    },
    {
      "dtmf_code": 2,
      "language_code": "es-US",
      "voice_display_name": "Alejandro",
      "voice_provider": "Google"
    }
  ],
  "skip_current_language_in_message": true,
  "id": 1,
  "edit_comments": "Added Spanish support.",
  "agents_info": [
    {
      "id": 1,
      "name": "Test Agent"
    }
  ],
  "updated_at": "2024-01-01T00:00:00Z",
  "last_updated_by": "user@mail.com"
}

Authorizations

Syllable-API-Key
string
header
required

Body

application/json

Request model to update an existing language group.

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/.

Example:
[
  {
    "dtmf_code": 1,
    "language_code": "en-US",
    "voice_display_name": "Alloy",
    "voice_provider": "OpenAI"
  },
  {
    "dtmf_code": 2,
    "language_code": "es-US",
    "voice_display_name": "Alejandro",
    "voice_provider": "Google"
  }
]
skip_current_language_in_message
boolean
required

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

Example:

true

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

Response model for language group operations. A language group is a collection of language, voice, and DTMF configuration that can be linked to an agent to define the languages and voices it supports. For more information, see Console docs.

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/.

Example:
[
  {
    "dtmf_code": 1,
    "language_code": "en-US",
    "voice_display_name": "Alloy",
    "voice_provider": "OpenAI"
  },
  {
    "dtmf_code": 2,
    "language_code": "es-US",
    "voice_display_name": "Alejandro",
    "voice_provider": "Google"
  }
]
skip_current_language_in_message
boolean
required

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

Example:

true

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.

Example:

"2024-01-01T00:00:00Z"

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.

Example:
[{ "id": 1, "name": "Test Agent" }]