## Create `client.campaigns.create(CampaignCreateParamsbody, RequestOptionsoptions?): CampaignCreateResponse` **post** `/campaigns` Create a new outbound calling campaign and launch it immediately. If scheduled_at is set, all calls will be queued until the specified time instead of starting right away. ### Parameters - `body: CampaignCreateParams` - `assistant_id: string` The ID of the assistant to use - `contacts: Array` The list of contacts to call - `prompt_variables: Record` - `to_phone_number: string` - `name: string` The name of the campaign - `call_retry_config?: CallRetryConfig` Override retry configuration for calls in this campaign. If not provided, uses the assistant's retry config. - `calling_windows: Array` - `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). - `max_retry_attempts: number` Maximum number of call retry attempts. Default: 3. - `timezone?: string | null` 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?: string` The phone number to use for outbound calls (E.164 format, e.g., +1234567890) - `max_concurrent_calls?: number` Maximum number of concurrent calls allowed for this campaign - `scheduled_at?: string | unknown` Schedule all calls in this campaign to start at a specific date and time (ISO 8601 format) - `string` - `unknown` ### Returns - `CampaignCreateResponse` - `campaign: Campaign` - `id: string` - `assistant_id: string` - `created_at: unknown` - `is_cancelled: boolean` - `name: string` - `organization_id: string` - `status: "draft" | "running" | "paused" | "completed"` - `"draft"` - `"running"` - `"paused"` - `"completed"` - `updated_at: unknown` - `assistant?: Assistant` - `id: string` - `background_sound: "audio/office.ogg" | null` The background sound to play during the call. Useful to give the impression that your AI agent is in an office. - `"audio/office.ogg"` - `calendly: Calendly | null` - `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: CallRetryConfig | null` Configuration for call retry behavior including time windows, delays, and max iterations. If not provided, defaults will be used. - `calling_windows: Array` - `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). - `max_retry_attempts: number` Maximum number of call retry attempts. Default: 3. - `timezone?: string | null` 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` - `end_of_call_sentence: string | null` - `first_sentence: string | null` - `first_sentence_delay_ms: number` Delay in milliseconds before speaking the first sentence. Default: 400. - `first_sentence_mode: "generated" | "static" | "none"` - `"generated"` - `"static"` - `"none"` - `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: UnionMember0 | UnionMember1` - `UnionMember0` - `name: "gpt-4.1" | "ministral-3-8b-instruct"` - `"gpt-4.1"` - `"ministral-3-8b-instruct"` - `type: "dedicated-instance"` - `"dedicated-instance"` - `UnionMember1` - `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. - `"openrouter"` - `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` - `structured_output_config: Array | null` 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` - `required: boolean` - `type: "string" | "number" | "boolean" | 3 more` - `"string"` - `"number"` - `"boolean"` - `"enum"` - `"date"` - `"datetime"` - `description?: string` - `enum_options?: Array` - `transfer_phone_number: string | null` Phone number to transfer calls to when users request to speak to a human agent. - `updated_at: unknown` - `voice: Voice | null` - `id: string` The ID of the voice. - `provider: "cartesia" | "elevenlabs"` The provider of the voice. - `"cartesia"` - `"elevenlabs"` - `speed?: number` The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs 0.7–1.2. Default is 1.0. - `voicemail_message: string | null` If set, when voicemail is detected the agent will speak this message then hang up; if null, hang up immediately. - `webhook_url: string | null` The webhook URL to call when the call is completed. - `faq_items?: Array` - `answer: string` - `question: string` - `id?: string` - `needs_human_answer?: boolean` - `source?: "human" | "ai"` - `"human"` - `"ai"` - `pending_faq_count?: number` - `call_retry_config?: CallRetryConfig | null` Configuration for call retry behavior including time windows, delays, and max iterations. If not provided, defaults will be used. - `calling_windows: Array` - `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). - `max_retry_attempts: number` Maximum number of call retry attempts. Default: 3. - `timezone?: string | null` 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?: string | null` - `max_concurrent_calls?: number | null` - `row_stats?: RowStats` - `calling: number` - `completed: number` - `failed: number` - `pending: number` - `retry: number` - `total: number` - `scheduled_at?: unknown` ### Example ```typescript import Revox from '@revoxai/sdk'; const client = new Revox({ apiKey: process.env['REVOX_API_KEY'], // This is the default and can be omitted }); const campaign = await client.campaigns.create({ assistant_id: 'assistant_id', contacts: [ { prompt_variables: { foo: 'string' }, to_phone_number: 'to_phone_number', }, ], name: 'x', }); console.log(campaign.campaign); ```