Skip to main content

Trigger Bulk AI Phone Calls

Initiate AI-powered phone calls to multiple numbers in a single API request. This is useful for outreach campaigns or when you need to contact several people at once.
# Basic bulk call - phone numbers only
curl --request POST \
--url https://api.dev.uselevers.com/api-service/v1/ai/phone-calls/action/call-bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
  "contacts": [
    {
      "numberToCall": "+96612341234",
      "metadata": {"project_id": "proj_123", "extra_id": "custom_id_456"}
    },
    {
      "numberToCall": "+96612345678",
      "metadata": {"project_id": "proj_124", "extra_id": "custom_id_789"}
    }
  ]
}'

# With contact details
curl --request POST \
--url https://api.dev.uselevers.com/api-service/v1/ai/phone-calls/action/call-bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
  "contacts": [
    {
      "numberToCall": "+96612341234",
      "firstName": "John",
      "lastName": "Doe",
      "metadata": {"project_id": "proj_123", "extra_id": "custom_id_456"}
    },
    {
      "numberToCall": "+96612345678",
      "firstName": "Jane",
      "lastName": "Smith",
      "metadata": {"project_id": "proj_124", "extra_id": "custom_id_789"}
    }
  ]
}'

# Update existing contacts if found
curl --request POST \
--url https://api.dev.uselevers.com/api-service/v1/ai/phone-calls/action/call-bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
  "updateExisting": true,
  "contacts": [
    {
      "numberToCall": "+96612341234",
      "firstName": "John",
      "lastName": "Doe",
      "metadata": {"project_id": "proj_123", "extra_id": "custom_id_456"}
    },
    {
      "numberToCall": "+96612345678",
      "firstName": "Jane",
      "lastName": "Smith",
      "metadata": {"project_id": "proj_124", "extra_id": "custom_id_789"}
    }
  ]
}'

# With custom AI settings template
curl --request POST \
--url https://api.dev.uselevers.com/api-service/v1/ai/phone-calls/action/call-bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
  "aiSettingsTemplateId": "template-uuid-here",
  "contacts": [
    {
      "numberToCall": "+96612341234",
      "firstName": "John",
      "lastName": "Doe",
      "metadata": {"project_id": "proj_123", "extra_id": "custom_id_456"}
    },
    {
      "numberToCall": "+96612345678",
      "firstName": "Jane",
      "lastName": "Smith",
      "metadata": {"project_id": "proj_124", "extra_id": "custom_id_789"}
    }
  ]
}'

Request Fields

contacts
array
required
Array of contact objects, each containing at minimum a numberToCall. For each contact in the list, we automatically search for any existing contact with that phone number to avoid creating duplicates.
updateExisting
boolean
default:"false"
When true, if an existing contact is found with the provided numberToCall, their firstName and lastName will be updated with the provided values. If no contact is found with that phone number, a new contact will be created with the provided details.
aiSettingsTemplateId
string (UUID)
Customize how the AI behaves during all calls in this batch using your prompt templates from the Levers app. If not specified, the default template will be used. This setting applies to all contacts in the request.