# Change the plan or the seat count

Takes `plan` (broker, brokerage or enterprise) and an optional `seats`, and answers one of two shapes: `{checkoutUrl}` when there is no subscription yet — a hosted page for a person to open — or `{applied: true, plan, seats}` when there is one, changed in place with prorations. Omitting `seats` keeps the seats already paid for. Needs the workspace's owner or admin seat.

Access class: `workspace:admin`.

## Endpoint

`POST /v1/billing/upgrade`

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "plan": "string",
    "seats": 1.5
  },
  "params": {},
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "checkoutUrl": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
