OmniDim Logo

    Bulk Call

    The Bulk Call module allows you to create, manage, and monitor bulk calling campaigns. You can schedule calls for multiple contacts, pause/resume campaigns, and track their progress.

    Overview

    The Bulk Call API enables you to manage large-scale calling campaigns:

    • Create bulk calling campaigns with multiple contacts
    • Schedule campaigns for future execution
    • Configure automatic retry for failed calls
    • Pause, resume, and reschedule active campaigns
    • Cancel campaigns before or during execution
    • Monitor campaign status and progress
    • Retrieve detailed campaign information and contact lists

    List Bulk Calls

    Retrieve a list of all bulk call campaigns with pagination and optional filtering.

    Parameters

    pageno
    int
    Optional

    Page number for pagination (default: 1)

    pagesize
    int
    Optional

    Number of items per page (default: 10)

    status
    string
    Optional

    Filter bulk calls by status

    Options:
    draft
    scheduled
    in_progress
    paused
    completed
    failed
    cancelled

    Example

    1 2 3 4 5 6 7 # Fetch all bulk calls with pagination response = client.bulk_call.fetch_bulk_calls(page=1, page_size=10) print(response) # Filter bulk calls by status response = client.bulk_call.fetch_bulk_calls(page=1, page_size=10, status="completed") print(response)

    Create Bulk Call

    Create a new bulk calling campaign with a list of contacts.

    Parameters

    name
    string
    Required

    Name of the bulk call campaign

    contact_list
    array
    Required

    Array of contact objects with phone numbers and optional context data

    phone_number_id
    string
    Required

    Your phone number id to use for making calls

    is_scheduled
    boolean
    Optional

    Whether the campaign should be scheduled for future execution (default: false)

    scheduled_datetime
    string
    Optional

    Scheduled execution time in format 'YYYY-MM-DD HH:MM:SS' (required if is_scheduled is true)

    timezone
    string
    Optional

    Timezone for scheduled execution (default: 'UTC')

    retry_config
    dict
    Optional

    Auto retry configuration object containing retry settings

    enabled_reschedule_call
    boolean
    Optional

    Enable automatic call rescheduling functionality (default: false). When enabled system will automatically able to reschedule the call to the requested time.

    concurrent_call_limit
    int
    Optional

    Maximum number of concurrent calls allowed (default: 1)

    Example

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 # Create an immediate bulk call with auto-retry bulk_call_data = { "name": "Customer Follow-up Campaign", "contact_list": [ { "phone_number": "+15551234567", "customer_name": "John Doe", "account_id": "ACC-12345" }, { "phone_number": "+15559876543", "customer_name": "Jane Smith", "account_id": "ACC-67890" } ], "phone_number_id": 1, # get the from number id from phone number API. /api/v1/phone_number/list "is_scheduled": False, "retry_config": { "auto_retry": True, "auto_retry_schedule": "next_day", "retry_limit": 2 }, "enabled_reschedule_call": True } response = client.bulk_call.create_bulk_call(bulk_call_data) print(response) # Create a scheduled bulk call scheduled_bulk_call_data = { "name": "Scheduled Marketing Campaign", "contact_list": [ { "phone_number": "+15551234567", "customer_name": "John Doe", "priority": "high" } ], "phone_number_id": 1, # get the from number id from phone number API. /api/v1/phone_number/list "is_scheduled": True, "scheduled_datetime": "2024-12-25 10:00:00", "timezone": "America/New_York", } response = client.bulk_call.create_bulk_call(scheduled_bulk_call_data) print(response) # Create bulk call with scheduled retry (retry after 2 days and 6 hours) and enabled reschedule call scheduled_retry_bulk_call_data = { "name": "Follow-up Campaign with Scheduled Retry", "contact_list": [ { "phone_number": "+15551234567", "customer_name": "John Doe" } ], "phone_number_id": 1, "is_scheduled": False, "retry_config": { "auto_retry": True, "auto_retry_schedule": "scheduled_time", "retry_schedule_days": 2, "retry_schedule_hours": 6, "retry_limit": 2 }, "enabled_reschedule_call": True } response = client.bulk_call.create_bulk_call(scheduled_retry_bulk_call_data) print(response)

    Bulk Call Actions

    Perform actions on existing bulk call campaigns (pause, resume, reschedule).

    Parameters

    bulk_call_id
    int
    Required

    ID of the bulk call campaign

    action
    string
    Required

    Action to perform on the bulk call

    Options:
    pause
    resume
    reschedule
    new_scheduled_datetime
    string
    Optional

    New scheduled time in format 'YYYY-MM-DD HH:MM:SS' (required for reschedule action)

    new_timezone
    string
    Optional

    New timezone for rescheduled execution (optional, defaults to existing timezone)

    Example

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 # Pause a bulk call response = client.bulk_call.bulk_call_actions( bulk_call_id=123, action="pause" ) print(response) # Resume a bulk call response = client.bulk_call.bulk_call_actions( bulk_call_id=123, action="resume" ) print(response) # Reschedule a bulk call response = client.bulk_call.bulk_call_actions( bulk_call_id=123, action="reschedule", new_scheduled_datetime="2024-12-26 14:00:00", new_timezone="America/Los_Angeles" ) print(response)

    Cancel Bulk Call

    Cancel a bulk call campaign permanently.

    Parameters

    bulk_call_id
    int
    Required

    ID of the bulk call campaign to cancel

    Example

    1 2 3 # Cancel a bulk call response = client.bulk_call.cancel_bulk_call(bulk_call_id=123) print(response)

    Get Bulk Call Details

    Get detailed information about a specific bulk call campaign.

    Parameters

    bulk_call_id
    int
    Required

    ID of the bulk call campaign to retrieve

    Example

    1 2 3 # Get detailed information about a bulk call response = client.bulk_call.detail_bulk_call(bulk_call_id=123) print(response)

    Response Formats

    Success Response

    {
      "status": "success",
      "message": "Bulk call created successfully",
      "id": 123,
      "is_scheduled": false,
      "current_status": "draft"
    }

    Error Response

    {
      "status": "error",
      "message": "Error: Phone Number does not belong to user"
    }

    Bulk Call List Response

    {
      "status": "success",
      "records": [
        {
          "id": 123,
          "name": "Customer Follow-up Campaign",
          "status": "in_progress",
          "is_scheduled": false,
          "created_at": "2024-01-15T10:30:00Z",
          "total_contacts": 50,
          "completed_calls": 25,
          "failed_calls": 2
        }
      ],
      "total_records": 1
    }

    Campaign Statuses

    draft

    Campaign has been created but not yet started

    scheduled

    Campaign is scheduled for future execution

    in_progress

    Campaign is currently executing calls

    paused

    Campaign execution has been paused

    completed

    All calls in the campaign have been processed successfully

    failed

    Campaign execution failed due to errors

    cancelled

    Campaign has been cancelled and will not execute