> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# 创建外呼活动

POST https://api.elevenlabs.io/v1/convai/outbound-campaigns/campaigns/submit
Content-Type: application/json

创建外呼活动，在策略允许的呼叫时段内由智能体向每位收件人呼叫或发送消息，并按策略重试和跟进。新活动返回 `201`。重复请求会根据 `idempotency_key` 或请求正文匹配，并返回现有活动，`created` 为 false。

Reference: https://elevenlabs.io/docs/eleven-agents/api-reference/campaigns/create

## Servers

- `https://api.elevenlabs.io` (Production, default)
- `https://api.us.elevenlabs.io` (Production US)
- `https://api.eu.residency.elevenlabs.io` (Production EU)
- `https://api.in.residency.elevenlabs.io` (Production India)
- `https://api.sg.residency.elevenlabs.io` (Production Singapore)

## Request

### Body (application/json)

This endpoint expects an object.

- `call_name` (string, required) — 活动名称。
- `agent_id` (string, required) — 发起呼叫的智能体。
- `recipients` (list of SubmitCampaignRecipient, required) — 要呼叫的对象。每位收件人都会成为活动中的一名潜在客户。
- `channel_config` (SubmitCampaignRequestChannelConfig, required)
- `scheduled_time_unix` (integer, optional) — 开始呼叫的时间；省略则立即开始。呼叫仍会等待下一个呼叫时间窗口。
- `timezone` (string, optional) — 读取呼叫时段所用的 IANA 时区，会覆盖策略中的设置。
- `branch_id` (string, optional) — 用于呼叫的智能体分支。
- `environment` (string, optional) — 用于解析智能体环境变量的环境。
- `target_concurrency_limit` (integer, optional) — 可同时发起的最大呼叫数。
- `idempotency_key` (string, optional) — 使请求可安全重试：使用相同键的重复请求会返回其创建的活动。
- `outcome` (SubmitCampaignRequestOutcome, optional) — 视为活动呼叫成功的结果。
- `policy` (PolicyConfigInput, optional) — 要快照到活动中的策略。设置后，它会优先于工作区默认策略和所有按智能体设置的覆盖项；省略时，必须存在工作区配置并由其提供策略。
- `variant` (enum, optional) — `simple` 会在始终开放的呼叫时段内向每位收件人尝试呼叫一次，不收集任何数据，且不能与 `policy` 结合使用。`advanced` 使用 `policy` 或工作区配置，是电话活动的默认值。
  - Allowed values: `simple`, `advanced`

## Response

### 200

成功响应

- `campaign` (CampaignResponse, required)
- `created` (boolean, required) — 如果请求重复了之前的请求并返回其活动，则为 false。
- `within_calling_window` (boolean, required) — 是否立即开始呼叫，而非在下一个呼叫时间窗口开始。

## Errors

### 422 Outbound Campaigns Create Request Unprocessable Entity Error

验证错误。

- `detail` (list of ValidationError, optional)

## Types

### SubmitCampaignRecipient

- `phone_number` (string, optional) — 要呼叫的号码，采用 E.164 格式，例如 `+14155550100`。
- `phone_numbers` (list of string, optional) — `phone_number` 之后按顺序呼叫的更多号码。当前号码持续呼叫失败时，潜在客户会转至下一个号码。
- `whatsapp_user_id` (string, optional) — 联系人的 WhatsApp 用户 ID。WhatsApp 活动使用它而非电话号码。
- `id` (string, optional) — 为收件人指定的标识符，将作为其潜在客户的 `recipient_id` 返回。
- `conversation_initiation_client_data` (ConversationInitiationClientDataRequestInput, optional) — 此收件人呼叫的动态变量和覆盖设置。

### SubmitCampaignRequestChannelConfig

- `channel`: `phone`
  - `agent_phone_number_id` (string, required) — 用于发起呼叫的电话号码。
  - `mode_config` (PhoneVoiceConfigInput, optional)
- `channel`: `whatsapp`
  - `mode_config` (SubmitWhatsAppChannelConfigModeConfig, required)
  - `whatsapp_phone_number_id` (string, required) — 用于拨打 WhatsApp 电话或发送消息的 WhatsApp 电话号码。

