# update_account_key

`tools/call` · `POST /clanker/v1/account-keys:update`

Rename an account API key or change its role. Only the fields given change; only an owner grants the owner role. Returns the key. Needs write access, and your person must be a workspace owner or admin.

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

## Inputs

- `key` (string, required): The key's ID from its list, such as Ak3mT8qWz1Lp.
- `name` (string): A new name, up to 100 characters, such as CI.
- `role` (string, one of: `owner`, `admin`, `member`, `viewer`): The role the key acts with: owner, admin, member or viewer.

## Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_account_key",
    "arguments": {
      "key": "Ak3mT8qWz1Lp",
      "role": "member"
    }
  }
}
```

## 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/account-keys:update \
  -H "Authorization: Bearer $CLANKER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "Ak3mT8qWz1Lp",
    "role": "member"
  }'
```
