API / release-a-pool-request-claim-via-api

API

Release a pool request claim via the Cloud Agents API

Drop the long-term claim that binds an agent to a self-hosted worker with POST https://api.cursor.com/v0/private-workers/claims/{id}/release. Official reference: Cloud Agents API → Release A Claim (Workers and Pools).

The Cloud Agents API v1 is in public beta. Paths keep the older private-workers name; they refer to the same Self-Hosted Machines workers. Authenticate with a service account API key via Basic auth (-u "$CURSOR_API_KEY:") or Authorization: Bearer. Other API key types are rejected. Availability: Beta (all plans) per the API overview.

The claim is a routing suggestion. Release does not check whether the worker is connected. A waiting follow-up returns to the pool queue at the next scheduling point. A connected worker finishes its current turn undisturbed. A replacement worker can claim the same agent immediately after release.

A second Claim A Pending Request while a live claim exists is rejected. Release first, then claim a new workerId.

--idle-release-timeout (env var CURSOR_WORKER_IDLE_RELEASE_TIMEOUT) makes the worker CLI exit after idle. This endpoint only drops the routing claim.

Path parameters

Param Meaning
id Pending request / agent id. Same value as id on Claim A Pending Request. No request body.
curl --request POST \
  --url "https://api.cursor.com/v0/private-workers/claims/bc-00000000-0000-0000-0000-000000000002/release" \
  -u "$CURSOR_API_KEY:"

Response

{
  "id": "bc-00000000-0000-0000-0000-000000000002",
  "workerId": "pw_123"
}

HTTP 404 means there is no live claim: already released, expired, or adopted. Do not retry a 404.

After release, pair with List Pending Pool Requests or Watch Pending Pool Requests to see the request return to the queue, then Claim A Pending Request when a replacement worker is ready.