---
title: "Change the plan of any workspace"
method: PATCH
path: "/api/v1/admin/workspaces/{workspaceId}"
tags: ["Admin"]
---

# Change the plan of any workspace

`PATCH /api/v1/admin/workspaces/{workspaceId}`

## Request

- Base URL: `https://otprun.com`
- URL: `https://otprun.com/api/v1/admin/workspaces/{workspaceId}`
- Auth: HTTP bearer

## Path parameters

- `workspaceId` integer, required

## Request body

- UpdateWorkspaceInputBody
  - `clear_trial` boolean: Remove the trial end date so the plan never expires
  - `plan` 'free' | 'starter' | 'growth' | 'scale'

## Response `200`

OK

- AdminWorkspaceBody
  - `created_at` string, date-time, required
  - `id` integer, required
  - `members` integer, required
  - `messages_30d` integer, required
  - `name` string, required
  - `owner_email` string, required
  - `plan` 'free' | 'starter' | 'growth' | 'scale', required
  - `projects` integer, required
  - `slots` integer, required
  - `slug` string, required
  - `trial_ends_at` string, date-time, nullable, required
  - `unlimited_at` string, date-time, nullable, required: When the platform granted unlimited use, null when the plan limits apply

## Other responses

- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/otprun/apis/otp-run-api.md) · [All operations](https://skmtc.dev/otprun/apis/otp-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/otprun/apis/otp-run-api/revisions/43d40d5f4050?raw)
