# Create a workspace

**POST** `/v1/workspaces`

⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️

Creates a new free-plan workspace owned by the authenticated user. For agent tokens the workspace is created for the agent's sponsor, and the agent's permission policy treats this as an admin action — under the default policy the sponsor approves it first.

Base URL: `https://api.prisma.io`

Tags: `[Experimental]`

## Authorization

Any ONE of the following options authorizes this operation; every scheme listed within an option is required together.

| Option | Scheme | Type | Sent as | Scopes |
| --- | --- | --- | --- | --- |
| Option 1 | `OAuth2` | `oauth2` | `Authorization: Bearer <access token>` | `offline_access`, `workspace:admin` |
| Option 2 | `Bearer` | `http` | `Authorization: Bearer <token>` (JWT) | — |

### OAuth 2.0 flows

- **OAuth2 · authorizationCode**
  - Authorization URL: `https://auth.prisma.io/authorize`
  - Token URL: `https://auth.prisma.io/token`
  - Refresh URL: `https://auth.prisma.io/token`
  - Scope `offline_access` — Offline access
  - Scope `workspace:admin` — Full access to workspace resources

## Request body

Optional. Media type: `application/json`

### Example request body

```json
{
  "displayName": "string"
}
```

## Responses

| Status | Description | Media type |
| --- | --- | --- |
| `201` | The created workspace. | `application/json` |
| `401` | Missing or invalid authorization token. | `application/json` |
| `403` | Workspace integration tokens cannot create workspaces; a user-attributable actor is required. | `application/json` |
| `413` | Request body exceeds this endpoint's size cap. | `application/json` |

### Example response: 201 — The created workspace.

```json
{
  "data": {
    "createdAt": "2026-06-09T00:00:00Z",
    "id": "string",
    "name": "string",
    "type": "workspace",
    "url": "https://example.com"
  }
}
```

### Example response: 401 — Missing or invalid authorization token.

```json
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
```

### Example response: 403 — Workspace integration tokens cannot create workspaces; a user-attributable actor is required.

```json
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
```

### Example response: 413 — Request body exceeds this endpoint's size cap.

```json
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
```

## Related pages

- [[Experimental]](./tags/experimental.md)
- [Acquire Alchemy deploy lease](./postv1projectsbyprojectidbranchesbybranchidalchemy-statelease.md)
- [Agents](./tags/agents.md)
- [Alchemy state store version](./getv1projectsbyprojectidbranchesbybranchidalchemy-stateversion.md)
- [Buckets](./tags/buckets.md)
- [Connections](./tags/connections.md)
- [Create a branch](./postv1projectsbyprojectidbranches.md)
- [Create a custom domain](./postv1appsbyappiddomains.md)
- [Create a custom domain](./postv1servicesbyserviceiddomains.md)
- [Create an environment variable](./postv1environment-variables.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
