> Fetch the index of every Tonbo docs page as Markdown at https://tonbo.dev/llms.txt

# When a member leaves

Last updated 12 November 2026

When a person leaves an organization, keep what they set up working, take them off it, and replace the keys they could still read. Removing a person is done in the console only. What happens at that moment is on [When someone leaves](https://tonbo.dev/docs/platform/members.md#leaving).

## Move their programs to Agents {#agents}

Every key that acts as the person is revoked when they leave, so a program or job that runs on one stops. Give each one a key that acts as an Agent instead, and restart it with that key (see [Add an Agent](https://tonbo.dev/docs/platform/agents.md#add-agent)):

**CLI**

```shell
tonbo agent create release-bot
tonbo api-key create release-bot-ci --member release-bot
```

**API**

```shell
export AGENT=$(curl -sS https://api.tonbo.dev/v1/agents \
  -H "Authorization: Bearer $TONBO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"release-bot"}' | jq -r .data.subject)

curl -sS https://api.tonbo.dev/v1/api-keys \
  -H "Authorization: Bearer $TONBO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"release-bot-ci","member":"'"$AGENT"'"}'
```

## Make sure another person is an owner {#owner}

An organization keeps at least one person as owner, so its last owner cannot leave. Find the members and their roles, and give another person the `owner` role; only an owner grants it. In the console, change the role on the person’s page under **Members**. With the CLI or the API:

**CLI**

```shell
tonbo member list
```

**API**

```shell
curl -sS https://api.tonbo.dev/v1/members \
  -H "Authorization: Bearer $TONBO_API_KEY"
```

**CLI**

```shell
tonbo member update <member subject> --role owner
```

**API**

```shell
curl -sS -X PATCH https://api.tonbo.dev/v1/members/<member subject> \
  -H "Authorization: Bearer $TONBO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"role":"owner"}'
```

## Remove them {#remove}

An owner or an admin opens the person’s page under **Members** and chooses **Remove from** the organization; or the person chooses **Leave organization** on its **Settings** page. The CLI and the API have no step for either. Everything they created stays with the organization, including the Agents they created and those Agents’ keys.

## Replace the keys they could read {#rotate}

The Agents’ keys keep working after the person leaves. Rotate each key they held a copy of, such as one they created for an Agent or read from your secret store (see [Rotate a key](https://tonbo.dev/docs/platform/rotate-key.md)). Listing the account’s keys shows who each acts as, and none of them acts as the person any more:

**CLI**

```shell
tonbo api-key list
```

**API**

```shell
curl -sS https://api.tonbo.dev/v1/api-keys \
  -H "Authorization: Bearer $TONBO_API_KEY"
```
