---
title: "Create a Workspace"
method: POST
path: "/workspaces"
tags: ["workspaces"]
---

# Create a Workspace

`POST /workspaces`

Workspaces represent a unit of infrastructure managed by terraform.

To create a workspace you must pass `name` attribute and `environment` relationship.

A workspace might be linked to a VCS repository, so that any git push will trigger a terraform Run
in the workspace.

## Response `201`

Success.

## Other responses

- `404` — Environment not found, or user unauthorized to perform action.
- `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)
