Skip to content
Get started

Create a campaign

POST/campaigns

Create a new outbound calling campaign. By default the campaign launches immediately. Set launch to false to save as a draft for later review.

Body ParametersJSONExpand Collapse
assistant_id: string

The ID of the assistant to use

formatuuid
contacts: array of object { prompt_variables, to_phone_number }

The list of contacts to call

prompt_variables: map[string]
to_phone_number: string
launch: boolean

Whether to launch the campaign immediately. Set to false to save as a draft.

name: string

The name of the campaign

minLength1
call_retry_config: optional object { allowed_days, calling_windows, max_retry_attempts, timezone }

Override retry configuration for calls in this campaign. If not provided, uses the assistant's retry config.

allowed_days: array of "monday" or "tuesday" or "wednesday" or 4 more

Days of the week when calls are allowed, in the recipient's timezone. Default: Monday through Friday.

One of the following:
"monday"
"tuesday"
"wednesday"
"thursday"
"friday"
"saturday"
"sunday"
calling_windows: array of object { calling_window_end_time, calling_window_start_time, retry_delay_seconds }
calling_window_end_time: string

End time for the calling window in the recipient's timezone (or timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour). Examples: '17:00', '6pm'. Default: '18:00'.

calling_window_start_time: string

Start time for the calling window in the recipient's timezone (or timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour). Examples: '09:00', '10am'. Default: '10:00'.

retry_delay_seconds: number

Delay between retry attempts in seconds. Default: 7200 (2 hours).

exclusiveMinimum0
maximum9007199254740991
max_retry_attempts: number

Maximum number of call retry attempts. Default: 3.

exclusiveMinimum0
maximum9007199254740991
timezone: optional string

Optional IANA timezone identifier to override the automatic timezone detection from phone number. If not provided, timezone is determined from the recipient's phone number country code. Examples: 'America/New_York', 'Europe/Paris'.

from_phone_number: optional string

The phone number to use for outbound calls (E.164 format, e.g., +1234567890)

max_concurrent_calls: optional number

Maximum number of concurrent calls allowed for this campaign

minimum1
scheduled_at: optional string or unknown

Schedule all calls in this campaign to start at a specific date and time (ISO 8601 format)

One of the following:
UnionMember0 = string
UnionMember1 = unknown
ReturnsExpand Collapse
campaign: object { id, assistant_id, created_at, 12 more }
id: string
assistant_id: string
created_at: unknown
is_cancelled: boolean
name: string
organization_id: string
status: "draft" or "running" or "paused" or "completed"
One of the following:
"draft"
"running"
"paused"
"completed"
updated_at: unknown
assistant: optional object { id, after_call_sms_prompt, background_sound, 30 more }
id: string
after_call_sms_prompt: string

Prompt / instructions for the after-call SMS. Supports {{variable}} placeholders. When null, no after-call SMS is sent.

background_sound: "audio/office.ogg"

The background sound to play during the call. Useful to give the impression that your AI agent is in an office.

calendly: object { connection_id, event_type_id }
connection_id: string

The connection ID representing the link between your Calendly account and Revox.

event_type_id: string

