Rustine docs
API › Issues

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.

POSThttps://api.rustine.io/v1/issues/{issue_id}/fix

OAuth permission: fixes:unlock · an API key has them all

Open in ClaudeOpen in ChatGPT

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_idstringrequired

    Issue id.

Headers

  • Idempotency-Keystringoptional

    A 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

  • objectstring
  • issue_idstring

    The issue.

  • promptstring

    The fix as instructions for a coding agent.

  • ai_fixstring | null

    A patch written by Rustine, if any.

  • chargedboolean

    True when this call unlocked the fix and consumed one; false when it was already unlocked.

  • fixes_leftinteger

    Fixes left this period after this call (quota plus pack credits).

Errors

Statuserror.codeWhat happens
400idempotency_key_invalidThe Idempotency-Key header must be 1 to 255 printable characters.
401authentication_requiredNo key in the request. Pass it in the Authorization: Bearer rst_… header, never in the address.
401invalid_api_keyThe key or OAuth token is wrong, revoked or expired. Check it is copied in full, or create a new key.
402api_plan_requiredThe workspace is on the Free plan. The API comes with Pro, or on a 14-day trial with Solo.
402api_trial_endedSolo's 14-day trial is over. Move to Pro: your keys work again at once.
402fix_quota_exceededThis period's fixes are used up, and no pack credit is left. A fix already unlocked stays readable.
402project_pausedThe project is paused: your plan covers fewer projects than your workspace has. Its issues stay readable, but nothing new runs.
403scope_missingThe OAuth token lacks the permission this route needs (shown on its page). Reconnect the agent to grant it. An API key has every permission.
404resource_not_foundNothing with this id in the key's workspace. An object of another workspace answers the same: its existence is never revealed.
409proof_requiredThe site must first be proved yours (full audit, fix, marking). Prove it in the app: DNS, file or meta tag.
409idempotency_conflictThis Idempotency-Key was already used for another request (method, path or body). A new action takes a new key.
409idempotency_in_progressA request with this Idempotency-Key is still running. Retry in a moment.
429rate_limitedToo many requests for this key (120 per minute). Wait Retry-After seconds.
500internal_errorAn error on our side, reported automatically. Retry later; give the Request-Id to support if it comes back.
503service_unavailableRustine is unavailable for a moment. Retry with the same Idempotency-Key.

↵ Enter to open, Esc to close