API Worker
Trigger background jobs over HTTP with bearer auth.
Authentication
Send WORKER_SECRET as Authorization Bearer token (or x-worker-secret header).
Authorization: Bearer <WORKER_SECRET>GET /api/worker/run
List allowed job names and current runtime mode.
{
"jobs": ["worker.tick", "session.health_check", "..."],
"mode": "simulator"
}POST /api/worker/run
Execute one job. Invalid job names return 400; bad secrets return 401.
curl -X POST http://localhost:3000/api/worker/run -H "Authorization: Bearer $WORKER_SECRET" -H "Content-Type: application/json" -d '{"job":"comment.generate"}'Request body
{
"job": "worker.tick"
}Success response
{
"ok": true,
"job": "comment.generate",
"message": "Generated 3 drafts",
"count": 3,
"details": null,
"mode": "simulator"
}Job names
- worker.tick
- sesi.health_check
- proxy.rotate
- listener.poll
- comment.generate
- comment.send
- content.generate
- content.publish
- knowledge.ingest
- skill.execute
- usage.rollup
- notify.dispatch
Butuh UI produk? Buka command center