### SubmitCampaignRequestOutcome

- `type`: `data_collection`
  - `data_collection_id` (string, required) — 成功呼叫会设置的智能体数据收集项。
  - `equals` (list of DataCollectionOutcomeEqualsItem, required) — 视为成功的值，均为该项的类型。
- `type`: `evaluation_criteria`
  - `criteria_id` (string, required) — 成功呼叫满足的智能体评估标准。

### PolicyConfigInput

- `timezone` (string, optional, default: UTC) — 读取呼叫时段所用的 IANA 时区。
- `retry` (RetryPolicy, optional)
- `calling_periods` (list of CallingPeriod, optional) — 每周可发起呼叫的时间窗口。
- `data_collection` (DataCollectionConfig, optional) — 引导后续呼叫的智能体数据收集项。每项默认使用其用途对应的内置项目；`null` 会将其关闭。
- `followup_context` (FollowupContextPolicy, optional) — 后续呼叫会获取哪些 `campaign__` 动态变量。

### CampaignResponse

- `campaign_id` (string, required)
- `call_name` (string, required) — 活动名称。
- `agent_id` (string, required)
- `channel_config` (CampaignResponseChannelConfig, required)
- `status` (enum, required) — `attention` 表示未解决的待处理项会暂停活动中的部分呼叫，其他呼叫继续进行。`stopping` 表示已排队的呼叫会被取消，已发起的呼叫将完成。
  - Allowed values: `active`, `paused`, `stopping`, `stopped`, `completed`, `failed`, `attention`
- `policy` (CampaignPolicySnapshot, required) — 活动创建时采用的策略。
- `variant` (enum, required)
  - Allowed values: `simple`, `advanced`
- `created_at_unix` (integer, required)
- `updated_at_unix` (integer, required)
- `channel` (enum, required)
  - Allowed values: `phone`, `whatsapp`
- `mode` (enum, required)
  - Allowed values: `voice`, `message`
- `counts` (CampaignSummaryCounts, required)
- `agent_name` (string, required, default: )
- `source` (enum, optional) — 活动是在应用中还是通过 API 创建。
  - Allowed values: `ui`, `api`
- `outcome` (CampaignResponseOutcome, optional) — 视为活动呼叫成功的结果。
- `scheduled_time_unix` (integer, optional) — 活动开始呼叫的时间；未设置时，创建后立即开始。
- `branch_id` (string, optional) — 活动呼叫时使用的智能体分支。
- `environment` (string, optional) — 解析智能体环境变量所用的环境。
- `target_concurrency_limit` (integer, optional) — 活动可同时发起的最大呼叫数。

### ValidationError

- `loc` (list of ValidationErrorLocItem, required)
- `msg` (string, required)
- `type` (string, required)

### ConversationInitiationClientDataRequestInput

- `conversation_config_override` (ConversationConfigClientOverrideInput, optional)
- `custom_llm_extra_body` (map from string to any, optional)
- `user_id` (string, optional) — 参与此对话的最终用户 ID（用于智能体所有者识别用户）
- `source_info` (ConversationInitiationSourceInfo, optional) — 对话发起来源信息
- `branch_id` (string, optional) — 此对话要使用的智能体分支 ID
- `environment` (string, optional) — 用于解析环境变量的环境
- `starting_workflow_node_id` (string, optional) — 设定后，从此节点 ID 而非默认入口启动 workflow。
- `procedure_ids` (list of string, optional) — 设定后，起始智能体只能使用这些流程。每个 ID 都必须关联到该智能体；未知 ID 会导致对话无法开始。空列表会禁用该智能体的所有流程。智能体转接后不再适用。需要启用 enable_procedure_ids_from_client。
- `start_procedure_ids` (list of string, optional) — 设置后，对话开始时会启动这些自由形式的流程。最多接受 5 个 ID。应用 procedure_ids 后，每个 ID 都必须可用。未知 ID 和结构化流程会导致对话无法启动。需要启用 enable_procedure_ids_from_client。
- `dynamic_variables` (map from string to any, optional)

