# List role permissions

`GET https://console.advinservers.com/api/v1/client/teams/permissions`

### Overview

Lists permissions available to team roles. Each entry includes its `key`, display name, description and group. `requires` lists permissions needed alongside it. `sensitive` identifies permissions that can delete data, transfer ownership or spend money. The list is shared by all teams and can be cached until the next release.

### Permissions

Requires the account permission `teams.read` (View teams).

## Authorization

Send `Authorization: Bearer <token>` with the request. Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

## Response 200

The whole set, as a JSON array. There is no envelope and no paging.

- `key` (string, required): The key a route is mapped to, and what a role stores.
- `name` (string, required): The name shown to customers.
- `description` (string, required): A sentence saying what holding it lets a member do, shown under the name in the role editor.
- `group` (string, required): Which section of the role editor shows it.
- `requires` (string[], required): The permissions this one is useless without.
- `sensitive` (boolean, required): The handful that destroy data, hand over the guest entirely, or spend the account's money, so the editor can say so on the row.

```json
[
  {
    "key": "server.power",
    "name": "Control power",
    "description": "Start, stop, restart and shut a server down.",
    "group": "Servers",
    "requires": [
      "server.read"
    ],
    "sensitive": false
  }
]
```

## Errors

- `401`: The key was missing, malformed, revoked, or belongs to an account that no longer exists.
- `403`: Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
- `429`: Too many requests. The `Retry-After` header says how many seconds to wait. Limits are per account, so several keys on one account share them.

## Example request

```bash
curl --request GET \
  --url 'https://console.advinservers.com/api/v1/client/teams/permissions' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
```
