Skip to content

Simple REST API

AsyncQueue provides a clean REST API that lets you create a task in a single HTTP request. No SDK required, no complex protocols - just standard HTTP with JSON payloads.

Terminal window
curl -X POST https://api.asyncqueue.io/v1/tasks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"queue": "default",
"webhook_url": "https://your-app.com/hook",
"payload": {"key": "value"}
}'

That’s it. Your task is queued and will be delivered to your webhook endpoint.

  • RESTful - Standard HTTP methods (GET, POST, PATCH, DELETE) with predictable URL patterns
  • JSON everywhere - Request and response bodies use JSON
  • Bearer auth - Simple API key authentication via the Authorization header
  • Consistent errors - All errors return a JSON body with error and message fields
MethodEndpointDescription
POST/v1/tasksCreate a new task
GET/v1/tasks/:idGet task details and status
GET/v1/tasksList tasks with filtering
DELETE/v1/tasks/:idRemove a pending task
POST/v1/queuesCreate a queue
GET/v1/queuesList all queues
PATCH/v1/queues/:nameUpdate queue settings
POST/v1/queues/:name/pausePause a queue
POST/v1/queues/:name/resumeResume a queue

Because it is plain HTTP, you can use AsyncQueue from any language or platform:

# Python
import requests
requests.post("https://api.asyncqueue.io/v1/tasks",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"queue": "default", "webhook_url": "https://your-app.com/hook", "payload": {}}
)
// JavaScript
fetch("https://api.asyncqueue.io/v1/tasks", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
queue: "default",
webhook_url: "https://your-app.com/hook",
payload: {},
}),
});
Terminal window
# cURL, shell scripts, cron jobs
curl -X POST https://api.asyncqueue.io/v1/tasks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"queue":"default","webhook_url":"https://your-app.com/hook","payload":{}}'