### PhoneVoiceConfigInput

- `ringing_timeout_secs` (integer, optional, default: 60) — 放弃前呼叫接收者的响铃时长，单位为秒。此时长还会受服务提供商自身限制。
- `twilio_call_recording_enabled` (boolean, optional, default: false) — 是否使用 Twilio 通话录音录制通话。非 Twilio 服务商将忽略此项。录音存储在 Twilio 账户中。
- `twilio_machine_detection` (TwilioMachineDetectionConfig, optional) — Configuration for Twilio's carrier-level answering machine detection (AMD). Omit or set to null to disable it. Ignored for non-Twilio providers and for inbound calls. The resulting verdict is delivered as its own `answering_machine_detection` webhook event, which requires that event to be enabled on the workspace or agent webhook settings; it is not part of the conversation or the post-call webhook. Detection runs asynchronously so it never delays the start of the conversation, and the verdict can arrive at any point during the call -- with `detect_message_end`, even after it has ended. Twilio bills separately for AMD.
- `mode` ("voice", optional)

### SubmitWhatsAppChannelConfigModeConfig

- `mode`: `message`
  - `template` (SubmitWhatsAppTemplateRef, required) — 指定要发送的已批准 Meta 模板名称。服务器会自行加载模板，因此客户端无需提供其组件。
- `mode`: `voice`
  - `whatsapp_call_permission_request_template_language_code` (string, required) — 该模板的语言代码。
  - `whatsapp_call_permission_request_template_name` (string, required) — 用于征求联系人呼叫许可的已批准模板。

### DataCollectionOutcomeEqualsItem

- string
- integer
- double
- boolean

### RetryPolicy

- `retry_delay_seconds` (integer, optional, default: 600) — 短暂重试前的等待时间。
- `max_short_retries` (integer, optional, default: 1) — 呼叫失败后，一个呼叫时段允许的重试次数。用完后，下次重试会等待下一个时段，并重新开始计算。
- `max_total_calls` (integer, optional, default: 6) — 每位潜在客户最多接收的呼叫次数，包括首次呼叫。
- `max_callbacks` (integer, optional, default: 2) — 同一号码最多可执行的回拨次数。
- `max_redirects` (integer, optional, default: 2) — 潜在客户按请求改拨其他号码的最大次数。
- `interval_placement` (enum, optional, default: start) — 延后的呼叫在后续呼叫时间窗口中的安排位置：在其 `start` 时开始、在 `random` 时间开始，或在该窗口中上次呼叫失败位置之后 `rotate` `rotate_step_seconds`。
  - Allowed values: `start`, `random`, `rotate`
- `rotate_step_seconds` (integer, optional, default: 900) — `rotate` 排序中每次呼叫移动的距离。仅由 `rotate` 使用。
- `max_consecutive_failures_per_number` (integer, optional) — 在潜在客户转而呼叫列表中的下一个号码前，向同一号码连续失败的最大呼叫次数；若没有下一个号码，则结束。呼叫被接听或重定向到新号码时，计数会重置。未设置时仅使用 `max_total_calls`。

### CallingPeriod

- `weekdays` (list of integer, required) — 时间段适用的日期，从 `0`（星期一）到 `6`（星期日）。
- `intervals` (list of CallingIntervalPolicy, required) — 这些日期每天的时间窗口。任何一天的时间窗口均不得重叠。

### DataCollectionConfig

引导后续呼叫的智能体数据收集项。每项默认使用其用途对应的内置项目；`null` 会将其关闭。

- `callback_time` (string, optional) — 存放联系人请求回拨时间的项目。
- `redirect_phone_number` (string, optional) — 存放联系人请求改拨号码的项目。
- `stop` (string, optional) — 当联系人请求不再被呼叫时为 true 的项目。
- `mappings` (map from string to string, optional) — 将数据收集结果复制到动态变量，以供后续呼叫使用：每个键为数据收集项 ID，值为变量名称。

### FollowupContextPolicy

后续呼叫会获取哪些 `campaign__` 动态变量。

