# update_workspace

`tools/call` · `POST /clanker/v1/workspace:update`

Change the workspace's name, slug or allowed email domains. Only the fields given change; people whose email domain is allowed join on sign-in. Returns the workspace. Needs write access, and your person must be a workspace owner or admin.

- Area: Workspace
- Needs the write grant. Idempotent.

## Inputs

- `name` (string): The workspace's name, such as Acme.
- `slug` (string): The workspace's slug in its URLs, such as acme. Links with the old one stop working.
- `allowedDomains` (array of strings): Email domains whose people join on sign-in, such as acme.dev. [] for none.

## Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_workspace",
    "arguments": {
      "name": "Acme",
      "allowedDomains": [
        "acme.dev"
      ]
    }
  }
}
```

## HTTP request

The same call over the clanker HTTP API, with a clanker OAuth access token:

```bash
curl -X POST https://api.clankership.com/clanker/v1/workspace:update \
  -H "Authorization: Bearer $CLANKER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme",
    "allowedDomains": [
      "acme.dev"
    ]
  }'
```
