Create a campaign
campaigns.create(CampaignCreateParams**kwargs) -> 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
assistant_id: str
The ID of the assistant to use
name: str
The name of the campaign
minLength1
from_phone_number: Optional[str]
The phone number to use for outbound calls (E.164 format, e.g., +1234567890)
max_concurrent_calls: Optional[float]
Maximum number of concurrent calls allowed for this campaign
minimum1
Returns
Create a campaign
import os
from revox import Revox
client = Revox(
api_key=os.environ.get("REVOX_API_KEY"), # This is the default and can be omitted
)
campaign = client.campaigns.create(
assistant_id="assistant_id",
contacts=[{
"prompt_variables": {
"foo": "string"
},
"to_phone_number": "to_phone_number",
}],
name="x",
)
print(campaign.campaign){
"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",
"background_sound": "audio/office.ogg",
"calendly": {
"connection_id": "connection_id",
"event_type_id": "event_type_id"
},
"call_retry_config": {
"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": {},
"end_of_call_sentence": "end_of_call_sentence",
"first_sentence": "first_sentence",
"first_sentence_delay_ms": -9007199254740991,
"first_sentence_mode": "generated",
"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",
"structured_output_config": [
{
"name": "x",
"required": true,
"type": "string",
"description": "description",
"enum_options": [
"string"
]
}
],
"transfer_phone_number": "transfer_phone_number",
"updated_at": {},
"voice": {
"id": "x",
"provider": "cartesia",
"speed": 0.6
},
"voicemail_message": "voicemail_message",
"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": {
"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": {}
}
}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",
"background_sound": "audio/office.ogg",
"calendly": {
"connection_id": "connection_id",
"event_type_id": "event_type_id"
},
"call_retry_config": {
"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": {},
"end_of_call_sentence": "end_of_call_sentence",
"first_sentence": "first_sentence",
"first_sentence_delay_ms": -9007199254740991,
"first_sentence_mode": "generated",
"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",
"structured_output_config": [
{
"name": "x",
"required": true,
"type": "string",
"description": "description",
"enum_options": [
"string"
]
}
],
"transfer_phone_number": "transfer_phone_number",
"updated_at": {},
"voice": {
"id": "x",
"provider": "cartesia",
"speed": 0.6
},
"voicemail_message": "voicemail_message",
"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": {
"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": {}
}
}