Skip to content

HTTP API

The HTTP API is available on port 6790 by default.

Endpoints

Jobs

POST /push
Content-Type: application/json
{
"queue": "emails",
"data": { "to": "user@test.com" },
"priority": 10,
"delay": 5000
}
POST /pull
Content-Type: application/json
{ "queue": "emails", "timeout": 5000 }
POST /ack
Content-Type: application/json
{ "id": "123", "result": { "sent": true } }
POST /fail
Content-Type: application/json
{ "id": "123", "error": "Failed to send" }

Monitoring

GET /health
GET /metrics # Prometheus format
GET /stats

Authentication

Authorization: Bearer your-token

WebSocket

const ws = new WebSocket('ws://localhost:6790/events');
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log(data.event, data.jobId);
};

Server-Sent Events

const events = new EventSource('http://localhost:6790/events');
events.onmessage = (event) => {
console.log(JSON.parse(event.data));
};