Agents Platform

Create An Outbound Campaign

Changed on

Create an outbound campaign that calls or messages each recipient with the agent, within the policy's calling windows, retrying and following up as it allows. Returns 201 for a new campaign. A repeated request, matched by idempotency_key or else by its body, returns the existing campaign with created false.

post/v1/convai/outbound-campaigns/campaigns/submit

Request

Headers

xi-api-keystring nullable

Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

Request body

call_namestring required

The campaign's name.

agent_idstring required

The agent that places the calls.

scheduled_time_unixinteger nullable

When to start calling; omit to start now. Calls still wait for the next calling window.

timezonestring nullable

IANA timezone to read the calling windows in, overriding the policy's.

branch_idstring nullable

The agent branch to call with.

environmentstring nullable

The environment to resolve the agent's environment variables in.

target_concurrency_limitinteger nullable

The most calls to place at once.

idempotency_keystring nullable

Makes the request safe to retry: a repeat with the same key returns the campaign it created.

variant'simple' | 'advanced'

Example request

{
  "recipients": [
    {
      "conversation_initiation_client_data": {
        "conversation_config_override": {
          "agent": {
            "first_message": "Hello, how can I help you today?",
            "language": "en",
            "prompt": {
              "knowledge_base": [],
              "llm": "gemini-2.0-flash-001",
              "prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.",
              "tool_ids": []
            }
          },
          "asr": {
            "keywords": [
              "hello",
              "world"
            ]
          },
          "conversation": {
            "max_duration_seconds": 600
          },
          "tts": {
            "model_id": "eleven_turbo_v2",
            "pronunciation_dictionary_locators": [],
            "similarity_boost": 0.8,
            "speed": 1,
            "stability": 0.5,
            "voice_id": "cjVigY5qzO86Huf0OWal"
          },
          "turn": {
            "soft_timeout_config": {
              "message": "Hhmmmm...yeah."
            }
          }
        }
      }
    }
  ]
}

Response

Successful Response

createdboolean required

False when the request repeated an earlier one and returned its campaign.

within_calling_windowboolean required

Whether calling starts right away rather than at the next calling window.

Changes