# Set roles

A role decides what each person on a team account can see and change.

## Before you start

Do this first: [Invite people](/docs/account/team.md).

## See what each role can do

| Project                          | Owner | Admin | Editor |
| -------------------------------- | :---: | :---: | :----: |
| Edit files and agents            |   ✓   |   ✓   |    ✓   |
| Write and run evals              |   ✓   |   ✓   |    ✓   |
| Publish                          |   ✓   |   ✓   |    ✓   |
| Change settings and model limits |   ✓   |   ✓   |        |
| Manage API keys                  |   ✓   |   ✓   |        |
| Invite and remove people         |   ✓   |   ✓   |        |
| Delete the project               |   ✓   |       |        |

Account admins are admins in every project. Account members can't invite people, see billing or change settings.

## Change an account role

**Studio**

1. Open **Settings** > **Members**.
2. Open the **⋯** menu on Maya's row.
3. Click **Update role**.
4. Pick **Admin** as the **Role**.
5. Click **Save**. You should now see "Account role updated" and **Admin** in Maya's row.

**API**

1. Set `ACCOUNT_ID` to your account's id, the part after `/accounts/` in its Studio settings address: `export ACCOUNT_ID=<id>`.
2. List the members, with your [API key](/docs/authentication/api-keys.md):

```bash
curl https://api.veryfront.com/accounts/$ACCOUNT_ID/members \
  -H "Authorization: Bearer $VERYFRONT_API_KEY"
```

3. Set `USER_ID` to the person's `user_id`, found by their `email`: `export USER_ID=<user_id>`.
4. Set their role to `owner`, `admin` or `member`:

```bash
curl -X PATCH https://api.veryfront.com/accounts/$ACCOUNT_ID/members/$USER_ID \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"role": "admin"}'
```

5. List the members again. You should now see the person with the new `role`:

```bash
curl https://api.veryfront.com/accounts/$ACCOUNT_ID/members \
  -H "Authorization: Bearer $VERYFRONT_API_KEY"
```

### Troubleshooting

**If the API says "The account must keep at least one owner"**, make another person an owner first.

**If the API says "Changing owner membership requires account ownership authority"**, ask an account owner: only an owner can set `owner`.

## With MCP

1. Call `veryfront__list_account_members` with `{ "account_id": "<the account id>" }`, and take Maya's `user_id`, found by her `email`. Someone who hasn't accepted their invitation isn't listed, and can't be given a role yet.
2. Call `veryfront__update_account_member` with `{ "account_id": "<the account id>", "user_id": "<Maya's user_id>", "role": "admin" }`.
3. Call `veryfront__list_account_members` again. It worked when Maya's `role` is `admin`.

## Next steps

* [Set spend limits](/docs/account/spend-limits.md)
* [Revoke access](/docs/authentication/revoke-access.md)