- `call_type` (boolean, optional, default: true) — 将呼叫类型作为 `campaign__call_type` 传递。
- `previous_conversation_id` (boolean, optional, default: true) — 将上次对话的 ID 作为 `campaign__previous_conversation_id` 传递。
- `previous_summary` (boolean, optional, default: true) — 将上次对话的摘要作为 `campaign__previous_summary` 传递。
- `previous_transcript` (boolean, optional, default: true) — 将上次对话的转录文本作为 `campaign__previous_transcript` 传递。

### CampaignResponseChannelConfig

- `channel`: `phone`
  - `agent_phone_number_id` (string, required) — 用于发起呼叫的电话号码。
  - `mode_config` (PhoneVoiceConfigOutput, optional)
- `channel`: `whatsapp`
  - `mode_config` (WhatsAppChannelConfigModeConfig, required)
  - `whatsapp_phone_number_id` (string, required) — 用于拨打 WhatsApp 电话或发送消息的 WhatsApp 电话号码。

### CampaignPolicySnapshot

活动创建时采用的策略，其结构与提交的 `policy` 相同。

- `timezone` (string, required)
- `retry` (RetryPolicy, required)
- `calling_periods` (list of CallingPeriodPolicy, required)
- `data_collection` (DataCollectionPolicy, required)
- `followup_context` (FollowupContextPolicy, required) — 后续呼叫会获取哪些 `campaign__` 动态变量。

### CampaignSummaryCounts

- `leads` (integer, required)
- `terminal_leads` (integer, required) — 不会再次呼叫的潜在客户。
- `open_attention` (integer, required) — 尚未解决的待处理项。
- `delivery` (RecipientDeliveryCounts, optional) — 到达各阶段的消息数量；获取单个消息活动时设置。

### CampaignResponseOutcome

- `type`: `data_collection`
  - `data_collection_id` (string, required) — 成功呼叫会设置的智能体数据收集项。
  - `equals` (list of DataCollectionOutcomeEqualsItem, required) — 视为成功的值，均为该项的类型。
- `type`: `evaluation_criteria`
  - `criteria_id` (string, required) — 成功呼叫满足的智能体评估标准。

### ValidationErrorLocItem

- string
- integer

### ConversationConfigClientOverrideInput

- `asr` (AsrConversationalConfigOverride, optional) — Configuration for conversational transcription
- `turn` (TurnConfigOverride, optional) — Configuration for turn detection
- `tts` (TtsConversationalConfigOverride, optional) — Configuration for conversational text to speech
- `conversation` (ConversationConfigOverride, optional) — Configuration for conversational events
- `agent` (AgentConfigOverrideInput, optional) — 智能体专属配置

### ConversationInitiationSourceInfo

对话发起来源信息

- `source` (enum, optional, default: unknown) — 对话发起来源
  - Allowed values: `unknown`, `android_sdk`, `node_js_sdk`, `react_native_sdk`, `react_sdk`, `js_sdk`, `python_sdk`, `widget`, `sip_trunk`, `twilio`, `exotel`, `genesys`, `avaya`, `audiocodes`, `swift_sdk`, `whatsapp`, `twilio_sms`, `flutter_sdk`, `zendesk_integration`, `slack_integration`, `telegram_integration`, `intercom_integration`, `freshdesk_integration`, `salesforce_integration`, `template_preview`, `genesys_bot_connector`, `subagent_tool`
- `version` (string, optional) — SDK 版本号

### TwilioMachineDetectionConfig

如何在通话中运行 Twilio 的运营商级答录机检测（AMD）。

- `mode` (enum, optional, default: enable) — 检测的彻底程度。`enable` 会在 Twilio 能够区分人类和机器后立即返回判断结果。`detect_message_end` 还会等待语音信箱问候语结束，从而产生 `machine_end_*` 判断结果，但会更晚返回结果。
  - Allowed values: `enable`, `detect_message_end`
- `actions` (list of TwilioMachineDetectionRule, optional) — 针对每个 AMD 判定结果在通话中采取的操作。每项操作最多只能出现在一条规则中，因此请将其所有判定结果列在一起。没有对应规则的判定结果将使通话继续进行。

