Skip to content

Queues

Queues are logical groupings for your tasks. Each queue can have its own concurrency, retry, and timeout settings.

POST /v1/queues
FieldTypeRequiredDescription
namestringYesUnique queue name (alphanumeric and hyphens)
concurrencyintegerNoMax concurrent task executions (default: 5)
max_retriesintegerNoRetry attempts on failure (default: 3)
retry_backoffstringNoBackoff strategy: fixed, exponential (default: exponential)
timeoutintegerNoWebhook timeout in seconds (default: 30)
Terminal window
curl -X POST https://api.asyncqueue.io/v1/queues \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "email-notifications",
"concurrency": 10,
"max_retries": 5,
"retry_backoff": "exponential",
"timeout": 60
}'
GET /v1/queues

Returns all queues for the authenticated team.

GET /v1/queues/:queue_name

Returns queue configuration and current statistics:

{
"name": "email-notifications",
"concurrency": 10,
"max_retries": 5,
"retry_backoff": "exponential",
"timeout": 60,
"stats": {
"pending": 42,
"active": 3,
"completed": 15890,
"failed": 12
}
}
PATCH /v1/queues/:queue_name

Update queue settings. Changes apply to new tasks only - tasks already in the queue retain the settings that were active when they were created.

POST /v1/queues/:queue_name/pause
POST /v1/queues/:queue_name/resume

Pausing a queue stops new task executions. Tasks already being executed will complete normally. New tasks can still be added to a paused queue.

DELETE /v1/queues/:queue_name

Deletes a queue and all its pending tasks. Active tasks will complete normally. This action is irreversible.