# Update Workspace

> Rename the workspace or change its slug

- **URL**: https://orshot.com/docs/api-reference/workspace-update

---

Update the active workspace. `POST` is accepted as an alias for `PATCH`.

## Endpoint

```markdown tab="Endpoint"
https://api.orshot.com/v1/workspace
```

## Request Body

| Parameter    | Type   | Required | Description                                                                                            |
| ------------ | ------ | -------- | ------------------------------------------------------------------------------------------------------ |
| `title`      | String | No       | New display name, 1 to 100 characters                                                                  |
| `slug`       | String | No       | New URL slug: lowercase letters, numbers and hyphens, 3 to 48 characters, unique across Orshot         |

Changing the slug changes all of the workspace's URLs. Reserved slugs (like `admin` or `api`) are rejected with code `slug_reserved`.

## Request

**Request**
```js
await fetch("https://api.orshot.com/v1/workspace", {
  method: "PATCH",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <ORSHOT_API_KEY>",
  },
  body: JSON.stringify({
    title: "Acme Marketing",
  }),
});
```

**Response**
```json
{
  "data": {
    "updated": ["title"],
    "title": "Acme Marketing",
    "slug": "my-workspace",
    "url": "https://orshot.com/workspace/my-workspace"
  }
}
```

## Errors

| Status | Code             | Description                                        |
| ------ | ---------------- | -------------------------------------------------- |
| `400`  | `unknown_fields` | The request included fields outside the list above |
| `400`  | `slug_reserved`  | The requested slug is reserved                     |
| `400`  |                  | The slug is already taken or a value is invalid    |