Unlock the fix
Unlocks the fix of an issue and returns it: a prompt written for your coding agent, to paste into Cursor, Claude Code or Lovable.
OAuth permission: fixes:unlock · an API key has them all
The first call for an issue uses one fix from your plan (charged: true); later calls are free. Send an [Idempotency-Key](page:idempotency): a replayed call never charges twice. Rustine never edits your code.
Path parameters
issue_idstringrequiredIssue id.
Headers
Idempotency-KeystringoptionalA unique key (1 to 255 printable characters, a UUID is fine) to retry this request safely: the first response is replayed for 24 hours; the same key with another request answers 409
idempotency_conflict.
Response
objectstringissue_idstringThe issue.
promptstringThe fix as instructions for a coding agent.
ai_fixstring | nullA patch written by Rustine, if any.
chargedbooleanTrue when this call unlocked the fix and consumed one; false when it was already unlocked.
fixes_leftintegerFixes left this period after this call (quota plus pack credits).
Errors
| Status | error.code | What happens |
|---|---|---|
| 400 | idempotency_key_invalid | The Idempotency-Key header must be 1 to 255 printable characters. |
| 401 | authentication_required | No key in the request. Pass it in the Authorization: Bearer rst_… header, never in the address. |
| 401 | invalid_api_key | The key or OAuth token is wrong, revoked or expired. Check it is copied in full, or create a new key. |
| 402 | api_plan_required | The workspace is on the Free plan. The API comes with Pro, or on a 14-day trial with Solo. |
| 402 | api_trial_ended | Solo's 14-day trial is over. Move to Pro: your keys work again at once. |
| 402 | fix_quota_exceeded | This period's fixes are used up, and no pack credit is left. A fix already unlocked stays readable. |
| 402 | project_paused | The project is paused: your plan covers fewer projects than your workspace has. Its issues stay readable, but nothing new runs. |
| 403 | scope_missing | The OAuth token lacks the permission this route needs (shown on its page). Reconnect the agent to grant it. An API key has every permission. |
| 404 | resource_not_found | Nothing with this id in the key's workspace. An object of another workspace answers the same: its existence is never revealed. |
| 409 | proof_required | The site must first be proved yours (full audit, fix, marking). Prove it in the app: DNS, file or meta tag. |
| 409 | idempotency_conflict | This Idempotency-Key was already used for another request (method, path or body). A new action takes a new key. |
| 409 | idempotency_in_progress | A request with this Idempotency-Key is still running. Retry in a moment. |
| 429 | rate_limited | Too many requests for this key (120 per minute). Wait Retry-After seconds. |
| 500 | internal_error | An error on our side, reported automatically. Retry later; give the Request-Id to support if it comes back. |
| 503 | service_unavailable | Rustine is unavailable for a moment. Retry with the same Idempotency-Key. |