Skip to main content
Call queues (ACD queues) hold inbound callers in a waiting pool and distribute them to available agents according to a configurable strategy. Each queue has a queue_number that callers dial or that DIDs route to, a timeout controlling the maximum hold time in seconds, and a status flag controlling whether the queue is active. All endpoints require an active admin session. The list endpoint supports an optional search parameter that matches against name, queue_number, and strategy. List and show responses include the parent tenant and the assigned agents relations.

GET /api/queues

Returns all call queues ordered by creation date descending, with tenant and agents relations included. Query parameters
Optional. Filters queues whose name, queue_number, or strategy contains the given string (case-insensitive).
message
string
Value is "Queues fetched successfully.".
data
array
Array of queue objects.
curl https://your-instance.laracopilot.com/api/queues \
  -H "Accept: application/json" \
  -b cookies.txt

POST /api/queues

Creates a new call queue and returns 201 Created with the record.
tenant_id
integer
required
ID of the tenant to assign this queue to. Must reference an existing tenant.
name
string
required
Human-readable queue name. Maximum 255 characters.
queue_number
string
required
Dialable number or short code for the queue, e.g. "5001". Maximum 20 characters.
strategy
string
required
Agent selection strategy, e.g. roundrobin, leastrecent, ringall. Maximum 100 characters.
timeout
integer
required
Maximum caller wait time in seconds. Minimum value: 1.
status
string
required
Lifecycle status, e.g. active or inactive. Maximum 50 characters.
message
string
Value is "Queue created successfully.".
data
object
The newly created queue record.
curl -X POST https://your-instance.laracopilot.com/api/queues \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -b cookies.txt \
  -d '{
    "tenant_id": 1,
    "name": "Sales Queue",
    "queue_number": "5001",
    "strategy": "leastrecent",
    "timeout": 120,
    "status": "active"
  }'

GET /api/queues/

Fetches a single call queue by its ID. Includes the parent tenant and agents relations. Path parameters
queue
integer
required
The numeric ID of the queue to retrieve.
message
string
Value is "Queue loaded successfully.".
data
object
The queue record with tenant and agents included.
curl https://your-instance.laracopilot.com/api/queues/2 \
  -H "Accept: application/json" \
  -b cookies.txt

PUT /api/queues/

Replaces all fields on an existing call queue. PATCH /api/queues/{queue} is also accepted and uses the same handler. Path parameters
queue
integer
required
The numeric ID of the queue to update.
tenant_id
integer
required
Must reference an existing tenant.
name
string
required
Maximum 255 characters.
queue_number
string
required
Maximum 20 characters.
strategy
string
required
Maximum 100 characters.
timeout
integer
required
Minimum value: 1.
status
string
required
Maximum 50 characters.
message
string
Value is "Queue updated successfully.".
data
object
The updated queue record.
curl -X PUT https://your-instance.laracopilot.com/api/queues/2 \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -b cookies.txt \
  -d '{
    "tenant_id": 1,
    "name": "Sales Queue",
    "queue_number": "5001",
    "strategy": "ringall",
    "timeout": 90,
    "status": "active"
  }'

DELETE /api/queues/

Permanently deletes the specified call queue. Path parameters
queue
integer
required
The numeric ID of the queue to delete.
message
string
Value is "Queue deleted successfully.".
curl -X DELETE https://your-instance.laracopilot.com/api/queues/2 \
  -H "Accept: application/json" \
  -b cookies.txt