---
title: "Restore state version"
method: POST
path: "/workspaces/{workspaceId}/state-versions/{stateVersionId}/actions/restore"
tags: ["Workspace State"]
---

# Restore state version

`POST /workspaces/{workspaceId}/state-versions/{stateVersionId}/actions/restore`

Restores a specific state version as the current state for the workspace

## Response `200`

State version restored successfully

- StateVersion
  - `id` string — Unique identifier for a state version
  - `serial` integer — State serial number (monotonically increasing)
  - `terraformVersion` string, nullable — Terraform version used to create this state version
  - `createdAt` string, date-time — Timestamp when the state version was created
  - `createdBy` string, nullable — Owner/user who created this state version
  - `downloadUrl` string, uri, nullable — Presigned URL for downloading the state file. May be null if the state file is not available.

## Other responses

- `400` — Bad Request Error
- `401` — Unauthorized Error
- `403` — Insufficient permissions
- `404` — Not Found Error
- `409` — Conflict Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/firefly/apis/api-gateway.md) · [All operations](https://skmtc.net/firefly/apis/api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/firefly/api-gateway/revisions/eea119b4113f/schema)