### SubmitWhatsAppTemplateRef

指定要发送的已批准 Meta 模板名称。服务器会自行加载模板，因此客户端无需提供其组件。

- `name` (string, required)
- `language` (string, required) — 模板的语言代码，例如 `en_US`。

### CallingIntervalPolicy

- `start` (string, required) — 本地开始时间，格式为 `HH:MM`。
- `end` (string, required) — 本地结束时间，格式为 `HH:MM`；`24:00` 表示在午夜结束。

### PhoneVoiceConfigOutput

- `ringing_timeout_secs` (integer, optional, default: 60) — 放弃前呼叫接收者的响铃时长，单位为秒。此时长还会受服务提供商自身限制。
- `twilio_call_recording_enabled` (boolean, optional, default: false) — 是否使用 Twilio 通话录音录制通话。非 Twilio 服务商将忽略此项。录音存储在 Twilio 账户中。
- `twilio_machine_detection` (TwilioMachineDetectionConfig, optional) — Configuration for Twilio's carrier-level answering machine detection (AMD). Omit or set to null to disable it. Ignored for non-Twilio providers and for inbound calls. The resulting verdict is delivered as its own `answering_machine_detection` webhook event, which requires that event to be enabled on the workspace or agent webhook settings; it is not part of the conversation or the post-call webhook. Detection runs asynchronously so it never delays the start of the conversation, and the verdict can arrive at any point during the call -- with `detect_message_end`, even after it has ended. Twilio bills separately for AMD.
- `mode` ("voice", optional)

### WhatsAppChannelConfigModeConfig

- `mode`: `message`
  - `template` (WhatsAppTemplate, required) — 提交时获批准的 Meta 模板。
- `mode`: `voice`
  - `whatsapp_call_permission_request_template_language_code` (string, required) — 该模板的语言代码。
  - `whatsapp_call_permission_request_template_name` (string, required) — 用于征求联系人呼叫许可的已批准模板。

### CallingPeriodPolicy

- `weekdays` (list of integer, required)
- `intervals` (list of CallingIntervalPolicy, required) — 这些日期每天的时间窗口。任何一天的时间窗口均不得重叠。

### DataCollectionPolicy

- `callback_time` (string, optional)
- `redirect_phone_number` (string, optional)
- `stop` (string, optional)
- `mappings` (map from string to string, optional) — 将数据收集结果复制到动态变量，以供后续呼叫使用：每个键为数据收集项 ID，值为变量名称。

### RecipientDeliveryCounts

- `sent` (integer, optional, default: 0)
- `delivered` (integer, optional, default: 0)
- `read` (integer, optional, default: 0)
- `replied` (integer, optional, default: 0)
- `failed` (integer, optional, default: 0)

### AsrConversationalConfigOverride

- `keywords` (list of string, optional) — 用于提高预测概率的关键词

### TurnConfigOverride

- `soft_timeout_config` (SoftTimeoutConfigOverride, optional) — Configuration for soft timeout functionality. Provides immediate feedback during longer LLM responses.
- `noisy_environment_message` (string, optional) — 智能体检测到嘈杂环境时说的话。

### TtsConversationalConfigOverride

- `model_id` (enum, optional, default: eleven_v4_turbo) — 用于 TTS 的模型
  - Allowed values: `eleven_turbo_v2`, `eleven_turbo_v2_5`, `eleven_flash_v2`, `eleven_flash_v2_5`, `eleven_multilingual_v2`, `eleven_v3_conversational`, `eleven_v4`, `eleven_v4_turbo`
- `voice_id` (string, optional) — 用于 TTS 的音色 ID。
- `supported_voices` (list of SupportedVoice, optional) — 智能体额外支持的音色
- `stability` (double, optional) — 生成语音的稳定性
- `speed` (double, optional) — 生成语音的速度
- `similarity_boost` (double, optional) — 生成语音的相似度增强
- `pronunciation_dictionary_locators` (list of PydanticPronunciationDictionaryVersionLocator, optional) — 发音词典定位器

### ConversationConfigOverride

