---
title: "Create a State Version"
method: POST
path: "/state-versions"
tags: ["state-versions"]
---

# Create a State Version

`POST /state-versions`

Create a state version and set it as the current state version for the given workspace.

## Response `201`

Successfully created a state version

## Other responses

- `404` — Workspace not found, workspace does not have a current state version, or user unauthorized to perform action.
- `409` — Conflict; check the error object for more information.
- `412` — Precondition failed; check the error object for more information.
- `422` — Malformed request body (missing attributes, wrong types, etc.).
- `4XX` — Client error.
- `5XX` — Server error.

---

[API](https://skmtc.net/scalr/apis/scalr-iacp-api.md) · [All operations](https://skmtc.net/scalr/apis/scalr-iacp-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/scalr/scalr-iacp-api/versions/fc927526ad12/schema)
