diff --git a/.fern/metadata.json b/.fern/metadata.json
index 107bb4dc..902ce180 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -1,5 +1,5 @@
{
- "cliVersion": "2.15.0",
+ "cliVersion": "3.24.4",
"generatorName": "fernapi/fern-python-sdk",
"generatorVersion": "4.42.0",
"generatorConfig": {
diff --git a/poetry.lock b/poetry.lock
index 50551f53..4d9bb309 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -38,13 +38,13 @@ trio = ["trio (>=0.26.1)"]
[[package]]
name = "certifi"
-version = "2025.11.12"
+version = "2026.1.4"
description = "Python package for providing Mozilla's CA Bundle."
optional = false
python-versions = ">=3.7"
files = [
- {file = "certifi-2025.11.12-py3-none-any.whl", hash = "sha256:97de8790030bbd5c2d96b7ec782fc2f7820ef8dba6db909ccf95449f2d062d4b"},
- {file = "certifi-2025.11.12.tar.gz", hash = "sha256:d8ab5478f2ecd78af242878415affce761ca6bc54a22a27e026d7c25357c3316"},
+ {file = "certifi-2026.1.4-py3-none-any.whl", hash = "sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c"},
+ {file = "certifi-2026.1.4.tar.gz", hash = "sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120"},
]
[[package]]
diff --git a/pyproject.toml b/pyproject.toml
index 87d88052..d80fe7ec 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ dynamic = ["version"]
[tool.poetry]
name = "elevenlabs"
-version = "v2.27.0"
+version = "v2.28.0"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index b10ed275..b8782445 100644
--- a/reference.md
+++ b/reference.md
@@ -252,7 +252,7 @@ client.history.get(
-
-**history_item_id:** `str` — ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items.
+**history_item_id:** `str` — ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/list) endpoint to retrieve a list of history items.
@@ -322,7 +322,7 @@ client.history.delete(
-
-**history_item_id:** `str` — ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items.
+**history_item_id:** `str` — ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/list) endpoint to retrieve a list of history items.
@@ -392,7 +392,7 @@ client.history.get_audio(
-
-**history_item_id:** `str` — ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items.
+**history_item_id:** `str` — ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/list) endpoint to retrieve a list of history items.
@@ -2502,6 +2502,14 @@ client.text_to_voice.create_previews(
-
+**should_enhance:** `typing.Optional[bool]` — Whether to enhance the voice description using AI to add more detail and improve voice generation quality. When enabled, the system will automatically expand simple prompts into more detailed voice descriptions. Defaults to False
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -2741,6 +2749,14 @@ client.text_to_voice.design(
-
+**should_enhance:** `typing.Optional[bool]` — Whether to enhance the voice description using AI to add more detail and improve voice generation quality. When enabled, the system will automatically expand simple prompts into more detailed voice descriptions. Defaults to False
+
+
+
+
+
+-
+
**remixing_session_id:** `typing.Optional[str]` — The remixing session id.
@@ -3184,7 +3200,7 @@ client.voices.search(
-
-**voice_type:** `typing.Optional[str]` — Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to all but 'default'.
+**voice_type:** `typing.Optional[str]` — Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default', 'saved'. 'non-default' is equal to all but 'default'. 'saved' is equal to non-default, but includes default voices if they have been added to a collection.
@@ -4005,9 +4021,9 @@ client.studio.create_podcast(
Output quality of the generated audio. Must be one of:
standard - standard output format, 128kbps with 44.1kHz sample rate.
-high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side. Using this setting increases the credit cost by 20%.
-ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side. Using this setting increases the credit cost by 50%.
-ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format. Using this setting increases the credit cost by 100%.
+high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side.
+ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side.
+ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format.
@@ -6759,7 +6775,7 @@ client.music.compose()
-
-**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
@@ -6891,7 +6907,7 @@ client.music.compose_detailed()
-
-**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
@@ -7023,7 +7039,7 @@ client.music.stream()
-
-**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+**music_length_ms:** `typing.Optional[int]` — The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
@@ -7401,6 +7417,14 @@ client.conversational_ai.conversations.list(
-
+**main_languages:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter conversations by detected main language (language code).
+
+
+
+
+
+-
+
**page_size:** `typing.Optional[int]` — How many conversations to return at maximum. Can not exceed 100, defaults to 30.
@@ -7776,6 +7800,121 @@ client.conversational_ai.twilio.register_call(
+
+
+
+
+## ConversationalAi Whatsapp
+client.conversational_ai.whatsapp.outbound_call(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Make an outbound call via WhatsApp
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from elevenlabs import ElevenLabs
+
+client = ElevenLabs(
+ api_key="YOUR_API_KEY",
+)
+client.conversational_ai.whatsapp.outbound_call(
+ whatsapp_phone_number_id="whatsapp_phone_number_id",
+ whatsapp_user_id="whatsapp_user_id",
+ whatsapp_call_permission_request_template_name="whatsapp_call_permission_request_template_name",
+ whatsapp_call_permission_request_template_language_code="whatsapp_call_permission_request_template_language_code",
+ agent_id="agent_id",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**whatsapp_phone_number_id:** `str`
+
+
+
+
+
+-
+
+**whatsapp_user_id:** `str`
+
+
+
+
+
+-
+
+**whatsapp_call_permission_request_template_name:** `str`
+
+
+
+
+
+-
+
+**whatsapp_call_permission_request_template_language_code:** `str`
+
+
+
+
+
+-
+
+**agent_id:** `str`
+
+
+
+
+
+-
+
+**conversation_initiation_client_data:** `typing.Optional[ConversationInitiationClientDataRequestInput]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
@@ -8121,6 +8260,14 @@ client.conversational_ai.agents.update(
-
+**version_description:** `typing.Optional[str]` — Description for this version when publishing changes (only applicable for versioned agents)
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -8169,6 +8316,7 @@ client.conversational_ai.agents.list(
page_size=1,
search="search",
archived=True,
+ show_only_owned_agents=True,
sort_direction="asc",
sort_by="name",
cursor="cursor",
@@ -8212,6 +8360,14 @@ client.conversational_ai.agents.list(
-
+**show_only_owned_agents:** `typing.Optional[bool]` — If set to true, the endpoint will omit any agents that were shared with you by someone else and include only the ones you own
+
+
+
+
+
+-
+
**sort_direction:** `typing.Optional[SortDirection]` — The direction to sort the results
@@ -9608,6 +9764,14 @@ client.conversational_ai.phone_numbers.update(
-
+**label:** `typing.Optional[str]`
+
+
+
+
+
+-
+
**inbound_trunk_config:** `typing.Optional[InboundSipTrunkConfigRequestModel]`
@@ -10983,6 +11147,14 @@ client.conversational_ai.batch_calls.create(
-
+**whatsapp_params:** `typing.Optional[BatchCallWhatsAppParams]`
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -11774,6 +11946,381 @@ client.conversational_ai.mcp_servers.update(
-
+**disable_compression:** `typing.Optional[bool]` — Whether to disable HTTP compression for this MCP server
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## ConversationalAi WhatsappAccounts
+client.conversational_ai.whatsapp_accounts.list()
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+List all WhatsApp accounts
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from elevenlabs import ElevenLabs
+
+client = ElevenLabs(
+ api_key="YOUR_API_KEY",
+)
+client.conversational_ai.whatsapp_accounts.list()
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.conversational_ai.whatsapp_accounts.import_(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Import a WhatsApp account
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from elevenlabs import ElevenLabs
+
+client = ElevenLabs(
+ api_key="YOUR_API_KEY",
+)
+client.conversational_ai.whatsapp_accounts.import_(
+ business_account_id="business_account_id",
+ phone_number_id="phone_number_id",
+ token_code="token_code",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**business_account_id:** `str`
+
+
+
+
+
+-
+
+**phone_number_id:** `str`
+
+
+
+
+
+-
+
+**token_code:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.conversational_ai.whatsapp_accounts.get(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Get a WhatsApp account
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from elevenlabs import ElevenLabs
+
+client = ElevenLabs(
+ api_key="YOUR_API_KEY",
+)
+client.conversational_ai.whatsapp_accounts.get(
+ phone_number_id="phone_number_id",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**phone_number_id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.conversational_ai.whatsapp_accounts.delete(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Delete a WhatsApp account
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from elevenlabs import ElevenLabs
+
+client = ElevenLabs(
+ api_key="YOUR_API_KEY",
+)
+client.conversational_ai.whatsapp_accounts.delete(
+ phone_number_id="phone_number_id",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**phone_number_id:** `str`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.conversational_ai.whatsapp_accounts.update(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Update a WhatsApp account
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from elevenlabs import ElevenLabs
+
+client = ElevenLabs(
+ api_key="YOUR_API_KEY",
+)
+client.conversational_ai.whatsapp_accounts.update(
+ phone_number_id="phone_number_id",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**phone_number_id:** `str`
+
+
+
+
+
+-
+
+**assigned_agent_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -13065,8 +13612,9 @@ client = ElevenLabs(
)
client.conversational_ai.knowledge_base.documents.get_agents(
documentation_id="21m00Tcm4TlvDq8ikWAM",
- cursor="cursor",
+ dependent_type="direct",
page_size=1,
+ cursor="cursor",
)
```
@@ -13091,7 +13639,7 @@ client.conversational_ai.knowledge_base.documents.get_agents(
-
-**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response.
+**dependent_type:** `typing.Optional[KnowledgeBaseDependentType]` — Type of dependent agents to return.
@@ -13107,6 +13655,14 @@ client.conversational_ai.knowledge_base.documents.get_agents(
-
+**cursor:** `typing.Optional[str]` — Used for fetching next page. Cursor is returned in the response.
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -14875,7 +15431,7 @@ client = ElevenLabs(
)
client.dubbing.resource.render(
dubbing_id="dubbing_id",
- language="original",
+ language="language",
render_type="mp4",
)
@@ -14901,7 +15457,7 @@ client.dubbing.resource.render(
-
-**language:** `ResourceRenderRequestLanguage` — The target language code to render, eg. 'es'. To render the source track use 'original'.
+**language:** `str` — The target language code to render, eg. 'es'. To render the source track use 'original'.
@@ -15853,7 +16409,7 @@ client.music.composition_plan.create(
-
-**music_length_ms:** `typing.Optional[int]` — The length of the composition plan to generate in milliseconds. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+**music_length_ms:** `typing.Optional[int]` — The length of the composition plan to generate in milliseconds. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
@@ -16739,9 +17295,9 @@ typing.Optional[core.File]` — See core.File for more documentation
Output quality of the generated audio. Must be one of:
standard - standard output format, 128kbps with 44.1kHz sample rate.
-high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side. Using this setting increases the credit cost by 20%.
-ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side. Using this setting increases the credit cost by 50%.
-ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format. Using this setting increases the credit cost by 100%.
+high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side.
+ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side.
+ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format.
diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py
index 3f0ee9b1..7a4e2436 100644
--- a/src/elevenlabs/__init__.py
+++ b/src/elevenlabs/__init__.py
@@ -858,6 +858,7 @@
GetUnitTestResponseModelDynamicVariablesValue,
GetVoicesResponse,
GetVoicesV2Response,
+ GetWhatsAppAccountResponse,
GetWorkspaceSecretsResponseModel,
GuardrailsV1Input,
GuardrailsV1Output,
@@ -867,10 +868,12 @@
HtmlExportOptions,
HttpValidationError,
ImageAvatar,
+ ImportWhatsAppAccountResponse,
InboundSipTrunkConfigRequestModel,
IntegrationType,
InvoiceResponse,
InvoiceResponseModelPaymentIntentStatus,
+ KnowledgeBaseDependentType,
KnowledgeBaseDocumentChunkResponseModel,
KnowledgeBaseDocumentMetadataResponseModel,
KnowledgeBaseDocumentType,
@@ -894,6 +897,7 @@
LibraryVoiceResponseModelCategory,
ListMcpToolsResponseModel,
ListResponseMeta,
+ ListWhatsAppAccountsResponse,
LiteralJsonSchemaProperty,
LiteralJsonSchemaPropertyConstantValue,
LiteralJsonSchemaPropertyType,
@@ -1314,6 +1318,7 @@
WebhookUsageType,
WhatsAppConversationInfo,
WhatsAppConversationInfoDirection,
+ WhatsAppOutboundCallResponse,
WidgetConfig,
WidgetConfigInputAvatar,
WidgetConfigInputAvatar_Image,
@@ -1336,6 +1341,7 @@
WidgetLanguagePresetResponse,
WidgetPlacement,
WidgetStyles,
+ WidgetTermsTranslation,
WidgetTextContents,
WordTimestamp,
WorkflowEdgeModelInput,
@@ -2460,6 +2466,7 @@
"GetUnitTestResponseModelDynamicVariablesValue": ".types",
"GetVoicesResponse": ".types",
"GetVoicesV2Response": ".types",
+ "GetWhatsAppAccountResponse": ".types",
"GetWorkspaceSecretsResponseModel": ".types",
"GuardrailsV1Input": ".types",
"GuardrailsV1Output": ".types",
@@ -2471,10 +2478,12 @@
"HtmlExportOptions": ".types",
"HttpValidationError": ".types",
"ImageAvatar": ".types",
+ "ImportWhatsAppAccountResponse": ".types",
"InboundSipTrunkConfigRequestModel": ".types",
"IntegrationType": ".types",
"InvoiceResponse": ".types",
"InvoiceResponseModelPaymentIntentStatus": ".types",
+ "KnowledgeBaseDependentType": ".types",
"KnowledgeBaseDocumentChunkResponseModel": ".types",
"KnowledgeBaseDocumentMetadataResponseModel": ".types",
"KnowledgeBaseDocumentType": ".types",
@@ -2498,6 +2507,7 @@
"LibraryVoiceResponseModelCategory": ".types",
"ListMcpToolsResponseModel": ".types",
"ListResponseMeta": ".types",
+ "ListWhatsAppAccountsResponse": ".types",
"LiteralJsonSchemaProperty": ".types",
"LiteralJsonSchemaPropertyConstantValue": ".types",
"LiteralJsonSchemaPropertyType": ".types",
@@ -2955,6 +2965,7 @@
"WebhookUsageType": ".types",
"WhatsAppConversationInfo": ".types",
"WhatsAppConversationInfoDirection": ".types",
+ "WhatsAppOutboundCallResponse": ".types",
"WidgetConfig": ".types",
"WidgetConfigInputAvatar": ".types",
"WidgetConfigInputAvatar_Image": ".types",
@@ -2977,6 +2988,7 @@
"WidgetLanguagePresetResponse": ".types",
"WidgetPlacement": ".types",
"WidgetStyles": ".types",
+ "WidgetTermsTranslation": ".types",
"WidgetTextContents": ".types",
"WordTimestamp": ".types",
"WorkflowEdgeModelInput": ".types",
@@ -4029,6 +4041,7 @@ def __dir__():
"GetUnitTestResponseModelDynamicVariablesValue",
"GetVoicesResponse",
"GetVoicesV2Response",
+ "GetWhatsAppAccountResponse",
"GetWorkspaceSecretsResponseModel",
"GuardrailsV1Input",
"GuardrailsV1Output",
@@ -4040,10 +4053,12 @@ def __dir__():
"HtmlExportOptions",
"HttpValidationError",
"ImageAvatar",
+ "ImportWhatsAppAccountResponse",
"InboundSipTrunkConfigRequestModel",
"IntegrationType",
"InvoiceResponse",
"InvoiceResponseModelPaymentIntentStatus",
+ "KnowledgeBaseDependentType",
"KnowledgeBaseDocumentChunkResponseModel",
"KnowledgeBaseDocumentMetadataResponseModel",
"KnowledgeBaseDocumentType",
@@ -4067,6 +4082,7 @@ def __dir__():
"LibraryVoiceResponseModelCategory",
"ListMcpToolsResponseModel",
"ListResponseMeta",
+ "ListWhatsAppAccountsResponse",
"LiteralJsonSchemaProperty",
"LiteralJsonSchemaPropertyConstantValue",
"LiteralJsonSchemaPropertyType",
@@ -4524,6 +4540,7 @@ def __dir__():
"WebhookUsageType",
"WhatsAppConversationInfo",
"WhatsAppConversationInfoDirection",
+ "WhatsAppOutboundCallResponse",
"WidgetConfig",
"WidgetConfigInputAvatar",
"WidgetConfigInputAvatar_Image",
@@ -4546,6 +4563,7 @@ def __dir__():
"WidgetLanguagePresetResponse",
"WidgetPlacement",
"WidgetStyles",
+ "WidgetTermsTranslation",
"WidgetTextContents",
"WordTimestamp",
"WorkflowEdgeModelInput",
diff --git a/src/elevenlabs/conversational_ai/__init__.py b/src/elevenlabs/conversational_ai/__init__.py
index ebc914fb..e555eb97 100644
--- a/src/elevenlabs/conversational_ai/__init__.py
+++ b/src/elevenlabs/conversational_ai/__init__.py
@@ -22,6 +22,8 @@
tests,
tools,
twilio,
+ whatsapp,
+ whatsapp_accounts,
)
from .conversations import ConversationsListRequestSummaryMode
from .knowledge_base import (
@@ -82,6 +84,8 @@
"tests": ".tests",
"tools": ".tools",
"twilio": ".twilio",
+ "whatsapp": ".whatsapp",
+ "whatsapp_accounts": ".whatsapp_accounts",
}
@@ -142,4 +146,6 @@ def __dir__():
"tests",
"tools",
"twilio",
+ "whatsapp",
+ "whatsapp_accounts",
]
diff --git a/src/elevenlabs/conversational_ai/agents/client.py b/src/elevenlabs/conversational_ai/agents/client.py
index 71ea6a73..de1c3553 100644
--- a/src/elevenlabs/conversational_ai/agents/client.py
+++ b/src/elevenlabs/conversational_ai/agents/client.py
@@ -180,6 +180,7 @@ def update(
workflow: typing.Optional[AgentWorkflowRequestModel] = OMIT,
name: typing.Optional[str] = OMIT,
tags: typing.Optional[typing.Sequence[str]] = OMIT,
+ version_description: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> GetAgentResponseModel:
"""
@@ -205,6 +206,9 @@ def update(
tags : typing.Optional[typing.Sequence[str]]
Tags to help classify and filter the agent
+ version_description : typing.Optional[str]
+ Description for this version when publishing changes (only applicable for versioned agents)
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -231,6 +235,7 @@ def update(
workflow=workflow,
name=name,
tags=tags,
+ version_description=version_description,
request_options=request_options,
)
return _response.data
@@ -241,6 +246,7 @@ def list(
page_size: typing.Optional[int] = None,
search: typing.Optional[str] = None,
archived: typing.Optional[bool] = None,
+ show_only_owned_agents: typing.Optional[bool] = None,
sort_direction: typing.Optional[SortDirection] = None,
sort_by: typing.Optional[AgentSortBy] = None,
cursor: typing.Optional[str] = None,
@@ -260,6 +266,9 @@ def list(
archived : typing.Optional[bool]
Filter agents by archived status
+ show_only_owned_agents : typing.Optional[bool]
+ If set to true, the endpoint will omit any agents that were shared with you by someone else and include only the ones you own
+
sort_direction : typing.Optional[SortDirection]
The direction to sort the results
@@ -288,6 +297,7 @@ def list(
page_size=1,
search="search",
archived=True,
+ show_only_owned_agents=True,
sort_direction="asc",
sort_by="name",
cursor="cursor",
@@ -297,6 +307,7 @@ def list(
page_size=page_size,
search=search,
archived=archived,
+ show_only_owned_agents=show_only_owned_agents,
sort_direction=sort_direction,
sort_by=sort_by,
cursor=cursor,
@@ -740,6 +751,7 @@ async def update(
workflow: typing.Optional[AgentWorkflowRequestModel] = OMIT,
name: typing.Optional[str] = OMIT,
tags: typing.Optional[typing.Sequence[str]] = OMIT,
+ version_description: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> GetAgentResponseModel:
"""
@@ -765,6 +777,9 @@ async def update(
tags : typing.Optional[typing.Sequence[str]]
Tags to help classify and filter the agent
+ version_description : typing.Optional[str]
+ Description for this version when publishing changes (only applicable for versioned agents)
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -799,6 +814,7 @@ async def main() -> None:
workflow=workflow,
name=name,
tags=tags,
+ version_description=version_description,
request_options=request_options,
)
return _response.data
@@ -809,6 +825,7 @@ async def list(
page_size: typing.Optional[int] = None,
search: typing.Optional[str] = None,
archived: typing.Optional[bool] = None,
+ show_only_owned_agents: typing.Optional[bool] = None,
sort_direction: typing.Optional[SortDirection] = None,
sort_by: typing.Optional[AgentSortBy] = None,
cursor: typing.Optional[str] = None,
@@ -828,6 +845,9 @@ async def list(
archived : typing.Optional[bool]
Filter agents by archived status
+ show_only_owned_agents : typing.Optional[bool]
+ If set to true, the endpoint will omit any agents that were shared with you by someone else and include only the ones you own
+
sort_direction : typing.Optional[SortDirection]
The direction to sort the results
@@ -861,6 +881,7 @@ async def main() -> None:
page_size=1,
search="search",
archived=True,
+ show_only_owned_agents=True,
sort_direction="asc",
sort_by="name",
cursor="cursor",
@@ -873,6 +894,7 @@ async def main() -> None:
page_size=page_size,
search=search,
archived=archived,
+ show_only_owned_agents=show_only_owned_agents,
sort_direction=sort_direction,
sort_by=sort_by,
cursor=cursor,
diff --git a/src/elevenlabs/conversational_ai/agents/raw_client.py b/src/elevenlabs/conversational_ai/agents/raw_client.py
index cb3f36b9..fc45ec99 100644
--- a/src/elevenlabs/conversational_ai/agents/raw_client.py
+++ b/src/elevenlabs/conversational_ai/agents/raw_client.py
@@ -220,6 +220,7 @@ def update(
workflow: typing.Optional[AgentWorkflowRequestModel] = OMIT,
name: typing.Optional[str] = OMIT,
tags: typing.Optional[typing.Sequence[str]] = OMIT,
+ version_description: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[GetAgentResponseModel]:
"""
@@ -245,6 +246,9 @@ def update(
tags : typing.Optional[typing.Sequence[str]]
Tags to help classify and filter the agent
+ version_description : typing.Optional[str]
+ Description for this version when publishing changes (only applicable for versioned agents)
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -268,6 +272,7 @@ def update(
),
"name": name,
"tags": tags,
+ "version_description": version_description,
},
headers={
"content-type": "application/json",
@@ -307,6 +312,7 @@ def list(
page_size: typing.Optional[int] = None,
search: typing.Optional[str] = None,
archived: typing.Optional[bool] = None,
+ show_only_owned_agents: typing.Optional[bool] = None,
sort_direction: typing.Optional[SortDirection] = None,
sort_by: typing.Optional[AgentSortBy] = None,
cursor: typing.Optional[str] = None,
@@ -326,6 +332,9 @@ def list(
archived : typing.Optional[bool]
Filter agents by archived status
+ show_only_owned_agents : typing.Optional[bool]
+ If set to true, the endpoint will omit any agents that were shared with you by someone else and include only the ones you own
+
sort_direction : typing.Optional[SortDirection]
The direction to sort the results
@@ -350,6 +359,7 @@ def list(
"page_size": page_size,
"search": search,
"archived": archived,
+ "show_only_owned_agents": show_only_owned_agents,
"sort_direction": sort_direction,
"sort_by": sort_by,
"cursor": cursor,
@@ -870,6 +880,7 @@ async def update(
workflow: typing.Optional[AgentWorkflowRequestModel] = OMIT,
name: typing.Optional[str] = OMIT,
tags: typing.Optional[typing.Sequence[str]] = OMIT,
+ version_description: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[GetAgentResponseModel]:
"""
@@ -895,6 +906,9 @@ async def update(
tags : typing.Optional[typing.Sequence[str]]
Tags to help classify and filter the agent
+ version_description : typing.Optional[str]
+ Description for this version when publishing changes (only applicable for versioned agents)
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -918,6 +932,7 @@ async def update(
),
"name": name,
"tags": tags,
+ "version_description": version_description,
},
headers={
"content-type": "application/json",
@@ -957,6 +972,7 @@ async def list(
page_size: typing.Optional[int] = None,
search: typing.Optional[str] = None,
archived: typing.Optional[bool] = None,
+ show_only_owned_agents: typing.Optional[bool] = None,
sort_direction: typing.Optional[SortDirection] = None,
sort_by: typing.Optional[AgentSortBy] = None,
cursor: typing.Optional[str] = None,
@@ -976,6 +992,9 @@ async def list(
archived : typing.Optional[bool]
Filter agents by archived status
+ show_only_owned_agents : typing.Optional[bool]
+ If set to true, the endpoint will omit any agents that were shared with you by someone else and include only the ones you own
+
sort_direction : typing.Optional[SortDirection]
The direction to sort the results
@@ -1000,6 +1019,7 @@ async def list(
"page_size": page_size,
"search": search,
"archived": archived,
+ "show_only_owned_agents": show_only_owned_agents,
"sort_direction": sort_direction,
"sort_by": sort_by,
"cursor": cursor,
diff --git a/src/elevenlabs/conversational_ai/batch_calls/client.py b/src/elevenlabs/conversational_ai/batch_calls/client.py
index cb7345b9..779268d6 100644
--- a/src/elevenlabs/conversational_ai/batch_calls/client.py
+++ b/src/elevenlabs/conversational_ai/batch_calls/client.py
@@ -6,6 +6,7 @@
from ...core.request_options import RequestOptions
from ...types.batch_call_detailed_response import BatchCallDetailedResponse
from ...types.batch_call_response import BatchCallResponse
+from ...types.batch_call_whats_app_params import BatchCallWhatsAppParams
from ...types.outbound_call_recipient import OutboundCallRecipient
from ...types.workspace_batch_calls_response import WorkspaceBatchCallsResponse
from .raw_client import AsyncRawBatchCallsClient, RawBatchCallsClient
@@ -37,6 +38,7 @@ def create(
recipients: typing.Sequence[OutboundCallRecipient],
scheduled_time_unix: typing.Optional[int] = OMIT,
agent_phone_number_id: typing.Optional[str] = OMIT,
+ whatsapp_params: typing.Optional[BatchCallWhatsAppParams] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BatchCallResponse:
"""
@@ -54,6 +56,8 @@ def create(
agent_phone_number_id : typing.Optional[str]
+ whatsapp_params : typing.Optional[BatchCallWhatsAppParams]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -81,6 +85,7 @@ def create(
recipients=recipients,
scheduled_time_unix=scheduled_time_unix,
agent_phone_number_id=agent_phone_number_id,
+ whatsapp_params=whatsapp_params,
request_options=request_options,
)
return _response.data
@@ -240,6 +245,7 @@ async def create(
recipients: typing.Sequence[OutboundCallRecipient],
scheduled_time_unix: typing.Optional[int] = OMIT,
agent_phone_number_id: typing.Optional[str] = OMIT,
+ whatsapp_params: typing.Optional[BatchCallWhatsAppParams] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BatchCallResponse:
"""
@@ -257,6 +263,8 @@ async def create(
agent_phone_number_id : typing.Optional[str]
+ whatsapp_params : typing.Optional[BatchCallWhatsAppParams]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -292,6 +300,7 @@ async def main() -> None:
recipients=recipients,
scheduled_time_unix=scheduled_time_unix,
agent_phone_number_id=agent_phone_number_id,
+ whatsapp_params=whatsapp_params,
request_options=request_options,
)
return _response.data
diff --git a/src/elevenlabs/conversational_ai/batch_calls/raw_client.py b/src/elevenlabs/conversational_ai/batch_calls/raw_client.py
index 50710f1d..137625d5 100644
--- a/src/elevenlabs/conversational_ai/batch_calls/raw_client.py
+++ b/src/elevenlabs/conversational_ai/batch_calls/raw_client.py
@@ -13,6 +13,7 @@
from ...errors.unprocessable_entity_error import UnprocessableEntityError
from ...types.batch_call_detailed_response import BatchCallDetailedResponse
from ...types.batch_call_response import BatchCallResponse
+from ...types.batch_call_whats_app_params import BatchCallWhatsAppParams
from ...types.http_validation_error import HttpValidationError
from ...types.outbound_call_recipient import OutboundCallRecipient
from ...types.workspace_batch_calls_response import WorkspaceBatchCallsResponse
@@ -33,6 +34,7 @@ def create(
recipients: typing.Sequence[OutboundCallRecipient],
scheduled_time_unix: typing.Optional[int] = OMIT,
agent_phone_number_id: typing.Optional[str] = OMIT,
+ whatsapp_params: typing.Optional[BatchCallWhatsAppParams] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[BatchCallResponse]:
"""
@@ -50,6 +52,8 @@ def create(
agent_phone_number_id : typing.Optional[str]
+ whatsapp_params : typing.Optional[BatchCallWhatsAppParams]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -69,6 +73,9 @@ def create(
),
"scheduled_time_unix": scheduled_time_unix,
"agent_phone_number_id": agent_phone_number_id,
+ "whatsapp_params": convert_and_respect_annotation_metadata(
+ object_=whatsapp_params, annotation=BatchCallWhatsAppParams, direction="write"
+ ),
},
headers={
"content-type": "application/json",
@@ -321,6 +328,7 @@ async def create(
recipients: typing.Sequence[OutboundCallRecipient],
scheduled_time_unix: typing.Optional[int] = OMIT,
agent_phone_number_id: typing.Optional[str] = OMIT,
+ whatsapp_params: typing.Optional[BatchCallWhatsAppParams] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[BatchCallResponse]:
"""
@@ -338,6 +346,8 @@ async def create(
agent_phone_number_id : typing.Optional[str]
+ whatsapp_params : typing.Optional[BatchCallWhatsAppParams]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -357,6 +367,9 @@ async def create(
),
"scheduled_time_unix": scheduled_time_unix,
"agent_phone_number_id": agent_phone_number_id,
+ "whatsapp_params": convert_and_respect_annotation_metadata(
+ object_=whatsapp_params, annotation=BatchCallWhatsAppParams, direction="write"
+ ),
},
headers={
"content-type": "application/json",
diff --git a/src/elevenlabs/conversational_ai/client.py b/src/elevenlabs/conversational_ai/client.py
index daaa359e..8f4ef5d9 100644
--- a/src/elevenlabs/conversational_ai/client.py
+++ b/src/elevenlabs/conversational_ai/client.py
@@ -29,6 +29,8 @@
from .tests.client import AsyncTestsClient, TestsClient
from .tools.client import AsyncToolsClient, ToolsClient
from .twilio.client import AsyncTwilioClient, TwilioClient
+ from .whatsapp.client import AsyncWhatsappClient, WhatsappClient
+ from .whatsapp_accounts.client import AsyncWhatsappAccountsClient, WhatsappAccountsClient
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -39,6 +41,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper):
self._client_wrapper = client_wrapper
self._conversations: typing.Optional[ConversationsClient] = None
self._twilio: typing.Optional[TwilioClient] = None
+ self._whatsapp: typing.Optional[WhatsappClient] = None
self._agents: typing.Optional[AgentsClient] = None
self._tests: typing.Optional[TestsClient] = None
self._phone_numbers: typing.Optional[PhoneNumbersClient] = None
@@ -50,6 +53,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper):
self._batch_calls: typing.Optional[BatchCallsClient] = None
self._sip_trunk: typing.Optional[SipTrunkClient] = None
self._mcp_servers: typing.Optional[McpServersClient] = None
+ self._whatsapp_accounts: typing.Optional[WhatsappAccountsClient] = None
self._analytics: typing.Optional[AnalyticsClient] = None
self._dashboard: typing.Optional[DashboardClient] = None
@@ -229,6 +233,14 @@ def twilio(self):
self._twilio = TwilioClient(client_wrapper=self._client_wrapper)
return self._twilio
+ @property
+ def whatsapp(self):
+ if self._whatsapp is None:
+ from .whatsapp.client import WhatsappClient # noqa: E402
+
+ self._whatsapp = WhatsappClient(client_wrapper=self._client_wrapper)
+ return self._whatsapp
+
@property
def agents(self):
if self._agents is None:
@@ -317,6 +329,14 @@ def mcp_servers(self):
self._mcp_servers = McpServersClient(client_wrapper=self._client_wrapper)
return self._mcp_servers
+ @property
+ def whatsapp_accounts(self):
+ if self._whatsapp_accounts is None:
+ from .whatsapp_accounts.client import WhatsappAccountsClient # noqa: E402
+
+ self._whatsapp_accounts = WhatsappAccountsClient(client_wrapper=self._client_wrapper)
+ return self._whatsapp_accounts
+
@property
def analytics(self):
if self._analytics is None:
@@ -340,6 +360,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._client_wrapper = client_wrapper
self._conversations: typing.Optional[AsyncConversationsClient] = None
self._twilio: typing.Optional[AsyncTwilioClient] = None
+ self._whatsapp: typing.Optional[AsyncWhatsappClient] = None
self._agents: typing.Optional[AsyncAgentsClient] = None
self._tests: typing.Optional[AsyncTestsClient] = None
self._phone_numbers: typing.Optional[AsyncPhoneNumbersClient] = None
@@ -351,6 +372,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._batch_calls: typing.Optional[AsyncBatchCallsClient] = None
self._sip_trunk: typing.Optional[AsyncSipTrunkClient] = None
self._mcp_servers: typing.Optional[AsyncMcpServersClient] = None
+ self._whatsapp_accounts: typing.Optional[AsyncWhatsappAccountsClient] = None
self._analytics: typing.Optional[AsyncAnalyticsClient] = None
self._dashboard: typing.Optional[AsyncDashboardClient] = None
@@ -562,6 +584,14 @@ def twilio(self):
self._twilio = AsyncTwilioClient(client_wrapper=self._client_wrapper)
return self._twilio
+ @property
+ def whatsapp(self):
+ if self._whatsapp is None:
+ from .whatsapp.client import AsyncWhatsappClient # noqa: E402
+
+ self._whatsapp = AsyncWhatsappClient(client_wrapper=self._client_wrapper)
+ return self._whatsapp
+
@property
def agents(self):
if self._agents is None:
@@ -650,6 +680,14 @@ def mcp_servers(self):
self._mcp_servers = AsyncMcpServersClient(client_wrapper=self._client_wrapper)
return self._mcp_servers
+ @property
+ def whatsapp_accounts(self):
+ if self._whatsapp_accounts is None:
+ from .whatsapp_accounts.client import AsyncWhatsappAccountsClient # noqa: E402
+
+ self._whatsapp_accounts = AsyncWhatsappAccountsClient(client_wrapper=self._client_wrapper)
+ return self._whatsapp_accounts
+
@property
def analytics(self):
if self._analytics is None:
diff --git a/src/elevenlabs/conversational_ai/conversations/client.py b/src/elevenlabs/conversational_ai/conversations/client.py
index 7774a797..dfa6c5a0 100644
--- a/src/elevenlabs/conversational_ai/conversations/client.py
+++ b/src/elevenlabs/conversational_ai/conversations/client.py
@@ -140,6 +140,7 @@ def list(
evaluation_params: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
data_collection_params: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
tool_names: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
+ main_languages: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
page_size: typing.Optional[int] = None,
summary_mode: typing.Optional[ConversationsListRequestSummaryMode] = None,
search: typing.Optional[str] = None,
@@ -192,6 +193,9 @@ def list(
tool_names : typing.Optional[typing.Union[str, typing.Sequence[str]]]
Filter conversations by tool names used during the call.
+ main_languages : typing.Optional[typing.Union[str, typing.Sequence[str]]]
+ Filter conversations by detected main language (language code).
+
page_size : typing.Optional[int]
How many conversations to return at maximum. Can not exceed 100, defaults to 30.
@@ -248,6 +252,7 @@ def list(
evaluation_params=evaluation_params,
data_collection_params=data_collection_params,
tool_names=tool_names,
+ main_languages=main_languages,
page_size=page_size,
summary_mode=summary_mode,
search=search,
@@ -473,6 +478,7 @@ async def list(
evaluation_params: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
data_collection_params: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
tool_names: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
+ main_languages: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
page_size: typing.Optional[int] = None,
summary_mode: typing.Optional[ConversationsListRequestSummaryMode] = None,
search: typing.Optional[str] = None,
@@ -525,6 +531,9 @@ async def list(
tool_names : typing.Optional[typing.Union[str, typing.Sequence[str]]]
Filter conversations by tool names used during the call.
+ main_languages : typing.Optional[typing.Union[str, typing.Sequence[str]]]
+ Filter conversations by detected main language (language code).
+
page_size : typing.Optional[int]
How many conversations to return at maximum. Can not exceed 100, defaults to 30.
@@ -589,6 +598,7 @@ async def main() -> None:
evaluation_params=evaluation_params,
data_collection_params=data_collection_params,
tool_names=tool_names,
+ main_languages=main_languages,
page_size=page_size,
summary_mode=summary_mode,
search=search,
diff --git a/src/elevenlabs/conversational_ai/conversations/raw_client.py b/src/elevenlabs/conversational_ai/conversations/raw_client.py
index f949ac54..2cf44ad3 100644
--- a/src/elevenlabs/conversational_ai/conversations/raw_client.py
+++ b/src/elevenlabs/conversational_ai/conversations/raw_client.py
@@ -162,6 +162,7 @@ def list(
evaluation_params: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
data_collection_params: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
tool_names: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
+ main_languages: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
page_size: typing.Optional[int] = None,
summary_mode: typing.Optional[ConversationsListRequestSummaryMode] = None,
search: typing.Optional[str] = None,
@@ -214,6 +215,9 @@ def list(
tool_names : typing.Optional[typing.Union[str, typing.Sequence[str]]]
Filter conversations by tool names used during the call.
+ main_languages : typing.Optional[typing.Union[str, typing.Sequence[str]]]
+ Filter conversations by detected main language (language code).
+
page_size : typing.Optional[int]
How many conversations to return at maximum. Can not exceed 100, defaults to 30.
@@ -249,6 +253,7 @@ def list(
"evaluation_params": evaluation_params,
"data_collection_params": data_collection_params,
"tool_names": tool_names,
+ "main_languages": main_languages,
"page_size": page_size,
"summary_mode": summary_mode,
"search": search,
@@ -527,6 +532,7 @@ async def list(
evaluation_params: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
data_collection_params: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
tool_names: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
+ main_languages: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
page_size: typing.Optional[int] = None,
summary_mode: typing.Optional[ConversationsListRequestSummaryMode] = None,
search: typing.Optional[str] = None,
@@ -579,6 +585,9 @@ async def list(
tool_names : typing.Optional[typing.Union[str, typing.Sequence[str]]]
Filter conversations by tool names used during the call.
+ main_languages : typing.Optional[typing.Union[str, typing.Sequence[str]]]
+ Filter conversations by detected main language (language code).
+
page_size : typing.Optional[int]
How many conversations to return at maximum. Can not exceed 100, defaults to 30.
@@ -614,6 +623,7 @@ async def list(
"evaluation_params": evaluation_params,
"data_collection_params": data_collection_params,
"tool_names": tool_names,
+ "main_languages": main_languages,
"page_size": page_size,
"summary_mode": summary_mode,
"search": search,
diff --git a/src/elevenlabs/conversational_ai/knowledge_base/documents/client.py b/src/elevenlabs/conversational_ai/knowledge_base/documents/client.py
index fe922e32..6002bc06 100644
--- a/src/elevenlabs/conversational_ai/knowledge_base/documents/client.py
+++ b/src/elevenlabs/conversational_ai/knowledge_base/documents/client.py
@@ -9,6 +9,7 @@
from ....core.request_options import RequestOptions
from ....types.add_knowledge_base_response_model import AddKnowledgeBaseResponseModel
from ....types.get_knowledge_base_dependent_agents_response_model import GetKnowledgeBaseDependentAgentsResponseModel
+from ....types.knowledge_base_dependent_type import KnowledgeBaseDependentType
from .raw_client import AsyncRawDocumentsClient, RawDocumentsClient
from .types.documents_get_response import DocumentsGetResponse
from .types.documents_update_response import DocumentsUpdateResponse
@@ -296,8 +297,9 @@ def get_agents(
self,
documentation_id: str,
*,
- cursor: typing.Optional[str] = None,
+ dependent_type: typing.Optional[KnowledgeBaseDependentType] = None,
page_size: typing.Optional[int] = None,
+ cursor: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> GetKnowledgeBaseDependentAgentsResponseModel:
"""
@@ -308,12 +310,15 @@ def get_agents(
documentation_id : str
The id of a document from the knowledge base. This is returned on document addition.
- cursor : typing.Optional[str]
- Used for fetching next page. Cursor is returned in the response.
+ dependent_type : typing.Optional[KnowledgeBaseDependentType]
+ Type of dependent agents to return.
page_size : typing.Optional[int]
How many documents to return at maximum. Can not exceed 100, defaults to 30.
+ cursor : typing.Optional[str]
+ Used for fetching next page. Cursor is returned in the response.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -331,12 +336,17 @@ def get_agents(
)
client.conversational_ai.knowledge_base.documents.get_agents(
documentation_id="21m00Tcm4TlvDq8ikWAM",
- cursor="cursor",
+ dependent_type="direct",
page_size=1,
+ cursor="cursor",
)
"""
_response = self._raw_client.get_agents(
- documentation_id, cursor=cursor, page_size=page_size, request_options=request_options
+ documentation_id,
+ dependent_type=dependent_type,
+ page_size=page_size,
+ cursor=cursor,
+ request_options=request_options,
)
return _response.data
@@ -711,8 +721,9 @@ async def get_agents(
self,
documentation_id: str,
*,
- cursor: typing.Optional[str] = None,
+ dependent_type: typing.Optional[KnowledgeBaseDependentType] = None,
page_size: typing.Optional[int] = None,
+ cursor: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> GetKnowledgeBaseDependentAgentsResponseModel:
"""
@@ -723,12 +734,15 @@ async def get_agents(
documentation_id : str
The id of a document from the knowledge base. This is returned on document addition.
- cursor : typing.Optional[str]
- Used for fetching next page. Cursor is returned in the response.
+ dependent_type : typing.Optional[KnowledgeBaseDependentType]
+ Type of dependent agents to return.
page_size : typing.Optional[int]
How many documents to return at maximum. Can not exceed 100, defaults to 30.
+ cursor : typing.Optional[str]
+ Used for fetching next page. Cursor is returned in the response.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -751,15 +765,20 @@ async def get_agents(
async def main() -> None:
await client.conversational_ai.knowledge_base.documents.get_agents(
documentation_id="21m00Tcm4TlvDq8ikWAM",
- cursor="cursor",
+ dependent_type="direct",
page_size=1,
+ cursor="cursor",
)
asyncio.run(main())
"""
_response = await self._raw_client.get_agents(
- documentation_id, cursor=cursor, page_size=page_size, request_options=request_options
+ documentation_id,
+ dependent_type=dependent_type,
+ page_size=page_size,
+ cursor=cursor,
+ request_options=request_options,
)
return _response.data
diff --git a/src/elevenlabs/conversational_ai/knowledge_base/documents/raw_client.py b/src/elevenlabs/conversational_ai/knowledge_base/documents/raw_client.py
index 18be6543..a988a625 100644
--- a/src/elevenlabs/conversational_ai/knowledge_base/documents/raw_client.py
+++ b/src/elevenlabs/conversational_ai/knowledge_base/documents/raw_client.py
@@ -14,6 +14,7 @@
from ....types.add_knowledge_base_response_model import AddKnowledgeBaseResponseModel
from ....types.get_knowledge_base_dependent_agents_response_model import GetKnowledgeBaseDependentAgentsResponseModel
from ....types.http_validation_error import HttpValidationError
+from ....types.knowledge_base_dependent_type import KnowledgeBaseDependentType
from .types.documents_get_response import DocumentsGetResponse
from .types.documents_update_response import DocumentsUpdateResponse
@@ -420,8 +421,9 @@ def get_agents(
self,
documentation_id: str,
*,
- cursor: typing.Optional[str] = None,
+ dependent_type: typing.Optional[KnowledgeBaseDependentType] = None,
page_size: typing.Optional[int] = None,
+ cursor: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[GetKnowledgeBaseDependentAgentsResponseModel]:
"""
@@ -432,12 +434,15 @@ def get_agents(
documentation_id : str
The id of a document from the knowledge base. This is returned on document addition.
- cursor : typing.Optional[str]
- Used for fetching next page. Cursor is returned in the response.
+ dependent_type : typing.Optional[KnowledgeBaseDependentType]
+ Type of dependent agents to return.
page_size : typing.Optional[int]
How many documents to return at maximum. Can not exceed 100, defaults to 30.
+ cursor : typing.Optional[str]
+ Used for fetching next page. Cursor is returned in the response.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -450,8 +455,9 @@ def get_agents(
f"v1/convai/knowledge-base/{jsonable_encoder(documentation_id)}/dependent-agents",
method="GET",
params={
- "cursor": cursor,
+ "dependent_type": dependent_type,
"page_size": page_size,
+ "cursor": cursor,
},
request_options=request_options,
)
@@ -923,8 +929,9 @@ async def get_agents(
self,
documentation_id: str,
*,
- cursor: typing.Optional[str] = None,
+ dependent_type: typing.Optional[KnowledgeBaseDependentType] = None,
page_size: typing.Optional[int] = None,
+ cursor: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[GetKnowledgeBaseDependentAgentsResponseModel]:
"""
@@ -935,12 +942,15 @@ async def get_agents(
documentation_id : str
The id of a document from the knowledge base. This is returned on document addition.
- cursor : typing.Optional[str]
- Used for fetching next page. Cursor is returned in the response.
+ dependent_type : typing.Optional[KnowledgeBaseDependentType]
+ Type of dependent agents to return.
page_size : typing.Optional[int]
How many documents to return at maximum. Can not exceed 100, defaults to 30.
+ cursor : typing.Optional[str]
+ Used for fetching next page. Cursor is returned in the response.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -953,8 +963,9 @@ async def get_agents(
f"v1/convai/knowledge-base/{jsonable_encoder(documentation_id)}/dependent-agents",
method="GET",
params={
- "cursor": cursor,
+ "dependent_type": dependent_type,
"page_size": page_size,
+ "cursor": cursor,
},
request_options=request_options,
)
diff --git a/src/elevenlabs/conversational_ai/mcp_servers/client.py b/src/elevenlabs/conversational_ai/mcp_servers/client.py
index e12e1289..0fd185e9 100644
--- a/src/elevenlabs/conversational_ai/mcp_servers/client.py
+++ b/src/elevenlabs/conversational_ai/mcp_servers/client.py
@@ -186,6 +186,7 @@ def update(
request_headers: typing.Optional[
typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]
] = OMIT,
+ disable_compression: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> McpServerResponseModel:
"""
@@ -217,6 +218,9 @@ def update(
request_headers : typing.Optional[typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]]
The headers to include in requests to the MCP server
+ disable_compression : typing.Optional[bool]
+ Whether to disable HTTP compression for this MCP server
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -245,6 +249,7 @@ def update(
tool_call_sound_behavior=tool_call_sound_behavior,
execution_mode=execution_mode,
request_headers=request_headers,
+ disable_compression=disable_compression,
request_options=request_options,
)
return _response.data
@@ -475,6 +480,7 @@ async def update(
request_headers: typing.Optional[
typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]
] = OMIT,
+ disable_compression: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> McpServerResponseModel:
"""
@@ -506,6 +512,9 @@ async def update(
request_headers : typing.Optional[typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]]
The headers to include in requests to the MCP server
+ disable_compression : typing.Optional[bool]
+ Whether to disable HTTP compression for this MCP server
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -542,6 +551,7 @@ async def main() -> None:
tool_call_sound_behavior=tool_call_sound_behavior,
execution_mode=execution_mode,
request_headers=request_headers,
+ disable_compression=disable_compression,
request_options=request_options,
)
return _response.data
diff --git a/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py b/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py
index 548ef535..e2c03a02 100644
--- a/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py
+++ b/src/elevenlabs/conversational_ai/mcp_servers/raw_client.py
@@ -250,6 +250,7 @@ def update(
request_headers: typing.Optional[
typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]
] = OMIT,
+ disable_compression: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[McpServerResponseModel]:
"""
@@ -281,6 +282,9 @@ def update(
request_headers : typing.Optional[typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]]
The headers to include in requests to the MCP server
+ disable_compression : typing.Optional[bool]
+ Whether to disable HTTP compression for this MCP server
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -304,6 +308,7 @@ def update(
annotation=typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]],
direction="write",
),
+ "disable_compression": disable_compression,
},
headers={
"content-type": "application/json",
@@ -563,6 +568,7 @@ async def update(
request_headers: typing.Optional[
typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]
] = OMIT,
+ disable_compression: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[McpServerResponseModel]:
"""
@@ -594,6 +600,9 @@ async def update(
request_headers : typing.Optional[typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]]]
The headers to include in requests to the MCP server
+ disable_compression : typing.Optional[bool]
+ Whether to disable HTTP compression for this MCP server
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -617,6 +626,7 @@ async def update(
annotation=typing.Dict[str, typing.Optional[McpServerConfigUpdateRequestModelRequestHeadersValue]],
direction="write",
),
+ "disable_compression": disable_compression,
},
headers={
"content-type": "application/json",
diff --git a/src/elevenlabs/conversational_ai/phone_numbers/client.py b/src/elevenlabs/conversational_ai/phone_numbers/client.py
index a949a7f6..2426792f 100644
--- a/src/elevenlabs/conversational_ai/phone_numbers/client.py
+++ b/src/elevenlabs/conversational_ai/phone_numbers/client.py
@@ -170,6 +170,7 @@ def update(
phone_number_id: str,
*,
agent_id: typing.Optional[str] = OMIT,
+ label: typing.Optional[str] = OMIT,
inbound_trunk_config: typing.Optional[InboundSipTrunkConfigRequestModel] = OMIT,
outbound_trunk_config: typing.Optional[OutboundSipTrunkConfigRequestModel] = OMIT,
livekit_stack: typing.Optional[LivekitStackType] = OMIT,
@@ -185,6 +186,8 @@ def update(
agent_id : typing.Optional[str]
+ label : typing.Optional[str]
+
inbound_trunk_config : typing.Optional[InboundSipTrunkConfigRequestModel]
outbound_trunk_config : typing.Optional[OutboundSipTrunkConfigRequestModel]
@@ -213,6 +216,7 @@ def update(
_response = self._raw_client.update(
phone_number_id,
agent_id=agent_id,
+ label=label,
inbound_trunk_config=inbound_trunk_config,
outbound_trunk_config=outbound_trunk_config,
livekit_stack=livekit_stack,
@@ -407,6 +411,7 @@ async def update(
phone_number_id: str,
*,
agent_id: typing.Optional[str] = OMIT,
+ label: typing.Optional[str] = OMIT,
inbound_trunk_config: typing.Optional[InboundSipTrunkConfigRequestModel] = OMIT,
outbound_trunk_config: typing.Optional[OutboundSipTrunkConfigRequestModel] = OMIT,
livekit_stack: typing.Optional[LivekitStackType] = OMIT,
@@ -422,6 +427,8 @@ async def update(
agent_id : typing.Optional[str]
+ label : typing.Optional[str]
+
inbound_trunk_config : typing.Optional[InboundSipTrunkConfigRequestModel]
outbound_trunk_config : typing.Optional[OutboundSipTrunkConfigRequestModel]
@@ -458,6 +465,7 @@ async def main() -> None:
_response = await self._raw_client.update(
phone_number_id,
agent_id=agent_id,
+ label=label,
inbound_trunk_config=inbound_trunk_config,
outbound_trunk_config=outbound_trunk_config,
livekit_stack=livekit_stack,
diff --git a/src/elevenlabs/conversational_ai/phone_numbers/raw_client.py b/src/elevenlabs/conversational_ai/phone_numbers/raw_client.py
index dc0ad666..a1ad1ccd 100644
--- a/src/elevenlabs/conversational_ai/phone_numbers/raw_client.py
+++ b/src/elevenlabs/conversational_ai/phone_numbers/raw_client.py
@@ -239,6 +239,7 @@ def update(
phone_number_id: str,
*,
agent_id: typing.Optional[str] = OMIT,
+ label: typing.Optional[str] = OMIT,
inbound_trunk_config: typing.Optional[InboundSipTrunkConfigRequestModel] = OMIT,
outbound_trunk_config: typing.Optional[OutboundSipTrunkConfigRequestModel] = OMIT,
livekit_stack: typing.Optional[LivekitStackType] = OMIT,
@@ -254,6 +255,8 @@ def update(
agent_id : typing.Optional[str]
+ label : typing.Optional[str]
+
inbound_trunk_config : typing.Optional[InboundSipTrunkConfigRequestModel]
outbound_trunk_config : typing.Optional[OutboundSipTrunkConfigRequestModel]
@@ -273,6 +276,7 @@ def update(
method="PATCH",
json={
"agent_id": agent_id,
+ "label": label,
"inbound_trunk_config": convert_and_respect_annotation_metadata(
object_=inbound_trunk_config, annotation=InboundSipTrunkConfigRequestModel, direction="write"
),
@@ -528,6 +532,7 @@ async def update(
phone_number_id: str,
*,
agent_id: typing.Optional[str] = OMIT,
+ label: typing.Optional[str] = OMIT,
inbound_trunk_config: typing.Optional[InboundSipTrunkConfigRequestModel] = OMIT,
outbound_trunk_config: typing.Optional[OutboundSipTrunkConfigRequestModel] = OMIT,
livekit_stack: typing.Optional[LivekitStackType] = OMIT,
@@ -543,6 +548,8 @@ async def update(
agent_id : typing.Optional[str]
+ label : typing.Optional[str]
+
inbound_trunk_config : typing.Optional[InboundSipTrunkConfigRequestModel]
outbound_trunk_config : typing.Optional[OutboundSipTrunkConfigRequestModel]
@@ -562,6 +569,7 @@ async def update(
method="PATCH",
json={
"agent_id": agent_id,
+ "label": label,
"inbound_trunk_config": convert_and_respect_annotation_metadata(
object_=inbound_trunk_config, annotation=InboundSipTrunkConfigRequestModel, direction="write"
),
diff --git a/src/elevenlabs/conversational_ai/whatsapp/__init__.py b/src/elevenlabs/conversational_ai/whatsapp/__init__.py
new file mode 100644
index 00000000..5cde0202
--- /dev/null
+++ b/src/elevenlabs/conversational_ai/whatsapp/__init__.py
@@ -0,0 +1,4 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# isort: skip_file
+
diff --git a/src/elevenlabs/conversational_ai/whatsapp/client.py b/src/elevenlabs/conversational_ai/whatsapp/client.py
new file mode 100644
index 00000000..f3a898fc
--- /dev/null
+++ b/src/elevenlabs/conversational_ai/whatsapp/client.py
@@ -0,0 +1,176 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from ...core.request_options import RequestOptions
+from ...types.conversation_initiation_client_data_request_input import ConversationInitiationClientDataRequestInput
+from ...types.whats_app_outbound_call_response import WhatsAppOutboundCallResponse
+from .raw_client import AsyncRawWhatsappClient, RawWhatsappClient
+
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
+
+class WhatsappClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._raw_client = RawWhatsappClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> RawWhatsappClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ RawWhatsappClient
+ """
+ return self._raw_client
+
+ def outbound_call(
+ self,
+ *,
+ whatsapp_phone_number_id: str,
+ whatsapp_user_id: str,
+ whatsapp_call_permission_request_template_name: str,
+ whatsapp_call_permission_request_template_language_code: str,
+ agent_id: str,
+ conversation_initiation_client_data: typing.Optional[ConversationInitiationClientDataRequestInput] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> WhatsAppOutboundCallResponse:
+ """
+ Make an outbound call via WhatsApp
+
+ Parameters
+ ----------
+ whatsapp_phone_number_id : str
+
+ whatsapp_user_id : str
+
+ whatsapp_call_permission_request_template_name : str
+
+ whatsapp_call_permission_request_template_language_code : str
+
+ agent_id : str
+
+ conversation_initiation_client_data : typing.Optional[ConversationInitiationClientDataRequestInput]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ WhatsAppOutboundCallResponse
+ Successful Response
+
+ Examples
+ --------
+ from elevenlabs import ElevenLabs
+
+ client = ElevenLabs(
+ api_key="YOUR_API_KEY",
+ )
+ client.conversational_ai.whatsapp.outbound_call(
+ whatsapp_phone_number_id="whatsapp_phone_number_id",
+ whatsapp_user_id="whatsapp_user_id",
+ whatsapp_call_permission_request_template_name="whatsapp_call_permission_request_template_name",
+ whatsapp_call_permission_request_template_language_code="whatsapp_call_permission_request_template_language_code",
+ agent_id="agent_id",
+ )
+ """
+ _response = self._raw_client.outbound_call(
+ whatsapp_phone_number_id=whatsapp_phone_number_id,
+ whatsapp_user_id=whatsapp_user_id,
+ whatsapp_call_permission_request_template_name=whatsapp_call_permission_request_template_name,
+ whatsapp_call_permission_request_template_language_code=whatsapp_call_permission_request_template_language_code,
+ agent_id=agent_id,
+ conversation_initiation_client_data=conversation_initiation_client_data,
+ request_options=request_options,
+ )
+ return _response.data
+
+
+class AsyncWhatsappClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._raw_client = AsyncRawWhatsappClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> AsyncRawWhatsappClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ AsyncRawWhatsappClient
+ """
+ return self._raw_client
+
+ async def outbound_call(
+ self,
+ *,
+ whatsapp_phone_number_id: str,
+ whatsapp_user_id: str,
+ whatsapp_call_permission_request_template_name: str,
+ whatsapp_call_permission_request_template_language_code: str,
+ agent_id: str,
+ conversation_initiation_client_data: typing.Optional[ConversationInitiationClientDataRequestInput] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> WhatsAppOutboundCallResponse:
+ """
+ Make an outbound call via WhatsApp
+
+ Parameters
+ ----------
+ whatsapp_phone_number_id : str
+
+ whatsapp_user_id : str
+
+ whatsapp_call_permission_request_template_name : str
+
+ whatsapp_call_permission_request_template_language_code : str
+
+ agent_id : str
+
+ conversation_initiation_client_data : typing.Optional[ConversationInitiationClientDataRequestInput]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ WhatsAppOutboundCallResponse
+ Successful Response
+
+ Examples
+ --------
+ import asyncio
+
+ from elevenlabs import AsyncElevenLabs
+
+ client = AsyncElevenLabs(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.conversational_ai.whatsapp.outbound_call(
+ whatsapp_phone_number_id="whatsapp_phone_number_id",
+ whatsapp_user_id="whatsapp_user_id",
+ whatsapp_call_permission_request_template_name="whatsapp_call_permission_request_template_name",
+ whatsapp_call_permission_request_template_language_code="whatsapp_call_permission_request_template_language_code",
+ agent_id="agent_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.outbound_call(
+ whatsapp_phone_number_id=whatsapp_phone_number_id,
+ whatsapp_user_id=whatsapp_user_id,
+ whatsapp_call_permission_request_template_name=whatsapp_call_permission_request_template_name,
+ whatsapp_call_permission_request_template_language_code=whatsapp_call_permission_request_template_language_code,
+ agent_id=agent_id,
+ conversation_initiation_client_data=conversation_initiation_client_data,
+ request_options=request_options,
+ )
+ return _response.data
diff --git a/src/elevenlabs/conversational_ai/whatsapp/raw_client.py b/src/elevenlabs/conversational_ai/whatsapp/raw_client.py
new file mode 100644
index 00000000..9524f867
--- /dev/null
+++ b/src/elevenlabs/conversational_ai/whatsapp/raw_client.py
@@ -0,0 +1,194 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from json.decoder import JSONDecodeError
+
+from ...core.api_error import ApiError
+from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from ...core.http_response import AsyncHttpResponse, HttpResponse
+from ...core.request_options import RequestOptions
+from ...core.serialization import convert_and_respect_annotation_metadata
+from ...core.unchecked_base_model import construct_type
+from ...errors.unprocessable_entity_error import UnprocessableEntityError
+from ...types.conversation_initiation_client_data_request_input import ConversationInitiationClientDataRequestInput
+from ...types.http_validation_error import HttpValidationError
+from ...types.whats_app_outbound_call_response import WhatsAppOutboundCallResponse
+
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
+
+class RawWhatsappClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ def outbound_call(
+ self,
+ *,
+ whatsapp_phone_number_id: str,
+ whatsapp_user_id: str,
+ whatsapp_call_permission_request_template_name: str,
+ whatsapp_call_permission_request_template_language_code: str,
+ agent_id: str,
+ conversation_initiation_client_data: typing.Optional[ConversationInitiationClientDataRequestInput] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[WhatsAppOutboundCallResponse]:
+ """
+ Make an outbound call via WhatsApp
+
+ Parameters
+ ----------
+ whatsapp_phone_number_id : str
+
+ whatsapp_user_id : str
+
+ whatsapp_call_permission_request_template_name : str
+
+ whatsapp_call_permission_request_template_language_code : str
+
+ agent_id : str
+
+ conversation_initiation_client_data : typing.Optional[ConversationInitiationClientDataRequestInput]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[WhatsAppOutboundCallResponse]
+ Successful Response
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "v1/convai/whatsapp/outbound-call",
+ method="POST",
+ json={
+ "whatsapp_phone_number_id": whatsapp_phone_number_id,
+ "whatsapp_user_id": whatsapp_user_id,
+ "whatsapp_call_permission_request_template_name": whatsapp_call_permission_request_template_name,
+ "whatsapp_call_permission_request_template_language_code": whatsapp_call_permission_request_template_language_code,
+ "agent_id": agent_id,
+ "conversation_initiation_client_data": convert_and_respect_annotation_metadata(
+ object_=conversation_initiation_client_data,
+ annotation=ConversationInitiationClientDataRequestInput,
+ direction="write",
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ WhatsAppOutboundCallResponse,
+ construct_type(
+ type_=WhatsAppOutboundCallResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ HttpValidationError,
+ construct_type(
+ type_=HttpValidationError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+
+class AsyncRawWhatsappClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ async def outbound_call(
+ self,
+ *,
+ whatsapp_phone_number_id: str,
+ whatsapp_user_id: str,
+ whatsapp_call_permission_request_template_name: str,
+ whatsapp_call_permission_request_template_language_code: str,
+ agent_id: str,
+ conversation_initiation_client_data: typing.Optional[ConversationInitiationClientDataRequestInput] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[WhatsAppOutboundCallResponse]:
+ """
+ Make an outbound call via WhatsApp
+
+ Parameters
+ ----------
+ whatsapp_phone_number_id : str
+
+ whatsapp_user_id : str
+
+ whatsapp_call_permission_request_template_name : str
+
+ whatsapp_call_permission_request_template_language_code : str
+
+ agent_id : str
+
+ conversation_initiation_client_data : typing.Optional[ConversationInitiationClientDataRequestInput]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[WhatsAppOutboundCallResponse]
+ Successful Response
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "v1/convai/whatsapp/outbound-call",
+ method="POST",
+ json={
+ "whatsapp_phone_number_id": whatsapp_phone_number_id,
+ "whatsapp_user_id": whatsapp_user_id,
+ "whatsapp_call_permission_request_template_name": whatsapp_call_permission_request_template_name,
+ "whatsapp_call_permission_request_template_language_code": whatsapp_call_permission_request_template_language_code,
+ "agent_id": agent_id,
+ "conversation_initiation_client_data": convert_and_respect_annotation_metadata(
+ object_=conversation_initiation_client_data,
+ annotation=ConversationInitiationClientDataRequestInput,
+ direction="write",
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ WhatsAppOutboundCallResponse,
+ construct_type(
+ type_=WhatsAppOutboundCallResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ HttpValidationError,
+ construct_type(
+ type_=HttpValidationError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/src/elevenlabs/conversational_ai/whatsapp_accounts/__init__.py b/src/elevenlabs/conversational_ai/whatsapp_accounts/__init__.py
new file mode 100644
index 00000000..5cde0202
--- /dev/null
+++ b/src/elevenlabs/conversational_ai/whatsapp_accounts/__init__.py
@@ -0,0 +1,4 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# isort: skip_file
+
diff --git a/src/elevenlabs/conversational_ai/whatsapp_accounts/client.py b/src/elevenlabs/conversational_ai/whatsapp_accounts/client.py
new file mode 100644
index 00000000..2913570e
--- /dev/null
+++ b/src/elevenlabs/conversational_ai/whatsapp_accounts/client.py
@@ -0,0 +1,439 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from ...core.request_options import RequestOptions
+from ...types.get_whats_app_account_response import GetWhatsAppAccountResponse
+from ...types.import_whats_app_account_response import ImportWhatsAppAccountResponse
+from ...types.list_whats_app_accounts_response import ListWhatsAppAccountsResponse
+from .raw_client import AsyncRawWhatsappAccountsClient, RawWhatsappAccountsClient
+
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
+
+class WhatsappAccountsClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._raw_client = RawWhatsappAccountsClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> RawWhatsappAccountsClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ RawWhatsappAccountsClient
+ """
+ return self._raw_client
+
+ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ListWhatsAppAccountsResponse:
+ """
+ List all WhatsApp accounts
+
+ Parameters
+ ----------
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ ListWhatsAppAccountsResponse
+ Successful Response
+
+ Examples
+ --------
+ from elevenlabs import ElevenLabs
+
+ client = ElevenLabs(
+ api_key="YOUR_API_KEY",
+ )
+ client.conversational_ai.whatsapp_accounts.list()
+ """
+ _response = self._raw_client.list(request_options=request_options)
+ return _response.data
+
+ def import_(
+ self,
+ *,
+ business_account_id: str,
+ phone_number_id: str,
+ token_code: str,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> ImportWhatsAppAccountResponse:
+ """
+ Import a WhatsApp account
+
+ Parameters
+ ----------
+ business_account_id : str
+
+ phone_number_id : str
+
+ token_code : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ ImportWhatsAppAccountResponse
+ Successful Response
+
+ Examples
+ --------
+ from elevenlabs import ElevenLabs
+
+ client = ElevenLabs(
+ api_key="YOUR_API_KEY",
+ )
+ client.conversational_ai.whatsapp_accounts.import_(
+ business_account_id="business_account_id",
+ phone_number_id="phone_number_id",
+ token_code="token_code",
+ )
+ """
+ _response = self._raw_client.import_(
+ business_account_id=business_account_id,
+ phone_number_id=phone_number_id,
+ token_code=token_code,
+ request_options=request_options,
+ )
+ return _response.data
+
+ def get(
+ self, phone_number_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> GetWhatsAppAccountResponse:
+ """
+ Get a WhatsApp account
+
+ Parameters
+ ----------
+ phone_number_id : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ GetWhatsAppAccountResponse
+ Successful Response
+
+ Examples
+ --------
+ from elevenlabs import ElevenLabs
+
+ client = ElevenLabs(
+ api_key="YOUR_API_KEY",
+ )
+ client.conversational_ai.whatsapp_accounts.get(
+ phone_number_id="phone_number_id",
+ )
+ """
+ _response = self._raw_client.get(phone_number_id, request_options=request_options)
+ return _response.data
+
+ def delete(self, phone_number_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> typing.Any:
+ """
+ Delete a WhatsApp account
+
+ Parameters
+ ----------
+ phone_number_id : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ typing.Any
+ Successful Response
+
+ Examples
+ --------
+ from elevenlabs import ElevenLabs
+
+ client = ElevenLabs(
+ api_key="YOUR_API_KEY",
+ )
+ client.conversational_ai.whatsapp_accounts.delete(
+ phone_number_id="phone_number_id",
+ )
+ """
+ _response = self._raw_client.delete(phone_number_id, request_options=request_options)
+ return _response.data
+
+ def update(
+ self,
+ phone_number_id: str,
+ *,
+ assigned_agent_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> typing.Any:
+ """
+ Update a WhatsApp account
+
+ Parameters
+ ----------
+ phone_number_id : str
+
+ assigned_agent_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ typing.Any
+ Successful Response
+
+ Examples
+ --------
+ from elevenlabs import ElevenLabs
+
+ client = ElevenLabs(
+ api_key="YOUR_API_KEY",
+ )
+ client.conversational_ai.whatsapp_accounts.update(
+ phone_number_id="phone_number_id",
+ )
+ """
+ _response = self._raw_client.update(
+ phone_number_id, assigned_agent_id=assigned_agent_id, request_options=request_options
+ )
+ return _response.data
+
+
+class AsyncWhatsappAccountsClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._raw_client = AsyncRawWhatsappAccountsClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> AsyncRawWhatsappAccountsClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ AsyncRawWhatsappAccountsClient
+ """
+ return self._raw_client
+
+ async def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ListWhatsAppAccountsResponse:
+ """
+ List all WhatsApp accounts
+
+ Parameters
+ ----------
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ ListWhatsAppAccountsResponse
+ Successful Response
+
+ Examples
+ --------
+ import asyncio
+
+ from elevenlabs import AsyncElevenLabs
+
+ client = AsyncElevenLabs(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.conversational_ai.whatsapp_accounts.list()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.list(request_options=request_options)
+ return _response.data
+
+ async def import_(
+ self,
+ *,
+ business_account_id: str,
+ phone_number_id: str,
+ token_code: str,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> ImportWhatsAppAccountResponse:
+ """
+ Import a WhatsApp account
+
+ Parameters
+ ----------
+ business_account_id : str
+
+ phone_number_id : str
+
+ token_code : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ ImportWhatsAppAccountResponse
+ Successful Response
+
+ Examples
+ --------
+ import asyncio
+
+ from elevenlabs import AsyncElevenLabs
+
+ client = AsyncElevenLabs(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.conversational_ai.whatsapp_accounts.import_(
+ business_account_id="business_account_id",
+ phone_number_id="phone_number_id",
+ token_code="token_code",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.import_(
+ business_account_id=business_account_id,
+ phone_number_id=phone_number_id,
+ token_code=token_code,
+ request_options=request_options,
+ )
+ return _response.data
+
+ async def get(
+ self, phone_number_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> GetWhatsAppAccountResponse:
+ """
+ Get a WhatsApp account
+
+ Parameters
+ ----------
+ phone_number_id : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ GetWhatsAppAccountResponse
+ Successful Response
+
+ Examples
+ --------
+ import asyncio
+
+ from elevenlabs import AsyncElevenLabs
+
+ client = AsyncElevenLabs(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.conversational_ai.whatsapp_accounts.get(
+ phone_number_id="phone_number_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.get(phone_number_id, request_options=request_options)
+ return _response.data
+
+ async def delete(
+ self, phone_number_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> typing.Any:
+ """
+ Delete a WhatsApp account
+
+ Parameters
+ ----------
+ phone_number_id : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ typing.Any
+ Successful Response
+
+ Examples
+ --------
+ import asyncio
+
+ from elevenlabs import AsyncElevenLabs
+
+ client = AsyncElevenLabs(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.conversational_ai.whatsapp_accounts.delete(
+ phone_number_id="phone_number_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.delete(phone_number_id, request_options=request_options)
+ return _response.data
+
+ async def update(
+ self,
+ phone_number_id: str,
+ *,
+ assigned_agent_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> typing.Any:
+ """
+ Update a WhatsApp account
+
+ Parameters
+ ----------
+ phone_number_id : str
+
+ assigned_agent_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ typing.Any
+ Successful Response
+
+ Examples
+ --------
+ import asyncio
+
+ from elevenlabs import AsyncElevenLabs
+
+ client = AsyncElevenLabs(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.conversational_ai.whatsapp_accounts.update(
+ phone_number_id="phone_number_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.update(
+ phone_number_id, assigned_agent_id=assigned_agent_id, request_options=request_options
+ )
+ return _response.data
diff --git a/src/elevenlabs/conversational_ai/whatsapp_accounts/raw_client.py b/src/elevenlabs/conversational_ai/whatsapp_accounts/raw_client.py
new file mode 100644
index 00000000..06832871
--- /dev/null
+++ b/src/elevenlabs/conversational_ai/whatsapp_accounts/raw_client.py
@@ -0,0 +1,585 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from json.decoder import JSONDecodeError
+
+from ...core.api_error import ApiError
+from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from ...core.http_response import AsyncHttpResponse, HttpResponse
+from ...core.jsonable_encoder import jsonable_encoder
+from ...core.request_options import RequestOptions
+from ...core.unchecked_base_model import construct_type
+from ...errors.unprocessable_entity_error import UnprocessableEntityError
+from ...types.get_whats_app_account_response import GetWhatsAppAccountResponse
+from ...types.http_validation_error import HttpValidationError
+from ...types.import_whats_app_account_response import ImportWhatsAppAccountResponse
+from ...types.list_whats_app_accounts_response import ListWhatsAppAccountsResponse
+
+# this is used as the default value for optional parameters
+OMIT = typing.cast(typing.Any, ...)
+
+
+class RawWhatsappAccountsClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ def list(
+ self, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> HttpResponse[ListWhatsAppAccountsResponse]:
+ """
+ List all WhatsApp accounts
+
+ Parameters
+ ----------
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[ListWhatsAppAccountsResponse]
+ Successful Response
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "v1/convai/whatsapp-accounts",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ ListWhatsAppAccountsResponse,
+ construct_type(
+ type_=ListWhatsAppAccountsResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ HttpValidationError,
+ construct_type(
+ type_=HttpValidationError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ def import_(
+ self,
+ *,
+ business_account_id: str,
+ phone_number_id: str,
+ token_code: str,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[ImportWhatsAppAccountResponse]:
+ """
+ Import a WhatsApp account
+
+ Parameters
+ ----------
+ business_account_id : str
+
+ phone_number_id : str
+
+ token_code : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[ImportWhatsAppAccountResponse]
+ Successful Response
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "v1/convai/whatsapp-accounts",
+ method="POST",
+ json={
+ "business_account_id": business_account_id,
+ "phone_number_id": phone_number_id,
+ "token_code": token_code,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ ImportWhatsAppAccountResponse,
+ construct_type(
+ type_=ImportWhatsAppAccountResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ HttpValidationError,
+ construct_type(
+ type_=HttpValidationError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ def get(
+ self, phone_number_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> HttpResponse[GetWhatsAppAccountResponse]:
+ """
+ Get a WhatsApp account
+
+ Parameters
+ ----------
+ phone_number_id : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[GetWhatsAppAccountResponse]
+ Successful Response
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"v1/convai/whatsapp-accounts/{jsonable_encoder(phone_number_id)}",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ GetWhatsAppAccountResponse,
+ construct_type(
+ type_=GetWhatsAppAccountResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ HttpValidationError,
+ construct_type(
+ type_=HttpValidationError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ def delete(
+ self, phone_number_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> HttpResponse[typing.Any]:
+ """
+ Delete a WhatsApp account
+
+ Parameters
+ ----------
+ phone_number_id : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[typing.Any]
+ Successful Response
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"v1/convai/whatsapp-accounts/{jsonable_encoder(phone_number_id)}",
+ method="DELETE",
+ request_options=request_options,
+ )
+ try:
+ if _response is None or not _response.text.strip():
+ return HttpResponse(response=_response, data=None)
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ typing.Any,
+ construct_type(
+ type_=typing.Any, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ HttpValidationError,
+ construct_type(
+ type_=HttpValidationError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ def update(
+ self,
+ phone_number_id: str,
+ *,
+ assigned_agent_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[typing.Any]:
+ """
+ Update a WhatsApp account
+
+ Parameters
+ ----------
+ phone_number_id : str
+
+ assigned_agent_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[typing.Any]
+ Successful Response
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"v1/convai/whatsapp-accounts/{jsonable_encoder(phone_number_id)}",
+ method="PATCH",
+ json={
+ "assigned_agent_id": assigned_agent_id,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if _response is None or not _response.text.strip():
+ return HttpResponse(response=_response, data=None)
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ typing.Any,
+ construct_type(
+ type_=typing.Any, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ HttpValidationError,
+ construct_type(
+ type_=HttpValidationError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+
+class AsyncRawWhatsappAccountsClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ async def list(
+ self, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[ListWhatsAppAccountsResponse]:
+ """
+ List all WhatsApp accounts
+
+ Parameters
+ ----------
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[ListWhatsAppAccountsResponse]
+ Successful Response
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "v1/convai/whatsapp-accounts",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ ListWhatsAppAccountsResponse,
+ construct_type(
+ type_=ListWhatsAppAccountsResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ HttpValidationError,
+ construct_type(
+ type_=HttpValidationError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def import_(
+ self,
+ *,
+ business_account_id: str,
+ phone_number_id: str,
+ token_code: str,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[ImportWhatsAppAccountResponse]:
+ """
+ Import a WhatsApp account
+
+ Parameters
+ ----------
+ business_account_id : str
+
+ phone_number_id : str
+
+ token_code : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[ImportWhatsAppAccountResponse]
+ Successful Response
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "v1/convai/whatsapp-accounts",
+ method="POST",
+ json={
+ "business_account_id": business_account_id,
+ "phone_number_id": phone_number_id,
+ "token_code": token_code,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ ImportWhatsAppAccountResponse,
+ construct_type(
+ type_=ImportWhatsAppAccountResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ HttpValidationError,
+ construct_type(
+ type_=HttpValidationError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def get(
+ self, phone_number_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[GetWhatsAppAccountResponse]:
+ """
+ Get a WhatsApp account
+
+ Parameters
+ ----------
+ phone_number_id : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[GetWhatsAppAccountResponse]
+ Successful Response
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"v1/convai/whatsapp-accounts/{jsonable_encoder(phone_number_id)}",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ GetWhatsAppAccountResponse,
+ construct_type(
+ type_=GetWhatsAppAccountResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ HttpValidationError,
+ construct_type(
+ type_=HttpValidationError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def delete(
+ self, phone_number_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[typing.Any]:
+ """
+ Delete a WhatsApp account
+
+ Parameters
+ ----------
+ phone_number_id : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[typing.Any]
+ Successful Response
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"v1/convai/whatsapp-accounts/{jsonable_encoder(phone_number_id)}",
+ method="DELETE",
+ request_options=request_options,
+ )
+ try:
+ if _response is None or not _response.text.strip():
+ return AsyncHttpResponse(response=_response, data=None)
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ typing.Any,
+ construct_type(
+ type_=typing.Any, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ HttpValidationError,
+ construct_type(
+ type_=HttpValidationError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+ async def update(
+ self,
+ phone_number_id: str,
+ *,
+ assigned_agent_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[typing.Any]:
+ """
+ Update a WhatsApp account
+
+ Parameters
+ ----------
+ phone_number_id : str
+
+ assigned_agent_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[typing.Any]
+ Successful Response
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"v1/convai/whatsapp-accounts/{jsonable_encoder(phone_number_id)}",
+ method="PATCH",
+ json={
+ "assigned_agent_id": assigned_agent_id,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if _response is None or not _response.text.strip():
+ return AsyncHttpResponse(response=_response, data=None)
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ typing.Any,
+ construct_type(
+ type_=typing.Any, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ HttpValidationError,
+ construct_type(
+ type_=HttpValidationError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py
index 6f033055..c0f2a113 100644
--- a/src/elevenlabs/core/client_wrapper.py
+++ b/src/elevenlabs/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "elevenlabs/v2.27.0",
+ "User-Agent": "elevenlabs/v2.28.0",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "elevenlabs",
- "X-Fern-SDK-Version": "v2.27.0",
+ "X-Fern-SDK-Version": "v2.28.0",
**(self.get_custom_headers() or {}),
}
if self._api_key is not None:
diff --git a/src/elevenlabs/dubbing/__init__.py b/src/elevenlabs/dubbing/__init__.py
index 27522d26..3ec5dde8 100644
--- a/src/elevenlabs/dubbing/__init__.py
+++ b/src/elevenlabs/dubbing/__init__.py
@@ -13,14 +13,12 @@
DubbingListRequestOrderDirection,
)
from . import audio, resource, transcript
- from .resource import ResourceRenderRequestLanguage
from .transcript import TranscriptGetTranscriptForDubRequestFormatType, TranscriptGetTranscriptForDubResponse
_dynamic_imports: typing.Dict[str, str] = {
"DubbingCreateRequestMode": ".types",
"DubbingListRequestDubbingStatus": ".types",
"DubbingListRequestFilterByCreator": ".types",
"DubbingListRequestOrderDirection": ".types",
- "ResourceRenderRequestLanguage": ".resource",
"TranscriptGetTranscriptForDubRequestFormatType": ".transcript",
"TranscriptGetTranscriptForDubResponse": ".transcript",
"audio": ".audio",
@@ -55,7 +53,6 @@ def __dir__():
"DubbingListRequestDubbingStatus",
"DubbingListRequestFilterByCreator",
"DubbingListRequestOrderDirection",
- "ResourceRenderRequestLanguage",
"TranscriptGetTranscriptForDubRequestFormatType",
"TranscriptGetTranscriptForDubResponse",
"audio",
diff --git a/src/elevenlabs/dubbing/resource/__init__.py b/src/elevenlabs/dubbing/resource/__init__.py
index 352f4d09..b3e1a310 100644
--- a/src/elevenlabs/dubbing/resource/__init__.py
+++ b/src/elevenlabs/dubbing/resource/__init__.py
@@ -6,14 +6,8 @@
from importlib import import_module
if typing.TYPE_CHECKING:
- from .types import ResourceRenderRequestLanguage
from . import language, segment, speaker
-_dynamic_imports: typing.Dict[str, str] = {
- "ResourceRenderRequestLanguage": ".types",
- "language": ".language",
- "segment": ".segment",
- "speaker": ".speaker",
-}
+_dynamic_imports: typing.Dict[str, str] = {"language": ".language", "segment": ".segment", "speaker": ".speaker"}
def __getattr__(attr_name: str) -> typing.Any:
@@ -37,4 +31,4 @@ def __dir__():
return sorted(lazy_attrs)
-__all__ = ["ResourceRenderRequestLanguage", "language", "segment", "speaker"]
+__all__ = ["language", "segment", "speaker"]
diff --git a/src/elevenlabs/dubbing/resource/client.py b/src/elevenlabs/dubbing/resource/client.py
index 84e06f41..b15714c8 100644
--- a/src/elevenlabs/dubbing/resource/client.py
+++ b/src/elevenlabs/dubbing/resource/client.py
@@ -14,7 +14,6 @@
from ...types.segment_transcription_response import SegmentTranscriptionResponse
from ...types.segment_translation_response import SegmentTranslationResponse
from .raw_client import AsyncRawResourceClient, RawResourceClient
-from .types.resource_render_request_language import ResourceRenderRequestLanguage
if typing.TYPE_CHECKING:
from .language.client import AsyncLanguageClient, LanguageClient
@@ -258,7 +257,7 @@ def dub(
def render(
self,
dubbing_id: str,
- language: ResourceRenderRequestLanguage,
+ language: str,
*,
render_type: RenderType,
normalize_volume: typing.Optional[bool] = OMIT,
@@ -272,7 +271,7 @@ def render(
dubbing_id : str
ID of the dubbing project.
- language : ResourceRenderRequestLanguage
+ language : str
The target language code to render, eg. 'es'. To render the source track use 'original'.
render_type : RenderType
@@ -298,7 +297,7 @@ def render(
)
client.dubbing.resource.render(
dubbing_id="dubbing_id",
- language="original",
+ language="language",
render_type="mp4",
)
"""
@@ -610,7 +609,7 @@ async def main() -> None:
async def render(
self,
dubbing_id: str,
- language: ResourceRenderRequestLanguage,
+ language: str,
*,
render_type: RenderType,
normalize_volume: typing.Optional[bool] = OMIT,
@@ -624,7 +623,7 @@ async def render(
dubbing_id : str
ID of the dubbing project.
- language : ResourceRenderRequestLanguage
+ language : str
The target language code to render, eg. 'es'. To render the source track use 'original'.
render_type : RenderType
@@ -655,7 +654,7 @@ async def render(
async def main() -> None:
await client.dubbing.resource.render(
dubbing_id="dubbing_id",
- language="original",
+ language="language",
render_type="mp4",
)
diff --git a/src/elevenlabs/dubbing/resource/raw_client.py b/src/elevenlabs/dubbing/resource/raw_client.py
index 10157ecc..010c42f9 100644
--- a/src/elevenlabs/dubbing/resource/raw_client.py
+++ b/src/elevenlabs/dubbing/resource/raw_client.py
@@ -18,7 +18,6 @@
from ...types.segment_migration_response import SegmentMigrationResponse
from ...types.segment_transcription_response import SegmentTranscriptionResponse
from ...types.segment_translation_response import SegmentTranslationResponse
-from .types.resource_render_request_language import ResourceRenderRequestLanguage
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -350,7 +349,7 @@ def dub(
def render(
self,
dubbing_id: str,
- language: ResourceRenderRequestLanguage,
+ language: str,
*,
render_type: RenderType,
normalize_volume: typing.Optional[bool] = OMIT,
@@ -364,7 +363,7 @@ def render(
dubbing_id : str
ID of the dubbing project.
- language : ResourceRenderRequestLanguage
+ language : str
The target language code to render, eg. 'es'. To render the source track use 'original'.
render_type : RenderType
@@ -747,7 +746,7 @@ async def dub(
async def render(
self,
dubbing_id: str,
- language: ResourceRenderRequestLanguage,
+ language: str,
*,
render_type: RenderType,
normalize_volume: typing.Optional[bool] = OMIT,
@@ -761,7 +760,7 @@ async def render(
dubbing_id : str
ID of the dubbing project.
- language : ResourceRenderRequestLanguage
+ language : str
The target language code to render, eg. 'es'. To render the source track use 'original'.
render_type : RenderType
diff --git a/src/elevenlabs/dubbing/resource/types/__init__.py b/src/elevenlabs/dubbing/resource/types/__init__.py
deleted file mode 100644
index bfd119c7..00000000
--- a/src/elevenlabs/dubbing/resource/types/__init__.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# This file was auto-generated by Fern from our API Definition.
-
-# isort: skip_file
-
-import typing
-from importlib import import_module
-
-if typing.TYPE_CHECKING:
- from .resource_render_request_language import ResourceRenderRequestLanguage
-_dynamic_imports: typing.Dict[str, str] = {"ResourceRenderRequestLanguage": ".resource_render_request_language"}
-
-
-def __getattr__(attr_name: str) -> typing.Any:
- module_name = _dynamic_imports.get(attr_name)
- if module_name is None:
- raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
- try:
- module = import_module(module_name, __package__)
- if module_name == f".{attr_name}":
- return module
- else:
- return getattr(module, attr_name)
- except ImportError as e:
- raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
- except AttributeError as e:
- raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
-
-
-def __dir__():
- lazy_attrs = list(_dynamic_imports.keys())
- return sorted(lazy_attrs)
-
-
-__all__ = ["ResourceRenderRequestLanguage"]
diff --git a/src/elevenlabs/dubbing/resource/types/resource_render_request_language.py b/src/elevenlabs/dubbing/resource/types/resource_render_request_language.py
deleted file mode 100644
index b7a17991..00000000
--- a/src/elevenlabs/dubbing/resource/types/resource_render_request_language.py
+++ /dev/null
@@ -1,5 +0,0 @@
-# This file was auto-generated by Fern from our API Definition.
-
-import typing
-
-ResourceRenderRequestLanguage = typing.Union[str, typing.Literal["original"]]
diff --git a/src/elevenlabs/history/client.py b/src/elevenlabs/history/client.py
index e8298006..03debd3f 100644
--- a/src/elevenlabs/history/client.py
+++ b/src/elevenlabs/history/client.py
@@ -126,7 +126,7 @@ def get(
Parameters
----------
history_item_id : str
- ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items.
+ ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/list) endpoint to retrieve a list of history items.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -159,7 +159,7 @@ def delete(
Parameters
----------
history_item_id : str
- ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items.
+ ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/list) endpoint to retrieve a list of history items.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -192,7 +192,7 @@ def get_audio(
Parameters
----------
history_item_id : str
- ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items.
+ ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/list) endpoint to retrieve a list of history items.
request_options : typing.Optional[RequestOptions]
Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -378,7 +378,7 @@ async def get(
Parameters
----------
history_item_id : str
- ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items.
+ ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/list) endpoint to retrieve a list of history items.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -419,7 +419,7 @@ async def delete(
Parameters
----------
history_item_id : str
- ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items.
+ ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/list) endpoint to retrieve a list of history items.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -460,7 +460,7 @@ async def get_audio(
Parameters
----------
history_item_id : str
- ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items.
+ ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/list) endpoint to retrieve a list of history items.
request_options : typing.Optional[RequestOptions]
Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
diff --git a/src/elevenlabs/history/raw_client.py b/src/elevenlabs/history/raw_client.py
index 1f786d6c..8f52e75b 100644
--- a/src/elevenlabs/history/raw_client.py
+++ b/src/elevenlabs/history/raw_client.py
@@ -133,7 +133,7 @@ def get(
Parameters
----------
history_item_id : str
- ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items.
+ ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/list) endpoint to retrieve a list of history items.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -183,7 +183,7 @@ def delete(
Parameters
----------
history_item_id : str
- ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items.
+ ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/list) endpoint to retrieve a list of history items.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -234,7 +234,7 @@ def get_audio(
Parameters
----------
history_item_id : str
- ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items.
+ ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/list) endpoint to retrieve a list of history items.
request_options : typing.Optional[RequestOptions]
Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -468,7 +468,7 @@ async def get(
Parameters
----------
history_item_id : str
- ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items.
+ ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/list) endpoint to retrieve a list of history items.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -518,7 +518,7 @@ async def delete(
Parameters
----------
history_item_id : str
- ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items.
+ ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/list) endpoint to retrieve a list of history items.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -569,7 +569,7 @@ async def get_audio(
Parameters
----------
history_item_id : str
- ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/get-all) endpoint to retrieve a list of history items.
+ ID of the history item to be used. You can use the [Get generated items](/docs/api-reference/history/list) endpoint to retrieve a list of history items.
request_options : typing.Optional[RequestOptions]
Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
diff --git a/src/elevenlabs/music/client.py b/src/elevenlabs/music/client.py
index 5bc86053..b9493e98 100644
--- a/src/elevenlabs/music/client.py
+++ b/src/elevenlabs/music/client.py
@@ -67,7 +67,7 @@ def compose(
A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`.
music_length_ms : typing.Optional[int]
- The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+ The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
model_id : typing.Optional[typing.Literal["music_v1"]]
The model to use for the generation.
@@ -144,7 +144,7 @@ def compose_detailed(
A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`.
music_length_ms : typing.Optional[int]
- The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+ The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
model_id : typing.Optional[typing.Literal["music_v1"]]
The model to use for the generation.
@@ -219,7 +219,7 @@ def stream(
A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`.
music_length_ms : typing.Optional[int]
- The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+ The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
model_id : typing.Optional[typing.Literal["music_v1"]]
The model to use for the generation.
@@ -357,7 +357,7 @@ async def compose(
A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`.
music_length_ms : typing.Optional[int]
- The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+ The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
model_id : typing.Optional[typing.Literal["music_v1"]]
The model to use for the generation.
@@ -443,7 +443,7 @@ async def compose_detailed(
A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`.
music_length_ms : typing.Optional[int]
- The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+ The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
model_id : typing.Optional[typing.Literal["music_v1"]]
The model to use for the generation.
@@ -527,7 +527,7 @@ async def stream(
A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`.
music_length_ms : typing.Optional[int]
- The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+ The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
model_id : typing.Optional[typing.Literal["music_v1"]]
The model to use for the generation.
diff --git a/src/elevenlabs/music/composition_plan/client.py b/src/elevenlabs/music/composition_plan/client.py
index a28d3f82..5c390ffe 100644
--- a/src/elevenlabs/music/composition_plan/client.py
+++ b/src/elevenlabs/music/composition_plan/client.py
@@ -44,7 +44,7 @@ def create(
A simple text prompt to compose a plan from.
music_length_ms : typing.Optional[int]
- The length of the composition plan to generate in milliseconds. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+ The length of the composition plan to generate in milliseconds. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
source_composition_plan : typing.Optional[MusicPrompt]
An optional composition plan to use as a source for the new composition plan.
@@ -114,7 +114,7 @@ async def create(
A simple text prompt to compose a plan from.
music_length_ms : typing.Optional[int]
- The length of the composition plan to generate in milliseconds. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+ The length of the composition plan to generate in milliseconds. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
source_composition_plan : typing.Optional[MusicPrompt]
An optional composition plan to use as a source for the new composition plan.
diff --git a/src/elevenlabs/music/composition_plan/raw_client.py b/src/elevenlabs/music/composition_plan/raw_client.py
index a03d007b..d2160d42 100644
--- a/src/elevenlabs/music/composition_plan/raw_client.py
+++ b/src/elevenlabs/music/composition_plan/raw_client.py
@@ -39,7 +39,7 @@ def create(
A simple text prompt to compose a plan from.
music_length_ms : typing.Optional[int]
- The length of the composition plan to generate in milliseconds. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+ The length of the composition plan to generate in milliseconds. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
source_composition_plan : typing.Optional[MusicPrompt]
An optional composition plan to use as a source for the new composition plan.
@@ -121,7 +121,7 @@ async def create(
A simple text prompt to compose a plan from.
music_length_ms : typing.Optional[int]
- The length of the composition plan to generate in milliseconds. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+ The length of the composition plan to generate in milliseconds. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
source_composition_plan : typing.Optional[MusicPrompt]
An optional composition plan to use as a source for the new composition plan.
diff --git a/src/elevenlabs/music/raw_client.py b/src/elevenlabs/music/raw_client.py
index 638644d5..31979b5c 100644
--- a/src/elevenlabs/music/raw_client.py
+++ b/src/elevenlabs/music/raw_client.py
@@ -58,7 +58,7 @@ def compose(
A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`.
music_length_ms : typing.Optional[int]
- The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+ The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
model_id : typing.Optional[typing.Literal["music_v1"]]
The model to use for the generation.
@@ -166,7 +166,7 @@ def compose_detailed(
A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`.
music_length_ms : typing.Optional[int]
- The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+ The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
model_id : typing.Optional[typing.Literal["music_v1"]]
The model to use for the generation.
@@ -272,7 +272,7 @@ def stream(
A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`.
music_length_ms : typing.Optional[int]
- The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+ The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
model_id : typing.Optional[typing.Literal["music_v1"]]
The model to use for the generation.
@@ -458,7 +458,7 @@ async def compose(
A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`.
music_length_ms : typing.Optional[int]
- The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+ The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
model_id : typing.Optional[typing.Literal["music_v1"]]
The model to use for the generation.
@@ -567,7 +567,7 @@ async def compose_detailed(
A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`.
music_length_ms : typing.Optional[int]
- The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+ The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
model_id : typing.Optional[typing.Literal["music_v1"]]
The model to use for the generation.
@@ -674,7 +674,7 @@ async def stream(
A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`.
music_length_ms : typing.Optional[int]
- The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.
+ The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt.
model_id : typing.Optional[typing.Literal["music_v1"]]
The model to use for the generation.
diff --git a/src/elevenlabs/studio/client.py b/src/elevenlabs/studio/client.py
index 33646f24..c2035d62 100644
--- a/src/elevenlabs/studio/client.py
+++ b/src/elevenlabs/studio/client.py
@@ -81,9 +81,9 @@ def create_podcast(
quality_preset : typing.Optional[BodyCreatePodcastV1StudioPodcastsPostQualityPreset]
Output quality of the generated audio. Must be one of:
standard - standard output format, 128kbps with 44.1kHz sample rate.
- high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side. Using this setting increases the credit cost by 20%.
- ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side. Using this setting increases the credit cost by 50%.
- ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format. Using this setting increases the credit cost by 100%.
+ high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side.
+ ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side.
+ ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format.
duration_scale : typing.Optional[BodyCreatePodcastV1StudioPodcastsPostDurationScale]
Duration of the generated podcast. Must be one of:
@@ -289,9 +289,9 @@ async def create_podcast(
quality_preset : typing.Optional[BodyCreatePodcastV1StudioPodcastsPostQualityPreset]
Output quality of the generated audio. Must be one of:
standard - standard output format, 128kbps with 44.1kHz sample rate.
- high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side. Using this setting increases the credit cost by 20%.
- ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side. Using this setting increases the credit cost by 50%.
- ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format. Using this setting increases the credit cost by 100%.
+ high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side.
+ ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side.
+ ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format.
duration_scale : typing.Optional[BodyCreatePodcastV1StudioPodcastsPostDurationScale]
Duration of the generated podcast. Must be one of:
diff --git a/src/elevenlabs/studio/projects/client.py b/src/elevenlabs/studio/projects/client.py
index 94bb84a2..f3acd3fd 100644
--- a/src/elevenlabs/studio/projects/client.py
+++ b/src/elevenlabs/studio/projects/client.py
@@ -141,9 +141,9 @@ def create(
quality_preset : typing.Optional[str]
Output quality of the generated audio. Must be one of:
standard - standard output format, 128kbps with 44.1kHz sample rate.
- high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side. Using this setting increases the credit cost by 20%.
- ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side. Using this setting increases the credit cost by 50%.
- ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format. Using this setting increases the credit cost by 100%.
+ high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side.
+ ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side.
+ ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format.
title : typing.Optional[str]
An optional name of the author of the Studio project, this will be added as metadata to the mp3 file on Studio project or chapter download.
@@ -658,9 +658,9 @@ async def create(
quality_preset : typing.Optional[str]
Output quality of the generated audio. Must be one of:
standard - standard output format, 128kbps with 44.1kHz sample rate.
- high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side. Using this setting increases the credit cost by 20%.
- ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side. Using this setting increases the credit cost by 50%.
- ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format. Using this setting increases the credit cost by 100%.
+ high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side.
+ ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side.
+ ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format.
title : typing.Optional[str]
An optional name of the author of the Studio project, this will be added as metadata to the mp3 file on Studio project or chapter download.
diff --git a/src/elevenlabs/studio/projects/raw_client.py b/src/elevenlabs/studio/projects/raw_client.py
index 68c34340..a0d3371b 100644
--- a/src/elevenlabs/studio/projects/raw_client.py
+++ b/src/elevenlabs/studio/projects/raw_client.py
@@ -143,9 +143,9 @@ def create(
quality_preset : typing.Optional[str]
Output quality of the generated audio. Must be one of:
standard - standard output format, 128kbps with 44.1kHz sample rate.
- high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side. Using this setting increases the credit cost by 20%.
- ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side. Using this setting increases the credit cost by 50%.
- ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format. Using this setting increases the credit cost by 100%.
+ high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side.
+ ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side.
+ ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format.
title : typing.Optional[str]
An optional name of the author of the Studio project, this will be added as metadata to the mp3 file on Studio project or chapter download.
@@ -716,9 +716,9 @@ async def create(
quality_preset : typing.Optional[str]
Output quality of the generated audio. Must be one of:
standard - standard output format, 128kbps with 44.1kHz sample rate.
- high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side. Using this setting increases the credit cost by 20%.
- ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side. Using this setting increases the credit cost by 50%.
- ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format. Using this setting increases the credit cost by 100%.
+ high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side.
+ ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side.
+ ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format.
title : typing.Optional[str]
An optional name of the author of the Studio project, this will be added as metadata to the mp3 file on Studio project or chapter download.
diff --git a/src/elevenlabs/studio/raw_client.py b/src/elevenlabs/studio/raw_client.py
index 58079146..de79242e 100644
--- a/src/elevenlabs/studio/raw_client.py
+++ b/src/elevenlabs/studio/raw_client.py
@@ -70,9 +70,9 @@ def create_podcast(
quality_preset : typing.Optional[BodyCreatePodcastV1StudioPodcastsPostQualityPreset]
Output quality of the generated audio. Must be one of:
standard - standard output format, 128kbps with 44.1kHz sample rate.
- high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side. Using this setting increases the credit cost by 20%.
- ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side. Using this setting increases the credit cost by 50%.
- ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format. Using this setting increases the credit cost by 100%.
+ high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side.
+ ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side.
+ ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format.
duration_scale : typing.Optional[BodyCreatePodcastV1StudioPodcastsPostDurationScale]
Duration of the generated podcast. Must be one of:
@@ -265,9 +265,9 @@ async def create_podcast(
quality_preset : typing.Optional[BodyCreatePodcastV1StudioPodcastsPostQualityPreset]
Output quality of the generated audio. Must be one of:
standard - standard output format, 128kbps with 44.1kHz sample rate.
- high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side. Using this setting increases the credit cost by 20%.
- ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side. Using this setting increases the credit cost by 50%.
- ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format. Using this setting increases the credit cost by 100%.
+ high - high quality output format, 192kbps with 44.1kHz sample rate and major improvements on our side.
+ ultra - ultra quality output format, 192kbps with 44.1kHz sample rate and highest improvements on our side.
+ ultra lossless - ultra quality output format, 705.6kbps with 44.1kHz sample rate and highest improvements on our side in a fully lossless format.
duration_scale : typing.Optional[BodyCreatePodcastV1StudioPodcastsPostDurationScale]
Duration of the generated podcast. Must be one of:
diff --git a/src/elevenlabs/text_to_voice/client.py b/src/elevenlabs/text_to_voice/client.py
index db7a8a51..28c2e09d 100644
--- a/src/elevenlabs/text_to_voice/client.py
+++ b/src/elevenlabs/text_to_voice/client.py
@@ -48,6 +48,7 @@ def create_previews(
quality: typing.Optional[float] = OMIT,
seed: typing.Optional[int] = OMIT,
guidance_scale: typing.Optional[float] = OMIT,
+ should_enhance: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> VoiceDesignPreviewResponse:
"""
@@ -79,6 +80,9 @@ def create_previews(
guidance_scale : typing.Optional[float]
Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale.
+ should_enhance : typing.Optional[bool]
+ Whether to enhance the voice description using AI to add more detail and improve voice generation quality. When enabled, the system will automatically expand simple prompts into more detailed voice descriptions. Defaults to False
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -108,6 +112,7 @@ def create_previews(
quality=quality,
seed=seed,
guidance_scale=guidance_scale,
+ should_enhance=should_enhance,
request_options=request_options,
)
return _response.data
@@ -185,6 +190,7 @@ def design(
seed: typing.Optional[int] = OMIT,
guidance_scale: typing.Optional[float] = OMIT,
stream_previews: typing.Optional[bool] = OMIT,
+ should_enhance: typing.Optional[bool] = OMIT,
remixing_session_id: typing.Optional[str] = OMIT,
remixing_session_iteration_id: typing.Optional[str] = OMIT,
quality: typing.Optional[float] = OMIT,
@@ -224,6 +230,9 @@ def design(
stream_previews : typing.Optional[bool]
Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint.
+ should_enhance : typing.Optional[bool]
+ Whether to enhance the voice description using AI to add more detail and improve voice generation quality. When enabled, the system will automatically expand simple prompts into more detailed voice descriptions. Defaults to False
+
remixing_session_id : typing.Optional[str]
The remixing session id.
@@ -269,6 +278,7 @@ def design(
seed=seed,
guidance_scale=guidance_scale,
stream_previews=stream_previews,
+ should_enhance=should_enhance,
remixing_session_id=remixing_session_id,
remixing_session_iteration_id=remixing_session_iteration_id,
quality=quality,
@@ -411,6 +421,7 @@ async def create_previews(
quality: typing.Optional[float] = OMIT,
seed: typing.Optional[int] = OMIT,
guidance_scale: typing.Optional[float] = OMIT,
+ should_enhance: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> VoiceDesignPreviewResponse:
"""
@@ -442,6 +453,9 @@ async def create_previews(
guidance_scale : typing.Optional[float]
Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale.
+ should_enhance : typing.Optional[bool]
+ Whether to enhance the voice description using AI to add more detail and improve voice generation quality. When enabled, the system will automatically expand simple prompts into more detailed voice descriptions. Defaults to False
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -479,6 +493,7 @@ async def main() -> None:
quality=quality,
seed=seed,
guidance_scale=guidance_scale,
+ should_enhance=should_enhance,
request_options=request_options,
)
return _response.data
@@ -564,6 +579,7 @@ async def design(
seed: typing.Optional[int] = OMIT,
guidance_scale: typing.Optional[float] = OMIT,
stream_previews: typing.Optional[bool] = OMIT,
+ should_enhance: typing.Optional[bool] = OMIT,
remixing_session_id: typing.Optional[str] = OMIT,
remixing_session_iteration_id: typing.Optional[str] = OMIT,
quality: typing.Optional[float] = OMIT,
@@ -603,6 +619,9 @@ async def design(
stream_previews : typing.Optional[bool]
Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint.
+ should_enhance : typing.Optional[bool]
+ Whether to enhance the voice description using AI to add more detail and improve voice generation quality. When enabled, the system will automatically expand simple prompts into more detailed voice descriptions. Defaults to False
+
remixing_session_id : typing.Optional[str]
The remixing session id.
@@ -656,6 +675,7 @@ async def main() -> None:
seed=seed,
guidance_scale=guidance_scale,
stream_previews=stream_previews,
+ should_enhance=should_enhance,
remixing_session_id=remixing_session_id,
remixing_session_iteration_id=remixing_session_iteration_id,
quality=quality,
diff --git a/src/elevenlabs/text_to_voice/raw_client.py b/src/elevenlabs/text_to_voice/raw_client.py
index c875befb..2524bce3 100644
--- a/src/elevenlabs/text_to_voice/raw_client.py
+++ b/src/elevenlabs/text_to_voice/raw_client.py
@@ -37,6 +37,7 @@ def create_previews(
quality: typing.Optional[float] = OMIT,
seed: typing.Optional[int] = OMIT,
guidance_scale: typing.Optional[float] = OMIT,
+ should_enhance: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[VoiceDesignPreviewResponse]:
"""
@@ -68,6 +69,9 @@ def create_previews(
guidance_scale : typing.Optional[float]
Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale.
+ should_enhance : typing.Optional[bool]
+ Whether to enhance the voice description using AI to add more detail and improve voice generation quality. When enabled, the system will automatically expand simple prompts into more detailed voice descriptions. Defaults to False
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -90,6 +94,7 @@ def create_previews(
"quality": quality,
"seed": seed,
"guidance_scale": guidance_scale,
+ "should_enhance": should_enhance,
},
headers={
"content-type": "application/json",
@@ -215,6 +220,7 @@ def design(
seed: typing.Optional[int] = OMIT,
guidance_scale: typing.Optional[float] = OMIT,
stream_previews: typing.Optional[bool] = OMIT,
+ should_enhance: typing.Optional[bool] = OMIT,
remixing_session_id: typing.Optional[str] = OMIT,
remixing_session_iteration_id: typing.Optional[str] = OMIT,
quality: typing.Optional[float] = OMIT,
@@ -254,6 +260,9 @@ def design(
stream_previews : typing.Optional[bool]
Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint.
+ should_enhance : typing.Optional[bool]
+ Whether to enhance the voice description using AI to add more detail and improve voice generation quality. When enabled, the system will automatically expand simple prompts into more detailed voice descriptions. Defaults to False
+
remixing_session_id : typing.Optional[str]
The remixing session id.
@@ -292,6 +301,7 @@ def design(
"seed": seed,
"guidance_scale": guidance_scale,
"stream_previews": stream_previews,
+ "should_enhance": should_enhance,
"remixing_session_id": remixing_session_id,
"remixing_session_iteration_id": remixing_session_iteration_id,
"quality": quality,
@@ -462,6 +472,7 @@ async def create_previews(
quality: typing.Optional[float] = OMIT,
seed: typing.Optional[int] = OMIT,
guidance_scale: typing.Optional[float] = OMIT,
+ should_enhance: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[VoiceDesignPreviewResponse]:
"""
@@ -493,6 +504,9 @@ async def create_previews(
guidance_scale : typing.Optional[float]
Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale.
+ should_enhance : typing.Optional[bool]
+ Whether to enhance the voice description using AI to add more detail and improve voice generation quality. When enabled, the system will automatically expand simple prompts into more detailed voice descriptions. Defaults to False
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -515,6 +529,7 @@ async def create_previews(
"quality": quality,
"seed": seed,
"guidance_scale": guidance_scale,
+ "should_enhance": should_enhance,
},
headers={
"content-type": "application/json",
@@ -640,6 +655,7 @@ async def design(
seed: typing.Optional[int] = OMIT,
guidance_scale: typing.Optional[float] = OMIT,
stream_previews: typing.Optional[bool] = OMIT,
+ should_enhance: typing.Optional[bool] = OMIT,
remixing_session_id: typing.Optional[str] = OMIT,
remixing_session_iteration_id: typing.Optional[str] = OMIT,
quality: typing.Optional[float] = OMIT,
@@ -679,6 +695,9 @@ async def design(
stream_previews : typing.Optional[bool]
Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint.
+ should_enhance : typing.Optional[bool]
+ Whether to enhance the voice description using AI to add more detail and improve voice generation quality. When enabled, the system will automatically expand simple prompts into more detailed voice descriptions. Defaults to False
+
remixing_session_id : typing.Optional[str]
The remixing session id.
@@ -717,6 +736,7 @@ async def design(
"seed": seed,
"guidance_scale": guidance_scale,
"stream_previews": stream_previews,
+ "should_enhance": should_enhance,
"remixing_session_id": remixing_session_id,
"remixing_session_iteration_id": remixing_session_iteration_id,
"quality": quality,
diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py
index cdd03d5a..71143c83 100644
--- a/src/elevenlabs/types/__init__.py
+++ b/src/elevenlabs/types/__init__.py
@@ -1026,6 +1026,7 @@
from .get_unit_test_response_model_dynamic_variables_value import GetUnitTestResponseModelDynamicVariablesValue
from .get_voices_response import GetVoicesResponse
from .get_voices_v_2_response import GetVoicesV2Response
+ from .get_whats_app_account_response import GetWhatsAppAccountResponse
from .get_workspace_secrets_response_model import GetWorkspaceSecretsResponseModel
from .guardrails_v_1_input import GuardrailsV1Input
from .guardrails_v_1_output import GuardrailsV1Output
@@ -1035,10 +1036,12 @@
from .html_export_options import HtmlExportOptions
from .http_validation_error import HttpValidationError
from .image_avatar import ImageAvatar
+ from .import_whats_app_account_response import ImportWhatsAppAccountResponse
from .inbound_sip_trunk_config_request_model import InboundSipTrunkConfigRequestModel
from .integration_type import IntegrationType
from .invoice_response import InvoiceResponse
from .invoice_response_model_payment_intent_status import InvoiceResponseModelPaymentIntentStatus
+ from .knowledge_base_dependent_type import KnowledgeBaseDependentType
from .knowledge_base_document_chunk_response_model import KnowledgeBaseDocumentChunkResponseModel
from .knowledge_base_document_metadata_response_model import KnowledgeBaseDocumentMetadataResponseModel
from .knowledge_base_document_type import KnowledgeBaseDocumentType
@@ -1064,6 +1067,7 @@
from .library_voice_response_model_category import LibraryVoiceResponseModelCategory
from .list_mcp_tools_response_model import ListMcpToolsResponseModel
from .list_response_meta import ListResponseMeta
+ from .list_whats_app_accounts_response import ListWhatsAppAccountsResponse
from .literal_json_schema_property import LiteralJsonSchemaProperty
from .literal_json_schema_property_constant_value import LiteralJsonSchemaPropertyConstantValue
from .literal_json_schema_property_type import LiteralJsonSchemaPropertyType
@@ -1528,6 +1532,7 @@
from .webhook_usage_type import WebhookUsageType
from .whats_app_conversation_info import WhatsAppConversationInfo
from .whats_app_conversation_info_direction import WhatsAppConversationInfoDirection
+ from .whats_app_outbound_call_response import WhatsAppOutboundCallResponse
from .widget_config import WidgetConfig
from .widget_config_input_avatar import (
WidgetConfigInputAvatar,
@@ -1556,6 +1561,7 @@
from .widget_language_preset_response import WidgetLanguagePresetResponse
from .widget_placement import WidgetPlacement
from .widget_styles import WidgetStyles
+ from .widget_terms_translation import WidgetTermsTranslation
from .widget_text_contents import WidgetTextContents
from .word_timestamp import WordTimestamp
from .workflow_edge_model_input import WorkflowEdgeModelInput
@@ -2543,6 +2549,7 @@
"GetUnitTestResponseModelDynamicVariablesValue": ".get_unit_test_response_model_dynamic_variables_value",
"GetVoicesResponse": ".get_voices_response",
"GetVoicesV2Response": ".get_voices_v_2_response",
+ "GetWhatsAppAccountResponse": ".get_whats_app_account_response",
"GetWorkspaceSecretsResponseModel": ".get_workspace_secrets_response_model",
"GuardrailsV1Input": ".guardrails_v_1_input",
"GuardrailsV1Output": ".guardrails_v_1_output",
@@ -2552,10 +2559,12 @@
"HtmlExportOptions": ".html_export_options",
"HttpValidationError": ".http_validation_error",
"ImageAvatar": ".image_avatar",
+ "ImportWhatsAppAccountResponse": ".import_whats_app_account_response",
"InboundSipTrunkConfigRequestModel": ".inbound_sip_trunk_config_request_model",
"IntegrationType": ".integration_type",
"InvoiceResponse": ".invoice_response",
"InvoiceResponseModelPaymentIntentStatus": ".invoice_response_model_payment_intent_status",
+ "KnowledgeBaseDependentType": ".knowledge_base_dependent_type",
"KnowledgeBaseDocumentChunkResponseModel": ".knowledge_base_document_chunk_response_model",
"KnowledgeBaseDocumentMetadataResponseModel": ".knowledge_base_document_metadata_response_model",
"KnowledgeBaseDocumentType": ".knowledge_base_document_type",
@@ -2579,6 +2588,7 @@
"LibraryVoiceResponseModelCategory": ".library_voice_response_model_category",
"ListMcpToolsResponseModel": ".list_mcp_tools_response_model",
"ListResponseMeta": ".list_response_meta",
+ "ListWhatsAppAccountsResponse": ".list_whats_app_accounts_response",
"LiteralJsonSchemaProperty": ".literal_json_schema_property",
"LiteralJsonSchemaPropertyConstantValue": ".literal_json_schema_property_constant_value",
"LiteralJsonSchemaPropertyType": ".literal_json_schema_property_type",
@@ -2999,6 +3009,7 @@
"WebhookUsageType": ".webhook_usage_type",
"WhatsAppConversationInfo": ".whats_app_conversation_info",
"WhatsAppConversationInfoDirection": ".whats_app_conversation_info_direction",
+ "WhatsAppOutboundCallResponse": ".whats_app_outbound_call_response",
"WidgetConfig": ".widget_config",
"WidgetConfigInputAvatar": ".widget_config_input_avatar",
"WidgetConfigInputAvatar_Image": ".widget_config_input_avatar",
@@ -3021,6 +3032,7 @@
"WidgetLanguagePresetResponse": ".widget_language_preset_response",
"WidgetPlacement": ".widget_placement",
"WidgetStyles": ".widget_styles",
+ "WidgetTermsTranslation": ".widget_terms_translation",
"WidgetTextContents": ".widget_text_contents",
"WordTimestamp": ".word_timestamp",
"WorkflowEdgeModelInput": ".workflow_edge_model_input",
@@ -4008,6 +4020,7 @@ def __dir__():
"GetUnitTestResponseModelDynamicVariablesValue",
"GetVoicesResponse",
"GetVoicesV2Response",
+ "GetWhatsAppAccountResponse",
"GetWorkspaceSecretsResponseModel",
"GuardrailsV1Input",
"GuardrailsV1Output",
@@ -4017,10 +4030,12 @@ def __dir__():
"HtmlExportOptions",
"HttpValidationError",
"ImageAvatar",
+ "ImportWhatsAppAccountResponse",
"InboundSipTrunkConfigRequestModel",
"IntegrationType",
"InvoiceResponse",
"InvoiceResponseModelPaymentIntentStatus",
+ "KnowledgeBaseDependentType",
"KnowledgeBaseDocumentChunkResponseModel",
"KnowledgeBaseDocumentMetadataResponseModel",
"KnowledgeBaseDocumentType",
@@ -4044,6 +4059,7 @@ def __dir__():
"LibraryVoiceResponseModelCategory",
"ListMcpToolsResponseModel",
"ListResponseMeta",
+ "ListWhatsAppAccountsResponse",
"LiteralJsonSchemaProperty",
"LiteralJsonSchemaPropertyConstantValue",
"LiteralJsonSchemaPropertyType",
@@ -4464,6 +4480,7 @@ def __dir__():
"WebhookUsageType",
"WhatsAppConversationInfo",
"WhatsAppConversationInfoDirection",
+ "WhatsAppOutboundCallResponse",
"WidgetConfig",
"WidgetConfigInputAvatar",
"WidgetConfigInputAvatar_Image",
@@ -4486,6 +4503,7 @@ def __dir__():
"WidgetLanguagePresetResponse",
"WidgetPlacement",
"WidgetStyles",
+ "WidgetTermsTranslation",
"WidgetTextContents",
"WordTimestamp",
"WorkflowEdgeModelInput",
diff --git a/src/elevenlabs/types/authorization_method.py b/src/elevenlabs/types/authorization_method.py
index ee4c8443..2e41dc23 100644
--- a/src/elevenlabs/types/authorization_method.py
+++ b/src/elevenlabs/types/authorization_method.py
@@ -12,6 +12,7 @@
"livekit_token",
"livekit_token_website",
"genesys_api_key",
+ "whatsapp",
],
typing.Any,
]
diff --git a/src/elevenlabs/types/batch_call_detailed_response.py b/src/elevenlabs/types/batch_call_detailed_response.py
index 396ffb8c..2e7db22d 100644
--- a/src/elevenlabs/types/batch_call_detailed_response.py
+++ b/src/elevenlabs/types/batch_call_detailed_response.py
@@ -6,6 +6,7 @@
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .batch_call_status import BatchCallStatus
+from .batch_call_whats_app_params import BatchCallWhatsAppParams
from .outbound_call_recipient_response_model import OutboundCallRecipientResponseModel
from .telephony_provider import TelephonyProvider
@@ -18,15 +19,17 @@ class BatchCallDetailedResponse(UncheckedBaseModel):
id: str
phone_number_id: typing.Optional[str] = None
phone_provider: typing.Optional[TelephonyProvider] = None
+ whatsapp_params: typing.Optional[BatchCallWhatsAppParams] = None
name: str
agent_id: str
created_at_unix: int
scheduled_time_unix: int
total_calls_dispatched: int
total_calls_scheduled: int
+ total_calls_finished: int
last_updated_at_unix: int
status: BatchCallStatus
- retry_count: typing.Optional[int] = None
+ retry_count: int
agent_name: str
recipients: typing.List[OutboundCallRecipientResponseModel]
diff --git a/src/elevenlabs/types/batch_call_recipient_status.py b/src/elevenlabs/types/batch_call_recipient_status.py
index c3603624..c3e2e9e3 100644
--- a/src/elevenlabs/types/batch_call_recipient_status.py
+++ b/src/elevenlabs/types/batch_call_recipient_status.py
@@ -3,5 +3,8 @@
import typing
BatchCallRecipientStatus = typing.Union[
- typing.Literal["pending", "initiated", "in_progress", "completed", "failed", "cancelled", "voicemail"], typing.Any
+ typing.Literal[
+ "pending", "dispatched", "initiated", "in_progress", "completed", "failed", "cancelled", "voicemail"
+ ],
+ typing.Any,
]
diff --git a/src/elevenlabs/types/batch_call_response.py b/src/elevenlabs/types/batch_call_response.py
index 81f6ddb3..54699f42 100644
--- a/src/elevenlabs/types/batch_call_response.py
+++ b/src/elevenlabs/types/batch_call_response.py
@@ -6,6 +6,7 @@
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .batch_call_status import BatchCallStatus
+from .batch_call_whats_app_params import BatchCallWhatsAppParams
from .telephony_provider import TelephonyProvider
@@ -13,15 +14,17 @@ class BatchCallResponse(UncheckedBaseModel):
id: str
phone_number_id: typing.Optional[str] = None
phone_provider: typing.Optional[TelephonyProvider] = None
+ whatsapp_params: typing.Optional[BatchCallWhatsAppParams] = None
name: str
agent_id: str
created_at_unix: int
scheduled_time_unix: int
total_calls_dispatched: int
total_calls_scheduled: int
+ total_calls_finished: int
last_updated_at_unix: int
status: BatchCallStatus
- retry_count: typing.Optional[int] = None
+ retry_count: int
agent_name: str
if IS_PYDANTIC_V2:
diff --git a/src/elevenlabs/types/conv_ai_stored_secret_dependencies_agents_item.py b/src/elevenlabs/types/conv_ai_stored_secret_dependencies_agents_item.py
index ccb26654..236d5885 100644
--- a/src/elevenlabs/types/conv_ai_stored_secret_dependencies_agents_item.py
+++ b/src/elevenlabs/types/conv_ai_stored_secret_dependencies_agents_item.py
@@ -13,6 +13,7 @@
class ConvAiStoredSecretDependenciesAgentsItem_Available(UncheckedBaseModel):
type: typing.Literal["available"] = "available"
+ referenced_resource_ids: typing.Optional[typing.List[str]] = None
id: str
name: str
created_at_unix_secs: int
@@ -30,6 +31,7 @@ class Config:
class ConvAiStoredSecretDependenciesAgentsItem_Unknown(UncheckedBaseModel):
type: typing.Literal["unknown"] = "unknown"
+ referenced_resource_ids: typing.Optional[typing.List[str]] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/elevenlabs/types/conversation_config.py b/src/elevenlabs/types/conversation_config.py
index add8d6f9..0bdddf02 100644
--- a/src/elevenlabs/types/conversation_config.py
+++ b/src/elevenlabs/types/conversation_config.py
@@ -24,6 +24,16 @@ class ConversationConfig(UncheckedBaseModel):
The events that will be sent to the client
"""
+ monitoring_enabled: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Enable real-time monitoring of conversations via WebSocket
+ """
+
+ monitoring_events: typing.Optional[typing.List[ClientEvent]] = pydantic.Field(default=None)
+ """
+ The events that will be sent to monitoring connections.
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/elevenlabs/types/conversation_config_workflow_override.py b/src/elevenlabs/types/conversation_config_workflow_override.py
index 0fbaa739..e5ccdbaf 100644
--- a/src/elevenlabs/types/conversation_config_workflow_override.py
+++ b/src/elevenlabs/types/conversation_config_workflow_override.py
@@ -24,6 +24,16 @@ class ConversationConfigWorkflowOverride(UncheckedBaseModel):
The events that will be sent to the client
"""
+ monitoring_enabled: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Enable real-time monitoring of conversations via WebSocket
+ """
+
+ monitoring_events: typing.Optional[typing.List[ClientEvent]] = pydantic.Field(default=None)
+ """
+ The events that will be sent to monitoring connections.
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/elevenlabs/types/conversation_summary_response_model.py b/src/elevenlabs/types/conversation_summary_response_model.py
index b4ea5f60..ab4493d2 100644
--- a/src/elevenlabs/types/conversation_summary_response_model.py
+++ b/src/elevenlabs/types/conversation_summary_response_model.py
@@ -13,6 +13,7 @@
class ConversationSummaryResponseModel(UncheckedBaseModel):
agent_id: str
branch_id: typing.Optional[str] = None
+ version_id: typing.Optional[str] = None
agent_name: typing.Optional[str] = None
conversation_id: str
start_time_unix_secs: int
diff --git a/src/elevenlabs/types/dependent_available_agent_identifier.py b/src/elevenlabs/types/dependent_available_agent_identifier.py
index 8b12f479..645d87f1 100644
--- a/src/elevenlabs/types/dependent_available_agent_identifier.py
+++ b/src/elevenlabs/types/dependent_available_agent_identifier.py
@@ -9,6 +9,11 @@
class DependentAvailableAgentIdentifier(UncheckedBaseModel):
+ referenced_resource_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ If the agent is a transitive dependent, contains IDs of the resources that the agent depends on directly.
+ """
+
id: str
name: str
created_at_unix_secs: int
diff --git a/src/elevenlabs/types/dependent_unknown_agent_identifier.py b/src/elevenlabs/types/dependent_unknown_agent_identifier.py
index 04c307ae..5644f144 100644
--- a/src/elevenlabs/types/dependent_unknown_agent_identifier.py
+++ b/src/elevenlabs/types/dependent_unknown_agent_identifier.py
@@ -13,6 +13,11 @@ class DependentUnknownAgentIdentifier(UncheckedBaseModel):
to which the user has no direct access.
"""
+ referenced_resource_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ If the agent is a transitive dependent, contains IDs of the resources that the agent depends on directly.
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/elevenlabs/types/features_usage_common_model.py b/src/elevenlabs/types/features_usage_common_model.py
index 0ef0a32f..6f7f8115 100644
--- a/src/elevenlabs/types/features_usage_common_model.py
+++ b/src/elevenlabs/types/features_usage_common_model.py
@@ -24,6 +24,7 @@ class FeaturesUsageCommonModel(UncheckedBaseModel):
voicemail_detection: typing.Optional[FeatureStatusCommonModel] = None
workflow: typing.Optional[WorkflowFeaturesUsageCommonModel] = None
agent_testing: typing.Optional[TestsFeatureUsageCommonModel] = None
+ versioning: typing.Optional[FeatureStatusCommonModel] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/elevenlabs/types/get_agent_response_model.py b/src/elevenlabs/types/get_agent_response_model.py
index 46c1b68b..fd5d4536 100644
--- a/src/elevenlabs/types/get_agent_response_model.py
+++ b/src/elevenlabs/types/get_agent_response_model.py
@@ -61,6 +61,21 @@ class GetAgentResponseModel(UncheckedBaseModel):
Agent tags used to categorize the agent
"""
+ version_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The ID of the version the agent is on
+ """
+
+ branch_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The ID of the branch the agent is on
+ """
+
+ main_branch_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The ID of the main branch for this agent
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/elevenlabs/types/get_conversation_response_model.py b/src/elevenlabs/types/get_conversation_response_model.py
index 93175661..34ecd1ca 100644
--- a/src/elevenlabs/types/get_conversation_response_model.py
+++ b/src/elevenlabs/types/get_conversation_response_model.py
@@ -20,6 +20,11 @@ class GetConversationResponseModel(UncheckedBaseModel):
status: GetConversationResponseModelStatus
user_id: typing.Optional[str] = None
branch_id: typing.Optional[str] = None
+ version_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The ID of the agent version used for this conversation
+ """
+
transcript: typing.List[ConversationHistoryTranscriptCommonModelOutput]
metadata: ConversationHistoryMetadataCommonModel
analysis: typing.Optional[ConversationHistoryAnalysisCommonModel] = None
diff --git a/src/elevenlabs/types/get_knowledge_base_dependent_agents_response_model_agents_item.py b/src/elevenlabs/types/get_knowledge_base_dependent_agents_response_model_agents_item.py
index 2e5e2123..3f73e755 100644
--- a/src/elevenlabs/types/get_knowledge_base_dependent_agents_response_model_agents_item.py
+++ b/src/elevenlabs/types/get_knowledge_base_dependent_agents_response_model_agents_item.py
@@ -13,6 +13,7 @@
class GetKnowledgeBaseDependentAgentsResponseModelAgentsItem_Available(UncheckedBaseModel):
type: typing.Literal["available"] = "available"
+ referenced_resource_ids: typing.Optional[typing.List[str]] = None
id: str
name: str
created_at_unix_secs: int
@@ -30,6 +31,7 @@ class Config:
class GetKnowledgeBaseDependentAgentsResponseModelAgentsItem_Unknown(UncheckedBaseModel):
type: typing.Literal["unknown"] = "unknown"
+ referenced_resource_ids: typing.Optional[typing.List[str]] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/elevenlabs/types/get_knowledge_base_summary_file_response_model.py b/src/elevenlabs/types/get_knowledge_base_summary_file_response_model.py
index da08e620..f2c6ce26 100644
--- a/src/elevenlabs/types/get_knowledge_base_summary_file_response_model.py
+++ b/src/elevenlabs/types/get_knowledge_base_summary_file_response_model.py
@@ -24,7 +24,10 @@ class GetKnowledgeBaseSummaryFileResponseModel(UncheckedBaseModel):
The ID of the parent folder, or null if the document is at the root level.
"""
- dependent_agents: typing.List[GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem]
+ dependent_agents: typing.List[GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem] = pydantic.Field()
+ """
+ This field is deprecated and will be removed in the future, use the separate endpoint to get dependent agents instead.
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/elevenlabs/types/get_knowledge_base_summary_file_response_model_dependent_agents_item.py b/src/elevenlabs/types/get_knowledge_base_summary_file_response_model_dependent_agents_item.py
index 426ff77f..0299ddae 100644
--- a/src/elevenlabs/types/get_knowledge_base_summary_file_response_model_dependent_agents_item.py
+++ b/src/elevenlabs/types/get_knowledge_base_summary_file_response_model_dependent_agents_item.py
@@ -13,6 +13,7 @@
class GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem_Available(UncheckedBaseModel):
type: typing.Literal["available"] = "available"
+ referenced_resource_ids: typing.Optional[typing.List[str]] = None
id: str
name: str
created_at_unix_secs: int
@@ -30,6 +31,7 @@ class Config:
class GetKnowledgeBaseSummaryFileResponseModelDependentAgentsItem_Unknown(UncheckedBaseModel):
type: typing.Literal["unknown"] = "unknown"
+ referenced_resource_ids: typing.Optional[typing.List[str]] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/elevenlabs/types/get_knowledge_base_summary_folder_response_model.py b/src/elevenlabs/types/get_knowledge_base_summary_folder_response_model.py
index 8c0219e3..ec6d9518 100644
--- a/src/elevenlabs/types/get_knowledge_base_summary_folder_response_model.py
+++ b/src/elevenlabs/types/get_knowledge_base_summary_folder_response_model.py
@@ -24,7 +24,11 @@ class GetKnowledgeBaseSummaryFolderResponseModel(UncheckedBaseModel):
The ID of the parent folder, or null if the document is at the root level.
"""
- dependent_agents: typing.List[GetKnowledgeBaseSummaryFolderResponseModelDependentAgentsItem]
+ dependent_agents: typing.List[GetKnowledgeBaseSummaryFolderResponseModelDependentAgentsItem] = pydantic.Field()
+ """
+ This field is deprecated and will be removed in the future, use the separate endpoint to get dependent agents instead.
+ """
+
children_count: int
if IS_PYDANTIC_V2:
diff --git a/src/elevenlabs/types/get_knowledge_base_summary_folder_response_model_dependent_agents_item.py b/src/elevenlabs/types/get_knowledge_base_summary_folder_response_model_dependent_agents_item.py
index a45c6708..2526388c 100644
--- a/src/elevenlabs/types/get_knowledge_base_summary_folder_response_model_dependent_agents_item.py
+++ b/src/elevenlabs/types/get_knowledge_base_summary_folder_response_model_dependent_agents_item.py
@@ -13,6 +13,7 @@
class GetKnowledgeBaseSummaryFolderResponseModelDependentAgentsItem_Available(UncheckedBaseModel):
type: typing.Literal["available"] = "available"
+ referenced_resource_ids: typing.Optional[typing.List[str]] = None
id: str
name: str
created_at_unix_secs: int
@@ -30,6 +31,7 @@ class Config:
class GetKnowledgeBaseSummaryFolderResponseModelDependentAgentsItem_Unknown(UncheckedBaseModel):
type: typing.Literal["unknown"] = "unknown"
+ referenced_resource_ids: typing.Optional[typing.List[str]] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/elevenlabs/types/get_knowledge_base_summary_text_response_model.py b/src/elevenlabs/types/get_knowledge_base_summary_text_response_model.py
index e73dc9d8..159ae1ad 100644
--- a/src/elevenlabs/types/get_knowledge_base_summary_text_response_model.py
+++ b/src/elevenlabs/types/get_knowledge_base_summary_text_response_model.py
@@ -24,7 +24,10 @@ class GetKnowledgeBaseSummaryTextResponseModel(UncheckedBaseModel):
The ID of the parent folder, or null if the document is at the root level.
"""
- dependent_agents: typing.List[GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem]
+ dependent_agents: typing.List[GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem] = pydantic.Field()
+ """
+ This field is deprecated and will be removed in the future, use the separate endpoint to get dependent agents instead.
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/elevenlabs/types/get_knowledge_base_summary_text_response_model_dependent_agents_item.py b/src/elevenlabs/types/get_knowledge_base_summary_text_response_model_dependent_agents_item.py
index 945bc172..3e844622 100644
--- a/src/elevenlabs/types/get_knowledge_base_summary_text_response_model_dependent_agents_item.py
+++ b/src/elevenlabs/types/get_knowledge_base_summary_text_response_model_dependent_agents_item.py
@@ -13,6 +13,7 @@
class GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem_Available(UncheckedBaseModel):
type: typing.Literal["available"] = "available"
+ referenced_resource_ids: typing.Optional[typing.List[str]] = None
id: str
name: str
created_at_unix_secs: int
@@ -30,6 +31,7 @@ class Config:
class GetKnowledgeBaseSummaryTextResponseModelDependentAgentsItem_Unknown(UncheckedBaseModel):
type: typing.Literal["unknown"] = "unknown"
+ referenced_resource_ids: typing.Optional[typing.List[str]] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/elevenlabs/types/get_knowledge_base_summary_url_response_model.py b/src/elevenlabs/types/get_knowledge_base_summary_url_response_model.py
index 9a17f7ef..90abf204 100644
--- a/src/elevenlabs/types/get_knowledge_base_summary_url_response_model.py
+++ b/src/elevenlabs/types/get_knowledge_base_summary_url_response_model.py
@@ -24,7 +24,11 @@ class GetKnowledgeBaseSummaryUrlResponseModel(UncheckedBaseModel):
The ID of the parent folder, or null if the document is at the root level.
"""
- dependent_agents: typing.List[GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem]
+ dependent_agents: typing.List[GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem] = pydantic.Field()
+ """
+ This field is deprecated and will be removed in the future, use the separate endpoint to get dependent agents instead.
+ """
+
url: str
if IS_PYDANTIC_V2:
diff --git a/src/elevenlabs/types/get_knowledge_base_summary_url_response_model_dependent_agents_item.py b/src/elevenlabs/types/get_knowledge_base_summary_url_response_model_dependent_agents_item.py
index 677f4da9..56f80206 100644
--- a/src/elevenlabs/types/get_knowledge_base_summary_url_response_model_dependent_agents_item.py
+++ b/src/elevenlabs/types/get_knowledge_base_summary_url_response_model_dependent_agents_item.py
@@ -13,6 +13,7 @@
class GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem_Available(UncheckedBaseModel):
type: typing.Literal["available"] = "available"
+ referenced_resource_ids: typing.Optional[typing.List[str]] = None
id: str
name: str
created_at_unix_secs: int
@@ -30,6 +31,7 @@ class Config:
class GetKnowledgeBaseSummaryUrlResponseModelDependentAgentsItem_Unknown(UncheckedBaseModel):
type: typing.Literal["unknown"] = "unknown"
+ referenced_resource_ids: typing.Optional[typing.List[str]] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/elevenlabs/types/get_tool_dependent_agents_response_model_agents_item.py b/src/elevenlabs/types/get_tool_dependent_agents_response_model_agents_item.py
index f9e0cc8e..4cd6ceba 100644
--- a/src/elevenlabs/types/get_tool_dependent_agents_response_model_agents_item.py
+++ b/src/elevenlabs/types/get_tool_dependent_agents_response_model_agents_item.py
@@ -13,6 +13,7 @@
class GetToolDependentAgentsResponseModelAgentsItem_Available(UncheckedBaseModel):
type: typing.Literal["available"] = "available"
+ referenced_resource_ids: typing.Optional[typing.List[str]] = None
id: str
name: str
created_at_unix_secs: int
@@ -30,6 +31,7 @@ class Config:
class GetToolDependentAgentsResponseModelAgentsItem_Unknown(UncheckedBaseModel):
type: typing.Literal["unknown"] = "unknown"
+ referenced_resource_ids: typing.Optional[typing.List[str]] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/elevenlabs/types/get_whats_app_account_response.py b/src/elevenlabs/types/get_whats_app_account_response.py
new file mode 100644
index 00000000..792314f4
--- /dev/null
+++ b/src/elevenlabs/types/get_whats_app_account_response.py
@@ -0,0 +1,26 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from ..core.unchecked_base_model import UncheckedBaseModel
+
+
+class GetWhatsAppAccountResponse(UncheckedBaseModel):
+ business_account_id: str
+ phone_number_id: str
+ business_account_name: str
+ phone_number_name: str
+ phone_number: str
+ assigned_agent_id: typing.Optional[str] = None
+ assigned_agent_name: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/elevenlabs/types/import_whats_app_account_response.py b/src/elevenlabs/types/import_whats_app_account_response.py
new file mode 100644
index 00000000..6ba89bfc
--- /dev/null
+++ b/src/elevenlabs/types/import_whats_app_account_response.py
@@ -0,0 +1,20 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from ..core.unchecked_base_model import UncheckedBaseModel
+
+
+class ImportWhatsAppAccountResponse(UncheckedBaseModel):
+ phone_number_id: str
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/elevenlabs/types/knowledge_base_dependent_type.py b/src/elevenlabs/types/knowledge_base_dependent_type.py
new file mode 100644
index 00000000..15e623a7
--- /dev/null
+++ b/src/elevenlabs/types/knowledge_base_dependent_type.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+KnowledgeBaseDependentType = typing.Union[typing.Literal["direct", "transitive", "all"], typing.Any]
diff --git a/src/elevenlabs/types/list_whats_app_accounts_response.py b/src/elevenlabs/types/list_whats_app_accounts_response.py
new file mode 100644
index 00000000..28ef1b57
--- /dev/null
+++ b/src/elevenlabs/types/list_whats_app_accounts_response.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from ..core.unchecked_base_model import UncheckedBaseModel
+from .get_whats_app_account_response import GetWhatsAppAccountResponse
+
+
+class ListWhatsAppAccountsResponse(UncheckedBaseModel):
+ items: typing.List[GetWhatsAppAccountResponse]
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/elevenlabs/types/llm.py b/src/elevenlabs/types/llm.py
index ce3a0163..3db61624 100644
--- a/src/elevenlabs/types/llm.py
+++ b/src/elevenlabs/types/llm.py
@@ -13,6 +13,8 @@
"gpt-4.1-nano",
"gpt-5",
"gpt-5.1",
+ "gpt-5.2",
+ "gpt-5.2-chat-latest",
"gpt-5-mini",
"gpt-5-nano",
"gpt-3.5-turbo",
@@ -23,6 +25,7 @@
"gemini-2.5-flash-lite",
"gemini-2.5-flash",
"gemini-3-pro-preview",
+ "gemini-3-flash-preview",
"claude-sonnet-4-5",
"claude-sonnet-4",
"claude-haiku-4-5",
@@ -57,6 +60,7 @@
"claude-3-haiku@20240307",
"gpt-5-2025-08-07",
"gpt-5.1-2025-11-13",
+ "gpt-5.2-2025-12-11",
"gpt-5-mini-2025-08-07",
"gpt-5-nano-2025-08-07",
"gpt-4.1-2025-04-14",
diff --git a/src/elevenlabs/types/mcp_server_config_input.py b/src/elevenlabs/types/mcp_server_config_input.py
index 65a8d3af..e2c8f205 100644
--- a/src/elevenlabs/types/mcp_server_config_input.py
+++ b/src/elevenlabs/types/mcp_server_config_input.py
@@ -78,6 +78,11 @@ class McpServerConfigInput(UncheckedBaseModel):
List of per-tool configuration overrides that override the server-level defaults for specific tools
"""
+ disable_compression: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Whether to disable HTTP compression for this MCP server. Enable this if the server does not support compressed responses.
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/elevenlabs/types/mcp_server_config_output.py b/src/elevenlabs/types/mcp_server_config_output.py
index 2df67115..f2efc9f4 100644
--- a/src/elevenlabs/types/mcp_server_config_output.py
+++ b/src/elevenlabs/types/mcp_server_config_output.py
@@ -78,6 +78,11 @@ class McpServerConfigOutput(UncheckedBaseModel):
List of per-tool configuration overrides that override the server-level defaults for specific tools
"""
+ disable_compression: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Whether to disable HTTP compression for this MCP server. Enable this if the server does not support compressed responses.
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/elevenlabs/types/mcp_server_response_model_dependent_agents_item.py b/src/elevenlabs/types/mcp_server_response_model_dependent_agents_item.py
index 4f7bde68..c0a2f611 100644
--- a/src/elevenlabs/types/mcp_server_response_model_dependent_agents_item.py
+++ b/src/elevenlabs/types/mcp_server_response_model_dependent_agents_item.py
@@ -13,6 +13,7 @@
class McpServerResponseModelDependentAgentsItem_Available(UncheckedBaseModel):
type: typing.Literal["available"] = "available"
+ referenced_resource_ids: typing.Optional[typing.List[str]] = None
id: str
name: str
created_at_unix_secs: int
@@ -30,6 +31,7 @@ class Config:
class McpServerResponseModelDependentAgentsItem_Unknown(UncheckedBaseModel):
type: typing.Literal["unknown"] = "unknown"
+ referenced_resource_ids: typing.Optional[typing.List[str]] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/elevenlabs/types/project_extended_response_model_assets_item.py b/src/elevenlabs/types/project_extended_response_model_assets_item.py
index f4e81667..ff2da618 100644
--- a/src/elevenlabs/types/project_extended_response_model_assets_item.py
+++ b/src/elevenlabs/types/project_extended_response_model_assets_item.py
@@ -16,7 +16,7 @@ class ProjectExtendedResponseModelAssetsItem_Video(UncheckedBaseModel):
type: typing.Literal["video"] = "video"
video_id: str
filename: str
- signed_url: str
+ signed_url: typing.Optional[str] = None
signed_preview_url: typing.Optional[str] = None
offset_ms: int
duration_ms: int
@@ -43,6 +43,7 @@ class ProjectExtendedResponseModelAssetsItem_Video(UncheckedBaseModel):
speech_imported: typing.Optional[bool] = None
current_snapshot_id: typing.Optional[str] = None
canvas_placement: typing.Optional[CanvasPlacement] = None
+ track_id: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -98,6 +99,7 @@ class ProjectExtendedResponseModelAssetsItem_Image(UncheckedBaseModel):
file_size_bytes: int
width: int
height: int
+ track_id: typing.Optional[str] = None
offset_ms: int
duration_ms: int
order: str
diff --git a/src/elevenlabs/types/project_image_response_model.py b/src/elevenlabs/types/project_image_response_model.py
index 9d7094c2..c8ed4fc2 100644
--- a/src/elevenlabs/types/project_image_response_model.py
+++ b/src/elevenlabs/types/project_image_response_model.py
@@ -17,6 +17,7 @@ class ProjectImageResponseModel(UncheckedBaseModel):
file_size_bytes: int
width: int
height: int
+ track_id: typing.Optional[str] = None
offset_ms: int
duration_ms: int
order: str
diff --git a/src/elevenlabs/types/project_video_response_model.py b/src/elevenlabs/types/project_video_response_model.py
index 5b3e1dad..e3a5faf6 100644
--- a/src/elevenlabs/types/project_video_response_model.py
+++ b/src/elevenlabs/types/project_video_response_model.py
@@ -12,7 +12,7 @@
class ProjectVideoResponseModel(UncheckedBaseModel):
video_id: str
filename: str
- signed_url: str
+ signed_url: typing.Optional[str] = None
signed_preview_url: typing.Optional[str] = None
offset_ms: int
duration_ms: int
@@ -39,6 +39,7 @@ class ProjectVideoResponseModel(UncheckedBaseModel):
speech_imported: typing.Optional[bool] = None
current_snapshot_id: typing.Optional[str] = None
canvas_placement: typing.Optional[CanvasPlacement] = None
+ track_id: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/elevenlabs/types/transfer_type_enum.py b/src/elevenlabs/types/transfer_type_enum.py
index 50f4e86a..8e085a15 100644
--- a/src/elevenlabs/types/transfer_type_enum.py
+++ b/src/elevenlabs/types/transfer_type_enum.py
@@ -2,4 +2,4 @@
import typing
-TransferTypeEnum = typing.Union[typing.Literal["conference", "sip_refer"], typing.Any]
+TransferTypeEnum = typing.Union[typing.Literal["blind", "conference", "sip_refer"], typing.Any]
diff --git a/src/elevenlabs/types/voice.py b/src/elevenlabs/types/voice.py
index 75c7e0d7..4cd06b82 100644
--- a/src/elevenlabs/types/voice.py
+++ b/src/elevenlabs/types/voice.py
@@ -81,6 +81,11 @@ class Voice(UncheckedBaseModel):
The verified languages of the voice.
"""
+ collection_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ The IDs of collections this voice belongs to.
+ """
+
safety_control: typing.Optional[VoiceResponseModelSafetyControl] = pydantic.Field(default=None)
"""
The safety controls of the voice.
diff --git a/src/elevenlabs/types/voicemail_detection_tool_config.py b/src/elevenlabs/types/voicemail_detection_tool_config.py
index 73724096..445f45f8 100644
--- a/src/elevenlabs/types/voicemail_detection_tool_config.py
+++ b/src/elevenlabs/types/voicemail_detection_tool_config.py
@@ -18,7 +18,7 @@ class VoicemailDetectionToolConfig(UncheckedBaseModel):
voicemail_message: typing.Optional[str] = pydantic.Field(default=None)
"""
- Optional message to leave on voicemail when detected. If not provided, the call will end immediately when voicemail is detected.
+ Optional message to leave on voicemail when detected. If not provided, the call will end immediately when voicemail is detected. Supports dynamic variables (e.g., {{system__time}}, {{system__call_duration_secs}}, {{custom_variable}}).
"""
if IS_PYDANTIC_V2:
diff --git a/src/elevenlabs/types/whats_app_outbound_call_response.py b/src/elevenlabs/types/whats_app_outbound_call_response.py
new file mode 100644
index 00000000..40138e71
--- /dev/null
+++ b/src/elevenlabs/types/whats_app_outbound_call_response.py
@@ -0,0 +1,22 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from ..core.unchecked_base_model import UncheckedBaseModel
+
+
+class WhatsAppOutboundCallResponse(UncheckedBaseModel):
+ success: bool
+ message: str
+ conversation_id: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/elevenlabs/types/widget_config.py b/src/elevenlabs/types/widget_config.py
index 174c1b95..2dda7ef1 100644
--- a/src/elevenlabs/types/widget_config.py
+++ b/src/elevenlabs/types/widget_config.py
@@ -5,6 +5,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
+from .allowlist_item import AllowlistItem
from .embed_variant import EmbedVariant
from .widget_config_output_avatar import WidgetConfigOutputAvatar
from .widget_end_feedback_config import WidgetEndFeedbackConfig
@@ -157,6 +158,21 @@ class WidgetConfig(UncheckedBaseModel):
The override link for the widget
"""
+ markdown_link_allowed_hosts: typing.Optional[typing.List[AllowlistItem]] = pydantic.Field(default=None)
+ """
+ List of allowed hostnames for clickable markdown links. Use { hostname: '*' } to allow any domain. Empty means no links are allowed.
+ """
+
+ markdown_link_include_www: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Whether to automatically include www. variants of allowed hosts
+ """
+
+ markdown_link_allow_http: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Whether to allow http:// in addition to https:// for allowed hosts
+ """
+
mic_muting_enabled: typing.Optional[bool] = pydantic.Field(default=None)
"""
Whether to enable mic muting
diff --git a/src/elevenlabs/types/widget_config_response.py b/src/elevenlabs/types/widget_config_response.py
index da5d205f..1d837411 100644
--- a/src/elevenlabs/types/widget_config_response.py
+++ b/src/elevenlabs/types/widget_config_response.py
@@ -5,6 +5,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
+from .allowlist_item import AllowlistItem
from .embed_variant import EmbedVariant
from .widget_config_response_model_avatar import WidgetConfigResponseModelAvatar
from .widget_end_feedback_config import WidgetEndFeedbackConfig
@@ -157,6 +158,21 @@ class WidgetConfigResponse(UncheckedBaseModel):
The override link for the widget
"""
+ markdown_link_allowed_hosts: typing.Optional[typing.List[AllowlistItem]] = pydantic.Field(default=None)
+ """
+ List of allowed hostnames for clickable markdown links. Use { hostname: '*' } to allow any domain. Empty means no links are allowed.
+ """
+
+ markdown_link_include_www: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Whether to automatically include www. variants of allowed hosts
+ """
+
+ markdown_link_allow_http: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Whether to allow http:// in addition to https:// for allowed hosts
+ """
+
mic_muting_enabled: typing.Optional[bool] = pydantic.Field(default=None)
"""
Whether to enable mic muting
diff --git a/src/elevenlabs/types/widget_language_preset.py b/src/elevenlabs/types/widget_language_preset.py
index 966d84a1..fc44a871 100644
--- a/src/elevenlabs/types/widget_language_preset.py
+++ b/src/elevenlabs/types/widget_language_preset.py
@@ -5,6 +5,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
+from .widget_terms_translation import WidgetTermsTranslation
from .widget_text_contents import WidgetTextContents
@@ -14,6 +15,26 @@ class WidgetLanguagePreset(UncheckedBaseModel):
The text contents for the selected language
"""
+ terms_text: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The text to display for terms and conditions in this language
+ """
+
+ terms_html: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The HTML to display for terms and conditions in this language
+ """
+
+ terms_key: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The key to display for terms and conditions in this language
+ """
+
+ terms_translation: typing.Optional[WidgetTermsTranslation] = pydantic.Field(default=None)
+ """
+ The translation cache for the terms
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/elevenlabs/types/widget_language_preset_response.py b/src/elevenlabs/types/widget_language_preset_response.py
index c297f33d..38a0bf20 100644
--- a/src/elevenlabs/types/widget_language_preset_response.py
+++ b/src/elevenlabs/types/widget_language_preset_response.py
@@ -15,6 +15,21 @@ class WidgetLanguagePresetResponse(UncheckedBaseModel):
The text contents for the selected language
"""
+ terms_text: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The text to display for terms and conditions in this language
+ """
+
+ terms_html: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The HTML to display for terms and conditions in this language
+ """
+
+ terms_key: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The key to display for terms and conditions in this language
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/elevenlabs/types/widget_terms_translation.py b/src/elevenlabs/types/widget_terms_translation.py
new file mode 100644
index 00000000..3e20cc0a
--- /dev/null
+++ b/src/elevenlabs/types/widget_terms_translation.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+from ..core.unchecked_base_model import UncheckedBaseModel
+
+
+class WidgetTermsTranslation(UncheckedBaseModel):
+ source_hash: str
+ text: str
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/elevenlabs/types/workspace_create_api_key_response_model.py b/src/elevenlabs/types/workspace_create_api_key_response_model.py
index 5bea1621..3df0b80e 100644
--- a/src/elevenlabs/types/workspace_create_api_key_response_model.py
+++ b/src/elevenlabs/types/workspace_create_api_key_response_model.py
@@ -11,6 +11,7 @@
class WorkspaceCreateApiKeyResponseModel(UncheckedBaseModel):
xi_api_key: typing_extensions.Annotated[str, FieldMetadata(alias="xi-api-key")]
+ key_id: str
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/elevenlabs/types/workspace_resource_type.py b/src/elevenlabs/types/workspace_resource_type.py
index 295221d8..dfde0355 100644
--- a/src/elevenlabs/types/workspace_resource_type.py
+++ b/src/elevenlabs/types/workspace_resource_type.py
@@ -31,6 +31,9 @@
"dashboard",
"dashboard_configuration",
"convai_agent_drafts",
+ "resource_locators",
+ "assets",
+ "content_generations",
],
typing.Any,
]
diff --git a/src/elevenlabs/voices/client.py b/src/elevenlabs/voices/client.py
index 330100d5..c87ad188 100644
--- a/src/elevenlabs/voices/client.py
+++ b/src/elevenlabs/voices/client.py
@@ -116,7 +116,7 @@ def search(
Which direction to sort the voices in. 'asc' or 'desc'.
voice_type : typing.Optional[str]
- Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to all but 'default'.
+ Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default', 'saved'. 'non-default' is equal to all but 'default'. 'saved' is equal to non-default, but includes default voices if they have been added to a collection.
category : typing.Optional[str]
Category of the voice to filter by. One of 'premade', 'cloned', 'generated', 'professional'
@@ -678,7 +678,7 @@ async def search(
Which direction to sort the voices in. 'asc' or 'desc'.
voice_type : typing.Optional[str]
- Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to all but 'default'.
+ Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default', 'saved'. 'non-default' is equal to all but 'default'. 'saved' is equal to non-default, but includes default voices if they have been added to a collection.
category : typing.Optional[str]
Category of the voice to filter by. One of 'premade', 'cloned', 'generated', 'professional'
diff --git a/src/elevenlabs/voices/raw_client.py b/src/elevenlabs/voices/raw_client.py
index eb1de765..d9869ae4 100644
--- a/src/elevenlabs/voices/raw_client.py
+++ b/src/elevenlabs/voices/raw_client.py
@@ -119,7 +119,7 @@ def search(
Which direction to sort the voices in. 'asc' or 'desc'.
voice_type : typing.Optional[str]
- Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to all but 'default'.
+ Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default', 'saved'. 'non-default' is equal to all but 'default'. 'saved' is equal to non-default, but includes default voices if they have been added to a collection.
category : typing.Optional[str]
Category of the voice to filter by. One of 'premade', 'cloned', 'generated', 'professional'
@@ -755,7 +755,7 @@ async def search(
Which direction to sort the voices in. 'asc' or 'desc'.
voice_type : typing.Optional[str]
- Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default'. 'non-default' is equal to all but 'default'.
+ Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default', 'saved'. 'non-default' is equal to all but 'default'. 'saved' is equal to non-default, but includes default voices if they have been added to a collection.
category : typing.Optional[str]
Category of the voice to filter by. One of 'premade', 'cloned', 'generated', 'professional'