- `text_only` (boolean, optional) — 启用后将不处理音频，仅使用文本，可避免音频计费。
- `max_duration_seconds` (integer, optional) — 单次对话的最长时长，单位为秒

### AgentConfigOverrideInput

- `first_message` (string, optional) — 非空时，为智能体首先说出的消息。为空时，智能体会等待用户发起对话。
- `language` (string, optional) — 智能体语言，用于 ASR 和 TTS
- `max_conversation_duration_message` (string, optional) — 非空时，为达到最长对话时长后智能体发送的消息。
- `prompt` (PromptAgentApiModelOverrideInput, optional) — 智能体的提示词

### TwilioMachineDetectionRule

针对给定 AMD 判定结果，在进行中的通话中采取的操作。

- `action` ("hang_up", required)
- `answered_by` (list of enum, required) — 触发该操作的判定结果。
  - Allowed values: `human`, `fax`, `unknown`, `machine_start`, `machine_end_beep`, `machine_end_silence`, `machine_end_other`

### WhatsAppTemplate

- `name` (string, required)
- `language` (string, required) — https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/supported-languages
- `components` (list of WhatsAppTemplateComponent, required)
- `parameter_format` (enum, optional, default: POSITIONAL)
  - Allowed values: `POSITIONAL`, `NAMED`
- `category` (string, optional) — https://developers.facebook.com/docs/graph-api/reference/whats-app-business-account/message_templates/

### SoftTimeoutConfigOverride

- `message` (string, optional) — 等待 LLM 响应时，首次达到软超时时显示的消息。支持动态变量（例如 \{\{system\_\_time}}、\{\{custom\_variable}}）。
- `additional_soft_timeout_messages` (list of string, optional) — 同一次 LLM 生成中后续软超时时使用的额外静态填充消息。首次超时使用 `message`。如果配置的消息少于 `max_soft_timeouts_per_generation`，会重复最后一条配置的消息；否则使用内置填充消息。

### SupportedVoice

- `label` (string, required)
- `voice_id` (string, required)
- `description` (string, optional)
- `language` (string, optional)
- `model_family` (enum, optional)
  - Allowed values: `turbo`, `flash`, `multilingual`, `v3_conversational`, `v4`, `v4_turbo`
- `optimize_streaming_latency` (integer, optional)
- `stability` (double, optional)
- `speed` (double, optional)
- `similarity_boost` (double, optional)

### PydanticPronunciationDictionaryVersionLocator

供其他文档引用特定词典及其版本的定位符。 这是 PronunciationDictionaryVersionLocatorDBModel 的 pydantic 版本。 用于确保与其他智能体数据模型兼容。

- `pronunciation_dictionary_id` (string, required) — 发音词典的 ID
- `version_id` (string, optional) — 发音词典版本的 ID

### PromptAgentApiModelOverrideInput

