Skip to main content
The Queues API provides access to call queue data, allowing you to track the status of inbound and outbound calls in real-time. This is essential for monitoring active campaigns, call center operations, and queue management.

Base endpoint

/api/v1/business/{businessId}/queues
All queue endpoints require API key authentication with appropriate business permissions.

Outbound call queues

Get outbound queue count

Retrieve the total count of outbound call queue entries matching the specified filters.
POST /api/v1/business/{businessId}/queues/outbound/count
businessId
number
required
The unique identifier of the business
Request body:
filters
object
Optional filters for counting queue entries
Example request:
curl -X POST https://app.iqra.bot/api/v1/business/12345/queues/outbound/count \
  -H "Authorization: Token YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filters": {
      "status": "Pending",
      "campaignId": "campaign_abc123"
    }
  }'
Response:
success
boolean
Whether the request succeeded
data
number
Total count of matching queue entries

Get outbound queue entries

Retrieve paginated outbound call queue entries with filtering and sorting.
POST /api/v1/business/{businessId}/queues/outbound
page
number
Page number (1-indexed, default: 1)
pageSize
number
Number of results per page (default: 50, max: 100)
filters
object
Filter criteria (same as count endpoint)
sortBy
string
Field to sort by: createdAt, updatedAt, scheduledTime
sortOrder
string
Sort direction: asc or desc

Get single outbound queue entry

Retrieve detailed information about a specific outbound queue entry.
POST /api/v1/business/{businessId}/queues/outbound/{queueId}
queueId
string
required
The unique identifier of the queue entry

Inbound call queues

Get inbound queue count

Retrieve the total count of inbound call queue entries.
POST /api/v1/business/{businessId}/queues/inbound/count
Similar structure to the outbound count endpoint.

Get inbound queue entries

Retrieve paginated inbound call queue entries.
POST /api/v1/business/{businessId}/queues/inbound

Get single inbound queue entry

Retrieve detailed information about a specific inbound queue entry.
POST /api/v1/business/{businessId}/queues/inbound/{queueId}

Queue entry structure

id
string
Unique identifier for the queue entry
businessId
number
Associated business ID
campaignId
string
Campaign identifier (for outbound calls)
agentId
string
Agent handling the call
phoneNumber
string
Phone number being called (outbound) or calling (inbound)
status
string
Queue status: Pending, InProgress, Completed, Failed, Cancelled
scheduledTime
string
When the call is scheduled (ISO 8601)
startedAt
string
When the call started (ISO 8601)
completedAt
string
When the call completed (ISO 8601)
retryCount
number
Number of retry attempts
lastError
string
Last error message if failed

Use cases

Campaign monitoring

Track the progress of outbound calling campaigns in real-time

Queue analytics

Analyze call queue metrics and performance

Call center operations

Monitor inbound call queues for contact centers

Retry management

Identify and manage failed calls for retry

Error codes

CodeDescription
INVALID_BUSINESS_IDThe business ID does not exist or you don’t have access
INVALID_QUEUE_IDThe specified queue entry was not found
INVALID_FILTERSFilter parameters are malformed
PERMISSION_DENIEDAPI key lacks required permissions

Build docs developers (and LLMs) love