Renew work-item claim

Extends a lease the caller still holds, for agents whose unit of work outlives the original lease window. Holder-only: a non-holder extending someone else’s lease would be a silent steal.

POST/api/v1/work-items/:id/claim

Authorization

work-items:assignapi key scoperequired
Required scope when calling with an API key.

Path parameters

idstringrequired
Canonical work-item ID

Example: work_01k2...

Request body

claim_ownerstringrequired
The same agent or session identifier that holds the lease
lease_secondsnumberoptional
New lease duration in seconds; defaults to 900, maximum 3600
Example request
{
  "claim_owner": "agent-7f3c",
  "lease_seconds": 900
}

Request

curl -X POST "https://www.digitalstack360.com/api/v1/work-items/work_01k2.../claim" \
  -H "Authorization: Bearer $DS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"claim_owner":"agent-7f3c","lease_seconds":900}'

Examples use a placeholder key from your environment. Store your key in $DS_API_KEY — never commit it.

Response

200 OK
{
  "data": {
    "claim": {
      "id": "work_01k2...",
      "key": "4210",
      "title": "Implement board projection API",
      "status": "ready",
      "priority": "high",
      "projectId": "proj_01k2...",
      "claimOwner": "agent-7f3c",
      "claimedAt": "2026-07-28T09:12:04Z",
      "claimExpiresAt": "2026-07-28T09:42:04Z"
    }
  }
}

Errors

401
missing_auth

No credentials provided

401
invalid_api_key

API key is invalid or revoked

403
scope_insufficient

Key lacks work-items:assign scope

400
invalid_request

claim_owner is missing or exceeds 200 characters, or lease_seconds is not a positive number of 3600 or fewer

404
not_found

Work item does not exist or is outside the key account

409
claim_not_held

You are not the holder, or the lease already expired — an expired lease may already belong to another agent, and reviving it would hand one item to two agents