The event type ID representing the event type to schedule. (eg: https://api.calendly.com/event_types/b2330295-2a91-4a1d-bb73-99e7707663d5)

call_retry_config: object { allowed_days, calling_windows, max_retry_attempts, timezone }

Configuration for call retry behavior including time windows, delays, and max iterations. If not provided, defaults will be used.

allowed_days: array of "monday" or "tuesday" or "wednesday" or 4 more

Days of the week when calls are allowed, in the recipient's timezone. Default: Monday through Friday.

One of the following:
"monday"
"tuesday"
"wednesday"
"thursday"
"friday"
"saturday"
"sunday"
calling_windows: array of object { calling_window_end_time, calling_window_start_time, retry_delay_seconds }
calling_window_end_time: string

End time for the calling window in the recipient's timezone (or timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour). Examples: '17:00', '6pm'. Default: '18:00'.

calling_window_start_time: string

Start time for the calling window in the recipient's timezone (or timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour). Examples: '09:00', '10am'. Default: '10:00'.

retry_delay_seconds: number

Delay between retry attempts in seconds. Default: 7200 (2 hours).

exclusiveMinimum0
maximum9007199254740991
max_retry_attempts: number

Maximum number of call retry attempts. Default: 3.

exclusiveMinimum0
maximum9007199254740991
timezone: optional string

Optional IANA timezone identifier to override the automatic timezone detection from phone number. If not provided, timezone is determined from the recipient's phone number country code. Examples: 'America/New_York', 'Europe/Paris'.

created_at: unknown
custom_tools: array of object { body_template, description, headers, 5 more }
body_template: string

JSON body template for the request. Use quoted {{variable}} placeholders (e.g. "{{name}}") for dynamic values

description: string

Human-readable description of what the tool does, used by the LLM to decide when to call it

minLength1
headers: array of object { key, value }

HTTP headers to include in the request. Values support {{variable}} placeholders

key: string
minLength1
value: string
input_schema: array of object { name, required, type, 2 more }

Schema defining the parameters the LLM should extract from the conversation to pass to this tool

name: string
minLength1
required: boolean
type: "string" or "number" or "boolean" or 3 more
One of the following:
"string"
"number"
"boolean"
"enum"
"date"
"datetime"
description: optional string
enum_options: optional array of string
method: "GET" or "POST" or "PUT" or 2 more

HTTP method to use when calling the API endpoint

One of the following:
"GET"
"POST"
"PUT"
"PATCH"
"DELETE"
name: string

Unique tool name in lowercase_snake_case (e.g. check_inventory)

minLength1
query_params: array of object { key, value }

Query string parameters appended to the URL. Values support {{variable}} placeholders

key: string
minLength1
value: string
url: string

Full URL of the API endpoint. Supports {{variable}} placeholders for dynamic values

minLength1
email_notification_address: string

Email address to receive notifications when a call ends with a matching outcome.

formatemail
email_notification_outcomes: array of "not_interested" or "interested" or "completed" or 3 more

Which call outcomes trigger an email notification. E.g. ["interested", "completed"].

One of the following:
"not_interested"
"interested"
"completed"
"requested_callback_later"
"requested_callback_new_number"
"do_not_contact"
end_of_call_sentence: string
first_sentence: string
first_sentence_delay_ms: number

Delay in milliseconds before speaking the first sentence. Default: 400.

minimum-9007199254740991
maximum9007199254740991
first_sentence_mode: "generated" or "static" or "none"
One of the following:
"generated"
"static"
"none"
human_transfer_mode: "warm" or "cold"

Warm or cold transfer when transfer_phone_number is set; null when transfer is not configured.

One of the following:
"warm"
"cold"
ivr_navigation_enabled: boolean

Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and skip turns to navigate phone menus.

llm_model: object { name, type } or object { openrouter_model_id, openrouter_provider, type } or object { api_key, api_url, model_name, type } or object { provider, realtime_model_id, type, realtime_voice_id }
One of the following:
UnionMember0 = object { name, type }
name: "gpt-4.1" or "ministral-3-8b-instruct"
One of the following:
"gpt-4.1"
"ministral-3-8b-instruct"
type: "dedicated-instance"
UnionMember1 = object { openrouter_model_id, openrouter_provider, type }
openrouter_model_id: string

The model ID to use from OpenRouter. eg: openai/gpt-4.1

openrouter_provider: string

The provider to use from OpenRouter. eg: nebius, openai, azure, etc.

type: "openrouter"

Use a model from OpenRouter.

UnionMember2 = object { api_key, api_url, model_name, type }
api_key: string

API key sent as Bearer token to the custom endpoint.

minLength1
api_url: string

Base URL for the OpenAI-compatible API, e.g. https://api.together.xyz/v1

formaturi
model_name: string

Model name as expected by the provider, e.g. meta-llama/llama-3-70b

minLength1
type: "custom"

OpenAI-compatible chat completions API (bring your own endpoint and key).

UnionMember3 = object { provider, realtime_model_id, type, realtime_voice_id }
provider: "openai" or "google"

The provider to use from Realtime. eg: openai, google.

One of the following:
"openai"
"google"
realtime_model_id: string

The model ID to use from Realtime. eg: gpt-4.1

type: "realtime"

Use a model from Realtime.

realtime_voice_id: optional string

Output voice for the realtime provider (e.g. OpenAI: marin; Gemini: Puck).

minLength1
max_call_duration_secs: number

The maximum duration of the call in seconds. This is the maximum time the call will be allowed to run.

name: string
organization_id: string
prompt: string
sms_enabled: boolean

Enable SMS tool during calls. When enabled, the agent can send SMS messages to the user on the call.

sms_template: string

Hardcoded SMS template to send during calls. When set, this exact text is sent instead of letting the agent generate the message. Supports {{variable}} placeholders.

structured_output_config: array of object { name, required, type, 2 more }

The structured output config to use for the call. This is used to extract the data from the call (like email, name, company name, etc.).

name: string
minLength1
required: boolean
type: "string" or "number" or "boolean" or 3 more
One of the following:
"string"
"number"
"boolean"
"enum"
"date"
"datetime"
description: optional string
enum_options: optional array of string
structured_output_prompt: string

Custom prompt for structured data extraction. If not provided, a default prompt is used. Available variables: {{transcript}}, {{call_direction}}, {{user_phone_number}}, {{agent_phone_number}}.

transfer_phone_number: string

Phone number to transfer calls to when users request to speak to a human agent.

updated_at: unknown
voice: object { id, provider, speed, volume }
id: string

The ID of the voice.

minLength1
provider: "cartesia" or "elevenlabs"

The provider of the voice.

One of the following:
"cartesia"
"elevenlabs"
speed: optional number

The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs 0.7–1.2. Default is 1.0.

minimum0.6
maximum1.5
volume: optional number

Volume of the voice (Cartesia only). 0.5–2.0, default 1.0. Ignored for other providers.

minimum0.5
maximum2
voicemail_message: string

If set, when voicemail is detected the agent will speak this message then hang up; if null, hang up immediately.

voicemail_sms_prompt: string

Prompt / instructions for the voicemail SMS. Supports {{variable}} placeholders. When null, no SMS is sent on voicemail.

warm_transfer_summary_instructions: string

Warm transfer only: instructions for the supervisor handoff summary; null when not configured or cold transfer.

webhook_url: string

The webhook URL to call when the call is completed.

faq_items: optional array of object { answer, question, id, 2 more }
answer: string
question: string
id: optional string
needs_human_answer: optional boolean
source: optional "human" or "ai"
One of the following:
"human"
"ai"
pending_faq_count: optional number
call_retry_config: optional object { allowed_days, calling_windows, max_retry_attempts, timezone }

Configuration for call retry behavior including time windows, delays, and max iterations. If not provided, defaults will be used.

allowed_days: array of "monday" or "tuesday" or "wednesday" or 4 more

Days of the week when calls are allowed, in the recipient's timezone. Default: Monday through Friday.

One of the following:
"monday"
"tuesday"
"wednesday"
"thursday"
"friday"
"saturday"
"sunday"
calling_windows: array of object { calling_window_end_time, calling_window_start_time, retry_delay_seconds }
calling_window_end_time: string

End time for the calling window in the recipient's timezone (or timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour). Examples: '17:00', '6pm'. Default: '18:00'.

calling_window_start_time: string

Start time for the calling window in the recipient's timezone (or timezone_override if provided). Format: 'HH:mm' (24-hour) or 'H:mma' (12-hour). Examples: '09:00', '10am'. Default: '10:00'.

retry_delay_seconds: number

Delay between retry attempts in seconds. Default: 7200 (2 hours).

exclusiveMinimum0
maximum9007199254740991
max_retry_attempts: number

Maximum number of call retry attempts. Default: 3.

exclusiveMinimum0
maximum9007199254740991
timezone: optional string

Optional IANA timezone identifier to override the automatic timezone detection from phone number. If not provided, timezone is determined from the recipient's phone number country code. Examples: 'America/New_York', 'Europe/Paris'.

from_phone_number: optional string
max_concurrent_calls: optional number
row_stats: optional object { calling, completed, failed, 3 more }
calling: number
completed: number
failed: number
pending: number
retry: number
total: number
scheduled_at: optional unknown
structured_output_extraction: optional "none" or "running" or "completed"

The status of the structured output extraction.

One of the following:
"none"
"running"
"completed"

Create a campaign

curl https://www.getrevox.com/api/campaigns \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $REVOX_API_KEY" \
    -d '{
          "assistant_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
          "contacts": [
            {
              "prompt_variables": {
                "foo": "string"
              },
              "to_phone_number": "to_phone_number"
            }
          ],
          "launch": true,
          "name": "x"
        }'
{
  "campaign": {
    "id": "id",
    "assistant_id": "assistant_id",
    "created_at": {},
    "is_cancelled": true,
    "name": "name",
    "organization_id": "organization_id",
    "status": "draft",
    "updated_at": {},
    "assistant": {
      "id": "id",
      "after_call_sms_prompt": "after_call_sms_prompt",
      "background_sound": "audio/office.ogg",
      "calendly": {
        "connection_id": "connection_id",
        "event_type_id": "event_type_id"
      },
      "call_retry_config": {
        "allowed_days": [
          "monday"
        ],
        "calling_windows": [
          {
            "calling_window_end_time": "calling_window_end_time",
            "calling_window_start_time": "calling_window_start_time",
            "retry_delay_seconds": 1
          }
        ],
        "max_retry_attempts": 1,
        "timezone": "timezone"
      },
      "created_at": {},
      "custom_tools": [
        {
          "body_template": "body_template",
          "description": "x",
          "headers": [
            {
              "key": "x",
              "value": "value"
            }
          ],
          "input_schema": [
            {
              "name": "x",
              "required": true,
              "type": "string",
              "description": "description",
              "enum_options": [
                "string"
              ]
            }
          ],
          "method": "GET",
          "name": "name",
          "query_params": [
            {
              "key": "x",
              "value": "value"
            }
          ],
          "url": "x"
        }
      ],
      "email_notification_address": "dev@stainless.com",
      "email_notification_outcomes": [
        "not_interested"
      ],
      "end_of_call_sentence": "end_of_call_sentence",
      "first_sentence": "first_sentence",
      "first_sentence_delay_ms": -9007199254740991,
      "first_sentence_mode": "generated",
      "human_transfer_mode": "warm",
      "ivr_navigation_enabled": true,
      "llm_model": {
        "name": "gpt-4.1",
        "type": "dedicated-instance"
      },
      "max_call_duration_secs": 0,
      "name": "name",
      "organization_id": "organization_id",
      "prompt": "prompt",
      "sms_enabled": true,
      "sms_template": "sms_template",
      "structured_output_config": [
        {
          "name": "x",
          "required": true,
          "type": "string",
          "description": "description",
          "enum_options": [
            "string"
          ]
        }
      ],
      "structured_output_prompt": "structured_output_prompt",
      "transfer_phone_number": "transfer_phone_number",
      "updated_at": {},
      "voice": {
        "id": "x",
        "provider": "cartesia",
        "speed": 0.6,
        "volume": 0.5
      },
      "voicemail_message": "voicemail_message",
      "voicemail_sms_prompt": "voicemail_sms_prompt",
      "warm_transfer_summary_instructions": "warm_transfer_summary_instructions",
      "webhook_url": "webhook_url",
      "faq_items": [
        {
          "answer": "answer",
          "question": "question",
          "id": "id",
          "needs_human_answer": true,
          "source": "human"
        }
      ],
      "pending_faq_count": 0
    },
    "call_retry_config": {
      "allowed_days": [
        "monday"
      ],
      "calling_windows": [
        {
          "calling_window_end_time": "calling_window_end_time",
          "calling_window_start_time": "calling_window_start_time",
          "retry_delay_seconds": 1
        }
      ],
      "max_retry_attempts": 1,
      "timezone": "timezone"
    },
    "from_phone_number": "from_phone_number",
    "max_concurrent_calls": 0,
    "row_stats": {
      "calling": 0,
      "completed": 0,
      "failed": 0,
      "pending": 0,
      "retry": 0,
      "total": 0
    },
    "scheduled_at": {},
    "structured_output_extraction": "none"
  }
}
Returns Examples
{
  "campaign": {
    "id": "id",
    "assistant_id": "assistant_id",
    "created_at": {},
    "is_cancelled": true,
    "name": "name",
    "organization_id": "organization_id",
    "status": "draft",
    "updated_at": {},
    "assistant": {
      "id": "id",
      "after_call_sms_prompt": "after_call_sms_prompt",
      "background_sound": "audio/office.ogg",
      "calendly": {
        "connection_id": "connection_id",
        "event_type_id": "event_type_id"
      },
      "call_retry_config": {
        "allowed_days": [
          "monday"
        ],
        "calling_windows": [
          {
            "calling_window_end_time": "calling_window_end_time",
            "calling_window_start_time": "calling_window_start_time",
            "retry_delay_seconds": 1
          }
        ],
        "max_retry_attempts": 1,
        "timezone": "timezone"
      },
      "created_at": {},
      "custom_tools": [
        {
          "body_template": "body_template",
          "description": "x",
          "headers": [
            {
              "key": "x",
              "value": "value"
            }
          ],
          "input_schema": [
            {
              "name": "x",
              "required": true,
              "type": "string",
              "description": "description",
              "enum_options": [
                "string"
              ]
            }
          ],
          "method": "GET",
          "name": "name",
          "query_params": [
            {
              "key": "x",
              "value": "value"
            }
          ],
          "url": "x"
        }
      ],
      "email_notification_address": "dev@stainless.com",
      "email_notification_outcomes": [
        "not_interested"
      ],
      "end_of_call_sentence": "end_of_call_sentence",
      "first_sentence": "first_sentence",
      "first_sentence_delay_ms": -9007199254740991,
      "first_sentence_mode": "generated",
      "human_transfer_mode": "warm",
      "ivr_navigation_enabled": true,
      "llm_model": {
        "name": "gpt-4.1",
        "type": "dedicated-instance"
      },
      "max_call_duration_secs": 0,
      "name": "name",
      "organization_id": "organization_id",
      "prompt": "prompt",
      "sms_enabled": true,
      "sms_template": "sms_template",
      "structured_output_config": [
        {
          "name": "x",
          "required": true,
          "type": "string",
          "description": "description",
          "enum_options": [
            "string"
          ]
        }
      ],
      "structured_output_prompt": "structured_output_prompt",
      "transfer_phone_number": "transfer_phone_number",
      "updated_at": {},
      "voice": {
        "id": "x",
        "provider": "cartesia",
        "speed": 0.6,
        "volume": 0.5
      },
      "voicemail_message": "voicemail_message",
      "voicemail_sms_prompt": "voicemail_sms_prompt",
      "warm_transfer_summary_instructions": "warm_transfer_summary_instructions",
      "webhook_url": "webhook_url",
      "faq_items": [
        {
          "answer": "answer",
          "question": "question",
          "id": "id",
          "needs_human_answer": true,
          "source": "human"
        }
      ],
      "pending_faq_count": 0
    },
    "call_retry_config": {
      "allowed_days": [
        "monday"
      ],
      "calling_windows": [
        {
          "calling_window_end_time": "calling_window_end_time",
          "calling_window_start_time": "calling_window_start_time",
          "retry_delay_seconds": 1
        }
      ],
      "max_retry_attempts": 1,
      "timezone": "timezone"
    },
    "from_phone_number": "from_phone_number",
    "max_concurrent_calls": 0,
    "row_stats": {
      "calling": 0,
      "completed": 0,
      "failed": 0,
      "pending": 0,
      "retry": 0,
      "total": 0
    },
    "scheduled_at": {},
    "structured_output_extraction": "none"
  }
}