# List API Keys

Audit your API keys: when each was last used and which have been revoked. Key material is never returned.

`GET https://connect.mindcloud.co/v2/api-keys`

Permissions: `api_key:manage`.

## Parameters

### Headers

- `X-Company-Id` (string): Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. Here a key acts in another organization only as one of its members: with "Use this key across all of your organizations" on, in an organization its creator belongs to with a role. Child organizations and MindCloud staff access do not reach this endpoint. Every response's X-Company-Id header names the organization it acted in. See [Organizations](https://mindcloud.co/docs/api/rest/introduction/organizations).

## Example request

```bash
curl --request GET \
  --url 'https://connect.mindcloud.co/v2/api-keys' \
  --header 'Authorization: Bearer $MINDCLOUD_API_TOKEN'
```

## Response fields

- `id` (string): Unique id of the key.
- `name` (string): The name the key was created with.
- `companyId` (string): The organization the key belongs to. A key with isAllOrganizations is listed in every organization its creator opens, so it may belong to another one.
- `isAllOrganizations` (boolean): "Use this key across all of your organizations": the key can act, through X-Company-Id, in every organization its creator can open in the app, with no more than the creator may do there.
- `accessLevel` (string): A summary of the key permissions: full_access, run_workflows, read_only, or none. Derived from permissions; it is never set directly.
  Allowed values:
    - `read_only`
    - `run_workflows`
    - `full_access`
    - `none`
- `permissions` (array of string): The permissions the key holds. A request may use one only while the key's creator also holds it.
- `usedOn` (date): The last time the key was used. Old dates are rotation candidates.
- `revokedOn` (date): When the key was revoked. Empty while it is active.
- `createdOn` (date): When the key was created.
- `createdBy` (string): Who created it.
- `updatedOn` (date): When it was last changed.
