Add campaign leads
curl --request POST \
--url https://api.threetone.in/v1/convai/outbound-campaigns/campaigns/{campaign_id}/leads \
--header 'Content-Type: application/json' \
--data '
{
"recipients": [
{
"phone_number": "<string>",
"phone_numbers": [
"<string>"
],
"whatsapp_user_id": "<string>",
"id": "<string>",
"timezone_override": "<string>",
"conversation_initiation_client_data": {
"conversation_config_override": {
"agent": {
"first_message": "Hello, how can I help you today?",
"language": "en",
"prompt": {
"knowledge_base": [],
"llm": "google/gemma-4-31b",
"prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.",
"tool_ids": []
}
},
"conversation": {
"max_duration_seconds": 600
},
"tts": {
"voice_id": "ME9RtCnWp5vX2LhJdF3k"
},
"turn": {
"soft_timeout_config": {
"message": "Hhmmmm...yeah."
}
}
},
"custom_llm_extra_body": {},
"user_id": "<string>",
"source_info": {
"source": "unknown",
"version": "<string>"
},
"branch_id": "<string>",
"environment": "<string>",
"starting_workflow_node_id": "<string>",
"procedure_ids": [
"<string>"
],
"start_procedure_ids": [
"<string>"
],
"dynamic_variables": {}
}
}
]
}
'import requests
url = "https://api.threetone.in/v1/convai/outbound-campaigns/campaigns/{campaign_id}/leads"
payload = { "recipients": [
{
"phone_number": "<string>",
"phone_numbers": ["<string>"],
"whatsapp_user_id": "<string>",
"id": "<string>",
"timezone_override": "<string>",
"conversation_initiation_client_data": {
"conversation_config_override": {
"agent": {
"first_message": "Hello, how can I help you today?",
"language": "en",
"prompt": {
"knowledge_base": [],
"llm": "google/gemma-4-31b",
"prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.",
"tool_ids": []
}
},
"conversation": { "max_duration_seconds": 600 },
"tts": { "voice_id": "ME9RtCnWp5vX2LhJdF3k" },
"turn": { "soft_timeout_config": { "message": "Hhmmmm...yeah." } }
},
"custom_llm_extra_body": {},
"user_id": "<string>",
"source_info": {
"source": "unknown",
"version": "<string>"
},
"branch_id": "<string>",
"environment": "<string>",
"starting_workflow_node_id": "<string>",
"procedure_ids": ["<string>"],
"start_procedure_ids": ["<string>"],
"dynamic_variables": {}
}
}
] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
recipients: [
{
phone_number: '<string>',
phone_numbers: ['<string>'],
whatsapp_user_id: '<string>',
id: '<string>',
timezone_override: '<string>',
conversation_initiation_client_data: {
conversation_config_override: {
agent: {
first_message: 'Hello, how can I help you today?',
language: 'en',
prompt: {
knowledge_base: [],
llm: 'google/gemma-4-31b',
prompt: 'You are a helpful assistant that can answer questions about the topic of the conversation.',
tool_ids: []
}
},
conversation: {max_duration_seconds: 600},
tts: {voice_id: 'ME9RtCnWp5vX2LhJdF3k'},
turn: {soft_timeout_config: {message: 'Hhmmmm...yeah.'}}
},
custom_llm_extra_body: {},
user_id: '<string>',
source_info: {source: 'unknown', version: '<string>'},
branch_id: '<string>',
environment: '<string>',
starting_workflow_node_id: '<string>',
procedure_ids: ['<string>'],
start_procedure_ids: ['<string>'],
dynamic_variables: {}
}
}
]
})
};
fetch('https://api.threetone.in/v1/convai/outbound-campaigns/campaigns/{campaign_id}/leads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"campaign": {
"campaign_id": "<string>",
"call_name": "<string>",
"agent_id": "<string>",
"channel_config": {
"agent_phone_number_id": "<string>",
"channel": "phone",
"mode_config": {
"ringing_timeout_secs": 60,
"twilio_call_recording_enabled": false,
"twilio_machine_detection": {
"mode": "enable",
"actions": [
{
"action": "hang_up",
"answered_by": [
"human"
]
}
]
},
"mode": "voice"
}
},
"status": "active",
"policy": {
"timezone": "<string>",
"retry": {
"retry_delay_seconds": 600,
"max_short_retries": 1,
"max_total_calls": 6,
"max_callbacks": 2,
"max_redirects": 2,
"interval_placement": "start",
"rotate_step_seconds": 900,
"max_consecutive_failures_per_number": 15
},
"calling_periods": [
{
"weekdays": [
123
],
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
]
}
],
"data_collection": {
"callback_time": "<string>",
"redirect_phone_number": "<string>",
"stop": "<string>",
"mappings": {}
},
"followup_context": {
"call_type": true,
"previous_conversation_id": true,
"previous_summary": true,
"previous_transcript": true
},
"date_overrides": [
{
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
],
"name": "<string>"
}
]
},
"variant": "simple",
"source": "ui",
"created_at_unix": 123,
"scheduled_time_unix": 123,
"updated_at_unix": 123,
"branch_id": "<string>",
"environment": "<string>",
"target_concurrency_limit": 123,
"channel": "phone",
"mode": "voice",
"counts": {
"leads": 123,
"terminal_leads": 123,
"open_attention": 123,
"delivery": {
"sent": 0,
"delivered": 0,
"read": 0,
"replied": 0,
"failed": 0
}
},
"agent_name": ""
},
"added": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Leads
Add campaign leads
Add recipients to an outbound campaign that isn’t stopping, stopped or failed. Recipients whose id the campaign already has are skipped, and a completed campaign becomes active again.
POST
/
v1
/
convai
/
outbound-campaigns
/
campaigns
/
{campaign_id}
/
leads
Add campaign leads
curl --request POST \
--url https://api.threetone.in/v1/convai/outbound-campaigns/campaigns/{campaign_id}/leads \
--header 'Content-Type: application/json' \
--data '
{
"recipients": [
{
"phone_number": "<string>",
"phone_numbers": [
"<string>"
],
"whatsapp_user_id": "<string>",
"id": "<string>",
"timezone_override": "<string>",
"conversation_initiation_client_data": {
"conversation_config_override": {
"agent": {
"first_message": "Hello, how can I help you today?",
"language": "en",
"prompt": {
"knowledge_base": [],
"llm": "google/gemma-4-31b",
"prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.",
"tool_ids": []
}
},
"conversation": {
"max_duration_seconds": 600
},
"tts": {
"voice_id": "ME9RtCnWp5vX2LhJdF3k"
},
"turn": {
"soft_timeout_config": {
"message": "Hhmmmm...yeah."
}
}
},
"custom_llm_extra_body": {},
"user_id": "<string>",
"source_info": {
"source": "unknown",
"version": "<string>"
},
"branch_id": "<string>",
"environment": "<string>",
"starting_workflow_node_id": "<string>",
"procedure_ids": [
"<string>"
],
"start_procedure_ids": [
"<string>"
],
"dynamic_variables": {}
}
}
]
}
'import requests
url = "https://api.threetone.in/v1/convai/outbound-campaigns/campaigns/{campaign_id}/leads"
payload = { "recipients": [
{
"phone_number": "<string>",
"phone_numbers": ["<string>"],
"whatsapp_user_id": "<string>",
"id": "<string>",
"timezone_override": "<string>",
"conversation_initiation_client_data": {
"conversation_config_override": {
"agent": {
"first_message": "Hello, how can I help you today?",
"language": "en",
"prompt": {
"knowledge_base": [],
"llm": "google/gemma-4-31b",
"prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.",
"tool_ids": []
}
},
"conversation": { "max_duration_seconds": 600 },
"tts": { "voice_id": "ME9RtCnWp5vX2LhJdF3k" },
"turn": { "soft_timeout_config": { "message": "Hhmmmm...yeah." } }
},
"custom_llm_extra_body": {},
"user_id": "<string>",
"source_info": {
"source": "unknown",
"version": "<string>"
},
"branch_id": "<string>",
"environment": "<string>",
"starting_workflow_node_id": "<string>",
"procedure_ids": ["<string>"],
"start_procedure_ids": ["<string>"],
"dynamic_variables": {}
}
}
] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
recipients: [
{
phone_number: '<string>',
phone_numbers: ['<string>'],
whatsapp_user_id: '<string>',
id: '<string>',
timezone_override: '<string>',
conversation_initiation_client_data: {
conversation_config_override: {
agent: {
first_message: 'Hello, how can I help you today?',
language: 'en',
prompt: {
knowledge_base: [],
llm: 'google/gemma-4-31b',
prompt: 'You are a helpful assistant that can answer questions about the topic of the conversation.',
tool_ids: []
}
},
conversation: {max_duration_seconds: 600},
tts: {voice_id: 'ME9RtCnWp5vX2LhJdF3k'},
turn: {soft_timeout_config: {message: 'Hhmmmm...yeah.'}}
},
custom_llm_extra_body: {},
user_id: '<string>',
source_info: {source: 'unknown', version: '<string>'},
branch_id: '<string>',
environment: '<string>',
starting_workflow_node_id: '<string>',
procedure_ids: ['<string>'],
start_procedure_ids: ['<string>'],
dynamic_variables: {}
}
}
]
})
};
fetch('https://api.threetone.in/v1/convai/outbound-campaigns/campaigns/{campaign_id}/leads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"campaign": {
"campaign_id": "<string>",
"call_name": "<string>",
"agent_id": "<string>",
"channel_config": {
"agent_phone_number_id": "<string>",
"channel": "phone",
"mode_config": {
"ringing_timeout_secs": 60,
"twilio_call_recording_enabled": false,
"twilio_machine_detection": {
"mode": "enable",
"actions": [
{
"action": "hang_up",
"answered_by": [
"human"
]
}
]
},
"mode": "voice"
}
},
"status": "active",
"policy": {
"timezone": "<string>",
"retry": {
"retry_delay_seconds": 600,
"max_short_retries": 1,
"max_total_calls": 6,
"max_callbacks": 2,
"max_redirects": 2,
"interval_placement": "start",
"rotate_step_seconds": 900,
"max_consecutive_failures_per_number": 15
},
"calling_periods": [
{
"weekdays": [
123
],
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
]
}
],
"data_collection": {
"callback_time": "<string>",
"redirect_phone_number": "<string>",
"stop": "<string>",
"mappings": {}
},
"followup_context": {
"call_type": true,
"previous_conversation_id": true,
"previous_summary": true,
"previous_transcript": true
},
"date_overrides": [
{
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
],
"name": "<string>"
}
]
},
"variant": "simple",
"source": "ui",
"created_at_unix": 123,
"scheduled_time_unix": 123,
"updated_at_unix": 123,
"branch_id": "<string>",
"environment": "<string>",
"target_concurrency_limit": 123,
"channel": "phone",
"mode": "voice",
"counts": {
"leads": 123,
"terminal_leads": 123,
"open_attention": 123,
"delivery": {
"sent": 0,
"delivered": 0,
"read": 0,
"replied": 0,
"failed": 0
}
},
"agent_name": ""
},
"added": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Headers
Body
application/json