Rolls this environment back to a prior pinned version (FR-018..FR-023). target_version must name a successful forward-promote deployment row on this env — rollback re-runs the deployment at that row’s commit_sha. Rollback is a promote at an older commit: it writes a fresh env-keyed snapshot, commits the env pointer, and dispatches the build. Returns 202 with the created deployment row; poll GET /v1/deployments/{deployment_id} to watch the build complete.
Feature-gated: while the enable_env_rollback flag is OFF for the caller’s tenant this route responds 404 as if it did not exist.
Application ID for tenant scoping
API key (sk_agentmark_*)
Rollback ran — the snapshot was written, the env pointer was committed, and the build was dispatched.