curl --request POST \
--url https://app.autocalls.ai/api/user/lead \
--header 'Content-Type: application/json' \
--data '{
"phone_number": "<string>",
"campaign_id": 123,
"variables": {
"customer_name": "<string>",
"email": "<string>"
},
"allow_dupplicate": true,
"secondary_contacts": [
{
"phone_number": "<string>",
"variables": {
"customer_name": "<string>",
"email": "<string>"
}
}
]
}'
{
"message": "Lead created successfully",
"data": {
"id": 1,
"campaign_id": 1,
"phone_number": "+1234567890",
"variables": {
"customer_name": "John Doe",
"email": "john.doe@example.com"
},
"status": "created",
"created_at": "2025-06-30 11:53:20",
"updated_at": "2025-06-30 11:53:20",
"campaign": {
"id": 1,
"name": "My new campaign"
},
"secondary_contacts": [
{
"id": 2,
"phone_number": "+1234567891",
"variables": {
"customer_name": "Jane Doe Secondary",
"email": "jane.doe.secondary@example.com"
},
"status": "created",
"created_at": "2025-06-30 11:53:20",
"updated_at": "2025-06-30 11:53:20"
},
{
"id": 3,
"phone_number": "+1234567892",
"variables": {
"customer_name": "Bob Doe Office",
"email": "bob.doe.office@example.com"
},
"status": "created",
"created_at": "2025-06-30 11:53:20",
"updated_at": "2025-06-30 11:53:20"
}
]
}
}
Create a new lead in the Autocalls system
curl --request POST \
--url https://app.autocalls.ai/api/user/lead \
--header 'Content-Type: application/json' \
--data '{
"phone_number": "<string>",
"campaign_id": 123,
"variables": {
"customer_name": "<string>",
"email": "<string>"
},
"allow_dupplicate": true,
"secondary_contacts": [
{
"phone_number": "<string>",
"variables": {
"customer_name": "<string>",
"email": "<string>"
}
}
]
}'
{
"message": "Lead created successfully",
"data": {
"id": 1,
"campaign_id": 1,
"phone_number": "+1234567890",
"variables": {
"customer_name": "John Doe",
"email": "john.doe@example.com"
},
"status": "created",
"created_at": "2025-06-30 11:53:20",
"updated_at": "2025-06-30 11:53:20",
"campaign": {
"id": 1,
"name": "My new campaign"
},
"secondary_contacts": [
{
"id": 2,
"phone_number": "+1234567891",
"variables": {
"customer_name": "Jane Doe Secondary",
"email": "jane.doe.secondary@example.com"
},
"status": "created",
"created_at": "2025-06-30 11:53:20",
"updated_at": "2025-06-30 11:53:20"
},
{
"id": 3,
"phone_number": "+1234567892",
"variables": {
"customer_name": "Bob Doe Office",
"email": "bob.doe.office@example.com"
},
"status": "created",
"created_at": "2025-06-30 11:53:20",
"updated_at": "2025-06-30 11:53:20"
}
]
}
}
Show secondary_contacts properties
Show data properties
Show secondary_contacts properties
{
"message": "Lead created successfully",
"data": {
"id": 1,
"campaign_id": 1,
"phone_number": "+1234567890",
"variables": {
"customer_name": "John Doe",
"email": "john.doe@example.com"
},
"status": "created",
"created_at": "2025-06-30 11:53:20",
"updated_at": "2025-06-30 11:53:20",
"campaign": {
"id": 1,
"name": "My new campaign"
},
"secondary_contacts": [
{
"id": 2,
"phone_number": "+1234567891",
"variables": {
"customer_name": "Jane Doe Secondary",
"email": "jane.doe.secondary@example.com"
},
"status": "created",
"created_at": "2025-06-30 11:53:20",
"updated_at": "2025-06-30 11:53:20"
},
{
"id": 3,
"phone_number": "+1234567892",
"variables": {
"customer_name": "Bob Doe Office",
"email": "bob.doe.office@example.com"
},
"status": "created",
"created_at": "2025-06-30 11:53:20",
"updated_at": "2025-06-30 11:53:20"
}
]
}
}