Phones - Calls

Initiate bulk outbound calls with AI agent

Initiate multiple outbound AI phone calls in a single request. Each call is scheduled and processed independently, allowing partial success — some calls may succeed while others fail.

Use Case: Use this endpoint instead of calling initiate-call repeatedly when you need to reach multiple phone numbers. Ideal for campaigns, batch follow-ups, appointment reminders, or any scenario requiring parallel outreach.

Request:

  • calls: Array of 1–50 call requests, each with a phone number and optional per-call settings
  • Each call entry accepts the same fields as the single initiate-call endpoint
  • If agentId or voipPhoneId are omitted, the company's MCP default settings are used

Per-Call Fields:

  • phoneNumber (required): Destination number in E.164 format (e.g., +306912345678)
  • agentId (optional): AI agent to handle this specific call
  • voipPhoneId (optional): VoIP phone to use for this specific call
  • callerId (optional): Override caller ID shown to the recipient
  • contextForAi (optional): Additional context appended to the agent's system prompt
  • dynamicVariables (optional): Key-value pairs accessible to the agent (e.g., customer name, order ID)
  • scheduledAt (optional): ISO 8601 date-time to schedule the call for a future time
  • maxRetries (optional): Retry attempts if call fails (0–3, default 2). Retries occur after 10 minutes
  • overrideTimeRestriction (optional): Bypass 9 AM – 9 PM local time restrictions

Scheduling Behavior:

  • All bulk calls are created as scheduled calls (status: "scheduled")
  • If scheduledAt is provided and is in the future, the call is scheduled for that time
  • If scheduledAt is omitted or in the past, the call is scheduled 1 minute from now
  • The system processes scheduled calls automatically at their scheduled time

Anti-Harassment Protection:

  • All bulk calls have anti-harassment protection enabled by default
  • Limits: max 3 outbound calls/day, 1-hour cooldown between outbound calls to the same number
  • Calls that violate these limits will fail with a descriptive error

Response: Returns an array of results in the same order as the input calls array. Each result contains:

  • phoneNumber: The destination number
  • success: Whether the call was scheduled successfully
  • id: Call ID for tracking (on success) — use with GET /{id} or cancel-scheduled-calls
  • status: Always "scheduled" on success
  • message: Human-readable status with scheduling details
  • error: Error description (on failure)

Limits:

  • Maximum 50 calls per request
  • Subject to your plan's concurrent call limits and available channels
  • Each call counts toward anti-harassment quotas independently

HTTP Status Codes:

  • 200 OK: Request processed (check individual results for per-call success/failure)
  • 400 Bad Request: Invalid request body (empty array, exceeds 50 calls, or schema validation error)
  • 500 Internal Server Error: Server-side error (retry later)

Example Workflow:

  1. Call this endpoint with an array of phone numbers and per-call context
  2. Check the response for per-call success/failure
  3. Use GET /calls/{id} to check individual call results after they complete
  4. Use GET /calls/statistics to see aggregate campaign performance
post/api/v1/phones/calls/initiate-bulk

Request

  • Base URL: https://api.voicelogica.ai
  • URL: https://api.voicelogica.ai/api/v1/phones/calls/initiate-bulk
  • Auth: API key in header x-api-key

Headers

x-api-keystring required

Your API key for authentication. Required for all endpoints.

x-company-idstring

Optional company ID for resellers. When provided, the API request will operate on behalf of the specified subsidiary company. The API key must have access to the specified company.

Request body

Example request

{
  "calls": [
    {
      "phoneNumber": "+306912345678",
      "agentId": "your_agent_id",
      "contextForAi": "Customer has open support ticket #1234",
      "dynamicVariables": {
        "customer_name": "John Doe",
        "ticket_id": "1234"
      }
    },
    {
      "phoneNumber": "+306987654321",
      "contextForAi": "Follow up on quote sent last week",
      "dynamicVariables": {
        "customer_name": "Jane Smith",
        "quote_id": "Q-567"
      },
      "scheduledAt": "2026-03-22T14:00:00Z"
    }
  ]
}

Response

Bulk calls processed — per-call results returned

phoneNumberstring required

The destination phone number for this call

successboolean required

Whether the call was successfully scheduled

idstring

Call ID if successful — use this to track the call via get-call-by-id or cancel via cancel-scheduled-calls

statusstring

Call status if successful (always "scheduled" for bulk calls)

callerIdstring

Caller ID if successful

messagestring

Human-readable status message with scheduling details and guidance

errorstring

Error description if the call could not be scheduled

Example response

[
  {
    "phoneNumber": "+306912345678",
    "success": true,
    "id": "507f1f77bcf86cd799439011",
    "status": "scheduled",
    "callerId": "+306912345678",
    "message": "Call scheduled for 2026-03-21T14:01:00.000Z. Use leads_query (action \"get_scheduled_calls\") to monitor or leads_execute (action \"cancel_scheduled_calls\") to cancel."
  },
  {
    "phoneNumber": "+306987654321",
    "success": false,
    "error": "Daily call limit reached for this phone number (max 3 calls/day)."
  }
]

Changes

No recorded changes to this operation across all 2 revisions of this API.