Create and launch an SMS campaign to send messages to your contact list.
Authorizations
Authentication header containing your API key.
Body
Unique campaign identifier. Format: {timestamp}x{random_18_digits}Example: "1763072374x123456789012345678"
Campaign display name.Example: "November 2024 Outreach"
User unique_id (campaign creator).
SMS agent unique_id for conversations.
SMS phone number to send from (E.164 format or without + prefix). Use organization’s teli_sms_number.Example: "13135727768" or "+13135559999"
Array of contact objects. Supports all lead fields from contact list.[
{
"phone_number": "+15551234567",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"unique_id": "1762896414634x733468691531460383"
}
]
Enable SMS-to-voice transfer. When true, AI can escalate conversation to phone call.
Teli Voice agent ID for voice transfer (required if enable_sms_to_voice is true).Example: "agent_86f826bf8f59bacd5c10ae948a"
Outbound phone number for voice calls (required if enable_sms_to_voice is true).Example: "+12489071796"
If true, simulates campaign without sending real SMS.Default: false
Validate phone numbers before sending.Default: false
Media URL for MMS campaigns (optional).
Interval between follow-ups in seconds.Default: 0
Custom data fields to extract from conversations.Default: []
Custom follow-up message template.
curl -X POST https://api.example.com/v1/campaigns \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"campaign_id": "1763072374x123456789012345678",
"campaign_name": "November Outreach",
"organization_id": "1763070568417x...",
"user_id": "1763072368418x...",
"sms_agent_id": "1763072369786x...",
"teli_sms_number": "+13135559999",
"contacts": [
{"phone_number": "+15551234567", "first_name": "John"}
]
}'
{
"success": true,
"campaign_id": "json test",
"status": "processing",
"message": "Campaign upload started successfully",
"agent": {
"agent_id": "1763490400021x448481236873124087",
"agent_name": "SMS TO Voice"
},
"details": {
"total_contacts": 1,
"invalid_leads_count": 0,
"estimated_processing_seconds": 0.1,
"has_drips": false,
"voice_transfer_enabled": true
},
"powered_by": "Teli"
}
Response
Processing status: processing, active, completed
Campaign processing details
Number of valid contacts in campaign
Number of invalid/rejected contacts
estimated_processing_seconds
Estimated time to process campaign
Whether campaign includes drip messaging
Whether SMS-to-voice transfer is enabled
SMS-to-Voice Transfer
Enable seamless escalation from SMS conversations to phone calls by setting enable_sms_to_voice: true.
Requirements:
- Voice agent must be created beforehand (use
POST /v1/agents with agent_type: "voice")
- Must provide
voice_agent_id (Teli Voice agent ID)
- Must provide
outbound_number (phone number for making calls)
How It Works:
- Campaign starts with SMS conversation
- AI detects when voice call would be beneficial
- System automatically initiates phone call using voice agent
- Seamless transition from text to voice conversation
Example with Voice Transfer:
{
"campaign_id": "json test",
"sms_agent_id": "1763490400021x448481236873124087",
"contacts": [...],
"enable_sms_to_voice": true,
"voice_agent_id": "agent_86f826bf8f59bacd5c10ae948a",
"outbound_number": "+12489071796"
}
Response will include voice_transfer_enabled: true in details.
Notes
- Campaign ID must be unique across your organization
- Contacts can include all lead fields (email, address, custom fields)
- Invalid phone numbers are automatically filtered out
- Campaign starts processing immediately upon creation
- Use
dry_run: true for testing without sending real messages
- SMS-to-voice requires both voice agent and outbound phone number
- Drip schedules defined in agent configuration (not campaign)
- All messages support variable substitution:
{'{'}{'{'}}first_name{'}'}{'}'}}, {'{'}{'{'}}last_name{'}'}{'}'}}, etc.