Skip to content

Authentication

All task endpoints require API key authentication. API keys are scoped to a team, so all tasks created with a key belong to that team.

Include your API key in every request using one of these methods:

Terminal window
# Authorization header (recommended)
curl https://api.asyncqueue.io/v1/tasks \
-H "Authorization: Bearer your-api-key"
# X-API-Key header
curl https://api.asyncqueue.io/v1/tasks \
-H "X-API-Key: your-api-key"

API keys are managed through the dashboard or the team management API.

Create API keys from the dashboard or via the API (requires JWT authentication):

Terminal window
curl -X POST https://api.asyncqueue.io/teams/{teamId}/apikeys \
-H "Authorization: Bearer your-jwt-token" \
-H "Content-Type: application/json" \
-d '{"name": "Production Key"}'

The full key is returned only once on creation. Store it securely.

Terminal window
curl -X POST https://api.asyncqueue.io/apikeys/{keyId}/revoke \
-H "Authorization: Bearer your-jwt-token"

Revoked keys are immediately rejected on all future requests.

Missing or invalid keys return standard error responses:

// 401 - No API key provided
{"error": "API key required"}
// 401 - Invalid or revoked key
{"error": "Invalid or revoked API key"}
// 403 - Accessing another team's resource
{"error": "Access denied"}

Every response includes rate limit headers:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1705312260

When you exceed the limit, the API returns 429 Too Many Requests with a Retry-After header. Rate limits are tracked per team - all API keys on the same team share one counter.

FeatureFreePro
API rate limit60 requests/min600 requests/min
API keys per team1Unlimited
Team members2Unlimited
Max wait time30 seconds120 seconds