- `prompt` (string, optional) — 智能体的提示词
- `llm` (enum, optional) — 用于结合提示词和聊天记录进行查询的 LLM。使用数据驻留时，该 LLM 必须受数据驻留环境支持
  - Allowed values: `gpt-4o-mini`, `gpt-4o`, `gpt-4`, `gpt-4-turbo`, `gpt-4.1`, `gpt-4.1-mini`, `gpt-4.1-nano`, `gpt-5`, `gpt-5.1`, `gpt-5.2`, `gpt-5.2-chat-latest`, `gpt-5.4`, `gpt-5.4-mini`, `gpt-5.4-nano`, `gpt-5.5`, `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`, `gpt-6-astra`, `gpt-6-sol`, `gpt-6-luna`, `gpt-6.1-sol`, `gpt-6.1-terra`, `gpt-5-mini`, `gpt-5-nano`, `gpt-3.5-turbo`, `gemini-1.5-pro`, `gemini-1.5-flash`, `gemini-2.0-flash`, `gemini-2.0-flash-lite`, `gemini-2.5-flash-lite`, `gemini-2.5-flash`, `gemini-3-pro-preview`, `gemini-3-flash-preview`, `gemini-3.1-pro-preview`, `gemini-3.1-flash-lite-preview`, `gemini-3.1-flash-lite`, `gemini-3.5-flash`, `gemini-3.5-flash-lite`, `gemini-3.6-flash`, `gemini-3.7-flash`, `gemini-3.8-flash`, `gemini-4-argon`, `claude-sonnet-4-5`, `claude-opus-4-6`, `claude-opus-4-7`, `claude-opus-4-8`, `claude-opus-5`, `claude-opus-5-5`, `claude-sonnet-4-6`, `claude-sonnet-5`, `claude-sonnet-5-5`, `claude-sonnet-4`, `claude-haiku-4-5`, `claude-haiku-5-5`, `claude-3-7-sonnet`, `claude-3-5-sonnet`, `claude-3-5-sonnet-v1`, `claude-3-haiku`, `grok-beta`, `custom-llm`, `qwen3-4b`, `qwen3-30b-a3b`, `qwen36-35b-a3b`, `qwen35-397b-a17b`, `gpt-oss-20b`, `gpt-oss-120b`, `glm-45-air-fp8`, `glm-52`, `deepseek-v41-flash`, `nemotron-35-super-vl-nvfp4`, `gemini-2.5-flash-preview-09-2025`, `gemini-2.5-flash-lite-preview-09-2025`, `gemini-2.5-flash-preview-05-20`, `gemini-2.5-flash-preview-04-17`, `gemini-2.5-flash-lite-preview-06-17`, `gemini-2.0-flash-lite-001`, `gemini-2.0-flash-001`, `gemini-1.5-flash-002`, `gemini-1.5-flash-001`, `gemini-1.5-pro-002`, `gemini-1.5-pro-001`, `claude-sonnet-4@20250514`, `claude-sonnet-4-5@20250929`, `claude-haiku-4-5@20251001`, `claude-3-7-sonnet@20250219`, `claude-3-5-sonnet@20240620`, `claude-3-5-sonnet-v2@20241022`, `claude-3-haiku@20240307`, `gpt-5-2025-08-07`, `gpt-5.1-2025-11-13`, `gpt-5.2-2025-12-11`, `gpt-5.4-2026-03-05`, `gpt-5.4-mini-2026-03-17`, `gpt-5.4-nano-2026-03-17`, `gpt-5.5-2026-04-23`, `gpt-5-mini-2025-08-07`, `gpt-5-nano-2025-08-07`, `gpt-4.1-2025-04-14`, `gpt-4.1-mini-2025-04-14`, `gpt-4.1-nano-2025-04-14`, `gpt-4o-mini-2024-07-18`, `gpt-4o-2024-11-20`, `gpt-4o-2024-08-06`, `gpt-4o-2024-05-13`, `gpt-4-0613`, `gpt-4-0314`, `gpt-4-turbo-2024-04-09`, `gpt-3.5-turbo-0125`, `gpt-3.5-turbo-1106`, `watt-tool-8b`, `watt-tool-70b`
- `tool_ids` (list of string, optional) — 智能体使用的工具 ID 列表。
- `tool_ids_strict` (boolean, optional) — 仅作为对话覆盖项生效，在允许覆盖 tool_ids 时均可使用。为 true 时，覆盖后的 tool_ids 是对话中允许使用的完整工具列表，包括 workflow 节点上的工具。在智能体上设置时会被忽略。
- `native_mcp_server_ids` (list of string, optional) — 供智能体使用的原生 MCP 服务器 ID 列表
- `knowledge_base` (list of KnowledgeBaseLocator, optional) — 供智能体使用的知识库列表

### WhatsAppTemplateComponent

- `type` (string, required)
- `format` (string, optional)
- `text` (string, optional)
- `buttons` (list of WhatsAppTemplateComponentButton, optional)

### KnowledgeBaseLocator

- `type` (enum, required) — 知识库类型
  - Allowed values: `file`, `url`, `text`, `folder`
- `name` (string, required) — 知识库名称
- `id` (string, required) — 知识库的 ID
- `usage_mode` (enum, optional, default: auto) — 知识库使用模式
  - Allowed values: `prompt`, `auto`

### WhatsAppTemplateComponentButton

- `type` (string, required)
- `text` (string, optional)
- `url` (string, optional)

