Release orphaned holds
POST https://weights.fyi/run/v1/reservations/release-orphaned
Authorization: Bearer <token> scope: manage- Available since
- Not available yet: built on 2026-11-16, live with the deploy that carries it.
- Answer time
- synchronous: the holds are released and recorded before the answer.
Returns to your credit every pack hold that nothing can settle any more. A pack holds credit only while a worker runs it; a hold whose pack is not running, or whose stage or plan has ended, is orphaned, whatever its age. GET /v1/workspace/snapshot lists each hold with orphaned and why, and their total in money.orphaned_holds.
All of them are released in one transaction, and each is recorded in GET /v1/workspace/audit as an incident: the service should have released it by itself. A repeat finds nothing and releases nothing. The call takes no body. Releasing holds changes billing, which only the workspace's owner does: it needs a manage key the owner issued, or the owner's own session. An admin's key or session, or a key no person issued, answers 403 workspace_role_required and releases nothing. The owner finds the same release on the Money and budgets page.
Request
| Name | Where | Required | Meaning |
|---|---|---|---|
Authorization | header | yes | Bearer and a token with manage that the owner issued, or the owner's session with its CSRF header. |
Return value
200 OK with what was released.
| Field | Meaning |
|---|---|
released_holds | How many holds were released. |
released_usd, released_usd_micros | Their total, back in your credit. |
by_reason | For each why: how many holds, their total and the reason in words. |
holds | Each released hold: id, reference, amount_usd_micros, why, why_words and the incident_id of its audit event. |
Errors
| Status | Code | When it happens | What to do |
|---|---|---|---|
401 | unauthorized, invalid_token, token_revoked, token_expired | No token, or one that does not work. | Use a valid token. |
403 | scope_required, csrf_required | The credential lacks manage, or a session sent no CSRF header. | Ask the owner. |
403 | workspace_role_required | The key's issuer or the signed-in person is not the workspace's owner, or no person issued the key. | Use a key the owner issued, or ask the owner to release them on the Money and budgets page. |
403 | account_suspended | The account is suspended. | Talk to us. |
Examples
curl -s -X POST https://weights.fyi/run/v1/reservations/release-orphaned -H "Authorization: Bearer $WEIGHTS_API_KEY"{
"released_holds": 1, "released_usd": 0.322, "released_usd_micros": 322000,
"by_reason": {"pack_pending": {"holds": 1, "usd_micros": 322000, "words": "its pack is queued, not running"}},
"holds": [{"id": 9811, "reference": "kaggle-entry-b~classify:pack:pack-7:attempt:1", "amount_usd_micros": 322000,
"why": "pack_pending", "why_words": "its pack is queued, not running", "incident_id": 88121}]
}History
- 2026-11-16 (built, live with the deploy that carries it): the release, one incident per hold, for the workspace's owner only.