Overview
POST/processing/jobs/claimprocessing

Claim queued jobs (worker pull)

Atomically claim up to `batch` queued jobs for this worker. Returns an empty array when no jobs are available — never blocks. Ecosystem-scoped via RLS to the caller's api-token.

Auth: bearerAuth — calls run as the authenticated user.

Request body

application/json · optional

  • jobTypesoptionalstring[]

    Filter to specific job types; absent = any type

  • minPriorityoptionalinteger

    Claim only jobs with priority >= this value (interactive lane = 100)

  • batchoptionalinteger

    Max jobs to claim (default 1)

  • leaseMsoptionalinteger

    Lease duration in ms (default 30 000)

  • workerIdoptionalstring

    Label for the claimed rows; defaults to api-token name or userId

Example
{
  "jobTypes": [
    "string"
  ],
  "minPriority": 0,
  "batch": 0,
  "leaseMs": 0,
  "workerId": "string"
}
Responses
200

Claimed jobs (may be empty)

  • jobsAiProcessingClaimedJob[]
Example
{
  "jobs": [
    {
      "id": "string",
      "jobType": "string",
      "targetKind": "string",
      "targetId": "string",
      "payload": {},
      "claimedAt": "string",
      "leaseExpiresAt": "string",
      "leaseToken": "string"
    }
  ]
}
400

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
401

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/processing/jobs/claim" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "jobTypes": [
    "string"
  ],
  "minPriority": 0,
  "batch": 0,
  "leaseMs": 0,
  "workerId": "string"
}'
JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/processing/jobs/claim", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: "{\n  \"jobTypes\": [\n    \"string\"\n  ],\n  \"minPriority\": 0,\n  \"batch\": 0,\n  \"leaseMs\": 0,\n  \"workerId\": \"string\"\n}",
});
const data = await res.json();