---
title: "Upgrade workspace"
method: POST
path: "/billing/upgrade"
tags: ["billing"]
---

# Upgrade workspace

`POST /billing/upgrade`

## Request

- Base URL: `https://www.dench.com/api/v1`
- URL: `https://www.dench.com/api/v1/billing/upgrade`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Create a workspace upgrade checkout link.

## Request body

- object
  - `tier` 'pro' | 'max' | 'cloud' | 'desktop' | 'api'
  - `billingCycle` 'monthly' | 'yearly'
  - `requestId` string
  - `returnPath` string: Internal return path beginning with /.

## Response `200`

Successful response

- union
  - object: Existing subscription updated in place.
    - `updated` true, required
    - `tier` string, required
    - `billingCycle` string
    - `stripeSubscriptionId` string, required
  - object: Stripe Checkout link to complete the upgrade.
    - `url` string, nullable, required

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid authentication
- `404`: Operation or resource not found
- `500`: Server error

---

[API](https://skmtc.dev/dench/apis/dench-api.md) - [All operations](https://skmtc.dev/dench/apis/dench-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dench/apis/dench-api/revisions/4a145b38f19c?raw)