## Examples

**Request**

```json
{
  "call_name": "call_name",
  "agent_id": "agent_id",
  "recipients": [
    {}
  ],
  "channel_config": {
    "channel": "phone",
    "agent_phone_number_id": "agent_phone_number_id"
  }
}
```

**Response**

```json
{
  "campaign": {
    "campaign_id": "campaign_id",
    "call_name": "call_name",
    "agent_id": "agent_id",
    "channel_config": {
      "channel": "phone",
      "agent_phone_number_id": "agent_phone_number_id"
    },
    "status": "active",
    "policy": {
      "timezone": "timezone",
      "retry": {},
      "calling_periods": [
        {
          "weekdays": [
            1
          ],
          "intervals": [
            {
              "start": "start",
              "end": "end"
            }
          ]
        }
      ],
      "data_collection": {},
      "followup_context": {}
    },
    "variant": "simple",
    "created_at_unix": 1,
    "updated_at_unix": 1,
    "channel": "phone",
    "mode": "voice",
    "counts": {
      "leads": 1,
      "terminal_leads": 1,
      "open_attention": 1
    },
    "agent_name": "agent_name",
    "source": "ui",
    "outcome": {
      "type": "data_collection",
      "data_collection_id": "data_collection_id",
      "equals": [
        "equals"
      ]
    },
    "scheduled_time_unix": 1,
    "branch_id": "branch_id",
    "environment": "environment",
    "target_concurrency_limit": 1
  },
  "created": true,
  "within_calling_window": true
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/convai/outbound-campaigns/campaigns/submit"

payload = {
    "call_name": "call_name",
    "agent_id": "agent_id",
    "recipients": [{}],
    "channel_config": {
        "channel": "phone",
        "agent_phone_number_id": "agent_phone_number_id"
    }
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/convai/outbound-campaigns/campaigns/submit';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"call_name":"call_name","agent_id":"agent_id","recipients":[{}],"channel_config":{"channel":"phone","agent_phone_number_id":"agent_phone_number_id"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.elevenlabs.io/v1/convai/outbound-campaigns/campaigns/submit"

	payload := strings.NewReader("{\n  \"call_name\": \"call_name\",\n  \"agent_id\": \"agent_id\",\n  \"recipients\": [\n    {}\n  ],\n  \"channel_config\": {\n    \"channel\": \"phone\",\n    \"agent_phone_number_id\": \"agent_phone_number_id\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.elevenlabs.io/v1/convai/outbound-campaigns/campaigns/submit")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"call_name\": \"call_name\",\n  \"agent_id\": \"agent_id\",\n  \"recipients\": [\n    {}\n  ],\n  \"channel_config\": {\n    \"channel\": \"phone\",\n    \"agent_phone_number_id\": \"agent_phone_number_id\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.elevenlabs.io/v1/convai/outbound-campaigns/campaigns/submit")
  .header("Content-Type", "application/json")
  .body("{\n  \"call_name\": \"call_name\",\n  \"agent_id\": \"agent_id\",\n  \"recipients\": [\n    {}\n  ],\n  \"channel_config\": {\n    \"channel\": \"phone\",\n    \"agent_phone_number_id\": \"agent_phone_number_id\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.elevenlabs.io/v1/convai/outbound-campaigns/campaigns/submit', [
  'body' => '{
  "call_name": "call_name",
  "agent_id": "agent_id",
  "recipients": [
    {}
  ],
  "channel_config": {
    "channel": "phone",
    "agent_phone_number_id": "agent_phone_number_id"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/convai/outbound-campaigns/campaigns/submit");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"call_name\": \"call_name\",\n  \"agent_id\": \"agent_id\",\n  \"recipients\": [\n    {}\n  ],\n  \"channel_config\": {\n    \"channel\": \"phone\",\n    \"agent_phone_number_id\": \"agent_phone_number_id\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "call_name": "call_name",
  "agent_id": "agent_id",
  "recipients": [[]],
  "channel_config": [
    "channel": "phone",
    "agent_phone_number_id": "agent_phone_number_id"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/convai/outbound-campaigns/campaigns/submit")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```