Skip to content

Quick Start

This guide walks you through creating an account, generating an API key, and submitting your first task.

Sign up at asyncqueue.io/signup to get access to the dashboard and API.

Once logged in, navigate to Settings > API Keys and create a new key. Copy it somewhere safe - you won’t be able to see it again.

Use curl to submit a task to the default queue:

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/webhooks/process",
"payload": {
"email": "[email protected]",
"action": "send_welcome"
}
}'

When the task is ready to execute, AsyncQueue sends a POST request to your webhook_url with the task payload:

{
"task_id": "task_abc123",
"queue": "default",
"payload": {
"email": "[email protected]",
"action": "send_welcome"
},
"attempt": 1
}

Return a 200 status code to mark the task as completed. Any other status code triggers a retry based on your queue’s retry policy.

Retrieve the current state of a task:

Terminal window
curl https://api.asyncqueue.io/v1/tasks/task_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"