---
title: "List API Keys"
url: "https://docs.yoagent.dev/reference/rest-api/operations/listapikeys"
---

# List API Keys

GET

/v0/api-keys

```sh
curl -s "https://api.yoagent.dev/v0/api-keys" \
  -H "Authorization: Bearer $YOAGENT_KEY"
```

```js
const response = await fetch("https://api.yoagent.dev/v0/api-keys", {
  headers: {
    Authorization: `Bearer ${process.env.YOAGENT_KEY}`,
  },
});
if (!response.ok) throw new Error(await response.text());
const data = await response.json();
```

```python
import os

import requests

response = requests.get(
    "https://api.yoagent.dev/v0/api-keys",
    headers={"Authorization": f"Bearer {os.environ['YOAGENT_KEY']}"},
    timeout=60,
)
response.raise_for_status()
data = response.json()
```

- api.yoagent.dev/v0/api-keys

List API keys, newest first (without secrets: one key’s own answer gives its maker the secret): every key for owners and admins, else one’s own; `project_id` keeps the keys that reach that project.

## Authorizations

- **[ApiKey](https://docs.yoagent.dev/reference/rest-api#apikey)**

## Parameters

### Query Parameters

**limit**

_Limit_

integer

default: 20 >= 1 <= 100

How many items a page holds.

**page_token**

_Page Token_

Any of:

**string**

The next_page_token of the previous page

string

**null**

null

The previous page’s `next_page_token`, for the page after it; omitted: the first page.

**project_id**

_Project Id_

Any of:

**string**

string

/^prj\_\[0-7]\[0-9a-hjkmnp-tv-z]{25}$/

**null**

null

Only those of this project; omitted: of every project the caller sees.

**inbox_id**

_Inbox Id_

Any of:

**string**

string

/^inb\_\[0-7]\[0-9a-hjkmnp-tv-z]{25}$/

**null**

null

Only the keys given this inbox.

**active**

_Active_

boolean

Only the keys that still work: not revoked, not expired.

## Responses

### 200

Successful Response

application/json

_ApiKeyList_

A page of the organization’s API keys, revoked included.

object

**count**

required

_Count_

integer

**next_page_token**

required

_Next Page Token_

Any of:

**string**

string

**null**

null

**api_keys**

required

_Api Keys_

Array\<object>

_ApiKeyOut_

An API key without its secret.

object

**version**

required

_Version_

Goes up by one on every change: of two copies, the one with the higher version is the newer.

integer

**api_key_id**

required

_Api Key Id_

string

/^key\_\[0-7]\[0-9a-hjkmnp-tv-z]{25}$/

**name**

required

_Name_

string

**access**

required

_KeyAccess_

What it was given. It never does more than its maker can now: past that, `limited`.

object

**all**

_All_

What it allows in every project, present and future: `full` (everything, permissions added later included) or a list of permissions; null: no project as a whole.

Any of:

**string**

string

Allowed value: full

**Array\<string>**

Array\<string>

Allowed values: inbox_read inbox_create inbox_update inbox_delete message_read message_update message_delete message_send webhook_read webhook_create webhook_update webhook_delete domain_read domain_create domain_update domain_delete

**null**

null

**projects**

_Projects_

What it allows in a project, by its id: in place of `all` there.

object

**_key_**

additional properties

Any of:

**string**

string

Allowed value: full

**Array\<string>**

Array\<string>

Allowed values: inbox_read inbox_create inbox_update inbox_delete message_read message_update message_delete message_send webhook_read webhook_create webhook_update webhook_delete domain_read domain_create domain_update domain_delete

**inboxes**

_Inboxes_

Single inboxes it reaches, by their id: the inbox and its mail, whatever its project’s grant.

object

**_key_**

additional properties

_InboxGrant_

A grant on one inbox: the project it lives in and what it allows on the inbox and its mail.

object

**project_id**

required

_Project Id_

The project the inbox is in.

string

/^prj\_\[0-7]\[0-9a-hjkmnp-tv-z]{25}$/

**grant**

required

_Grant_

What it allows on the inbox and its mail: `full` (everything, permissions added later included) or a list of permissions.

Any of:

**string**

string

Allowed value: full

**Array\<string>**

Array\<string>

Allowed values: inbox_read inbox_update message_read message_update message_delete message_send domain_read

**organization**

_Organization_

What the key may do in the organization itself: create, rename and delete projects, within the plan’s limit and the role of the person who made it.

Array\<string>

default:

Allowed values: project_create project_update project_delete

**names**

required

_AccessNames_

The names of the project or inbox `access` names, as the caller sees them.

object

**projects**

required

_Projects_

object

**_key_**

additional properties

Any of:

**ProjectName**

_ProjectName_

A project as an access’s names show it: its name and its slug (the dashboard’s color for it).

object

**name**

required

_Name_

string

**slug**

required

_Slug_

string

**null**

null

**inboxes**

required

_Inboxes_

object

**_key_**

additional properties

Any of:

**string**

string

**null**

null

**limited**

required

_Limited_

Its maker’s access is narrower now than what it was given: it does only what both allow (until they are widened again).

boolean

**prefix**

required

_Prefix_

string

**created_at**

required

_Created At_

string format: date-time

**last_used_at**

required

_Last Used At_

Any of:

**string**

string format: date-time

**null**

null

**revoked_at**

required

_Revoked At_

Any of:

**string**

string format: date-time

**null**

null

**expires_at**

required

_Expires At_

When the key stops working by itself (null: never); past it, the key answers 401.

Any of:

**string**

string format: date-time

**null**

null

#### Example

```json
{
  "count": 1,
  "next_page_token": null,
  "api_keys": [
    {
      "version": 1,
      "api_key_id": "key_01je56wqswfmn9pgbc1wq8tjgq",
      "name": "CI",
      "access": {
        "all": "full",
        "projects": {},
        "inboxes": {},
        "organization": []
      },
      "names": {
        "projects": {},
        "inboxes": {}
      },
      "limited": false,
      "prefix": "da_4f8K",
      "created_at": "2026-12-01T12:00:00Z",
      "last_used_at": null,
      "revoked_at": null,
      "expires_at": null
    }
  ]
}
```

### default

An error (400, 401, 403, 404, 405, 409, 413, 429, 500, 503), in the one shape every call answers: [Errors](https://docs.yoagent.dev/reference/conventions#errors).
