Apply

Promote (pointer-swap) a prior release

Pointer-swap recovery: atomically point live_release_id and every project-owned subdomain at a prior release's materialized deployment without re-running the apply pipeline. Refuses non-promotable/no-op targets and targets whose release-state snapshot or deployment row no longer survives (PROMOTE_DEPLOYMENT_UNSERVABLE). Computes a diff vs the current release and emits structured warnings (MIGRATIONS_NOT_REVERSIBLE, FUNCTION_VERSION_MISMATCH) the caller can opt into via allow_warning_codes. Durable edge-pointer updates run immediately after commit and remain retryable; the response's edge.verify_url composes with run402 deploy verify --wait. Flushes ssr_cache and logs to operation history as operation_kind: "promote". On success with a public site, urls.console joins urls.site and next_actions carries the same poll and (once, until answered) hand_to_member promotion-offer entries a commit response carries — see DeployCommitResponse.

post/apply/v1/releases/{release_id}/promote

Request

  • Base URL: https://api.run402.com
  • URL: https://api.run402.com/apply/v1/releases/{release_id}/promote
  • Auth: API key in header SIGN-IN-WITH-X

Path parameters

release_idstring required

Headers

SIGN-IN-WITH-Xstring required

SIWX auth header — base64-encoded JSON payload containing a signed CAIP-122 (EIP-4361) message. See https://docs.x402.org/extensions/sign-in-with-x.

Request body

allow_warning_codesstring[]

Warning codes the caller opts into. Promote fails with 409 if the warning set is not a subset of allowed codes.

project_idstring required

Project id of the release's owning project (cross-check).

Response

Promote committed. Origin state is active; public serving may still be converging as reported by edge.

status'ok'
release_idstring
operation_idstring
previous_release_idstring nullable
warningsobject[]
urlsobject

site is the project's public URL, present when the project owns at least one subdomain. console is the project's page in the console, present exactly when site is present.

Example response

{
  "next_actions": [
    {
      "method": "POST",
      "path": "/tiers/v1/hobby",
      "auth": "x402"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.