# Update Workspace

> Rename the workspace or change its slug.

Requires an API key with the `write` scope.

The user who created the key must be an owner or admin of the workspace.

## Body Parameters

<ParamField body="name" type="string">
  New name, up to 255 characters.
</ParamField>

<ParamField body="slug" type="string">
  New URL slug: lowercase letters, digits and single hyphens, up to 100 characters. Must be unique.
</ParamField>

## Response

Returns the updated workspace in `data`.

<RequestExample>
```bash cURL
curl -X PATCH "https://api.foxreach.io/api/v1/workspace" \
  -H "X-API-Key: otr_your_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "Acme Outbound"}'
```

```python Python SDK
from foxreach import FoxReach

client = FoxReach(api_key="otr_your_key")
client.workspace.update(name="Acme Outbound")
```

```typescript TypeScript SDK
import { FoxReach } from "foxreach";

const client = new FoxReach({ apiKey: "otr_your_key" });
await client.workspace.update({ name: "Acme Outbound" });
```

</RequestExample>

<ResponseExample>
```json
{ "data": { "id": "ws_abc123", "name": "Acme Outbound", "slug": "acme", "ownerId": "usr_1", "isPersonal": false, "role": "owner", "memberCount": 3, "createdAt": "2026-10-01T08:00:00+00:00" } }
```
</ResponseExample>

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | The user who created the key does not have the required role in this workspace (`insufficient_role`), or is no longer a member (`key_creator_not_member`) |
| `400` | Slug already taken |
| `422` | Name or slug is not valid |

## Rate Limit

- **120 requests per minute, shared by every `write` call in your workspace.** Fixed 60-second window.
- Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (unix epoch seconds) and `X-RateLimit-Bucket` (`write`).
- A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns, see [Rate Limiting](/rate-limiting).
