---
title: API Keys
---

## List API Keys
**Endpoint**: `GET /agent/v0/inboxes/{inbox_id}/api-keys`
**Authentication**: `Authorization: Bearer <token>`
### Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `inbox_id` | path | string | Yes |  |
| `limit` | query | integer | No |  |
| `page_token` | query | string | No |  |

### Responses

#### `200`

Response with status 200

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `api_keys` | array\<object\> | Yes | Ordered by `created_at` descending. |
| `count` | integer | Yes | Number of items returned. |
| `next_page_token` | string | No | Page token for pagination. |

##### Example

```json
{
  "api_keys": [
    {
      "api_key_id": "<string>",
      "created_at": "2026-01-01T00:00:00Z",
      "inbox_id": "<string>",
      "name": "<string>",
      "pod_id": "<string>",
      "prefix": "<string>",
      "used_at": "2026-01-01T00:00:00Z"
    }
  ],
  "count": 0,
  "next_page_token": "<string>"
}
```

#### `404`

Error response with status 404

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `message` | string | Yes | Error message. |
| `name` | string | Yes | Name of error. |

##### Example

```json
{
  "message": "<string>",
  "name": "<string>"
}
```


## Create API Key
**Endpoint**: `POST /agent/v0/inboxes/{inbox_id}/api-keys`
**Authentication**: `Authorization: Bearer <token>`
### Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `inbox_id` | path | string | Yes |  |

### Request Body
Content-Type: `application/json`
#### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `name` | string | Yes | Name of api key. |

#### Example

```json
{
  "name": "<string>"
}
```

### Responses

#### `200`

Response with status 200

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `api_key` | string | Yes | API key. |
| `api_key_id` | string | Yes | ID of api key. |
| `created_at` | string | Yes | Time at which api key was created. |
| `inbox_id` | string | No | Inbox ID the api key is scoped to. |
| `name` | string | Yes | Name of api key. |
| `pod_id` | string | No | Pod ID the api key is scoped to. |
| `prefix` | string | Yes | Prefix of api key. |

##### Example

```json
{
  "api_key": "<string>",
  "api_key_id": "<string>",
  "created_at": "2026-01-01T00:00:00Z",
  "inbox_id": "<string>",
  "name": "<string>",
  "pod_id": "<string>",
  "prefix": "<string>"
}
```

#### `400`

Error response with status 400

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `errors` | object | Yes | Validation errors. |
| `name` | string | Yes | Name of error. |

##### Example

```json
{
  "errors": null,
  "name": "<string>"
}
```

#### `404`

Error response with status 404

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `message` | string | Yes | Error message. |
| `name` | string | Yes | Name of error. |

##### Example

```json
{
  "message": "<string>",
  "name": "<string>"
}
```


## Delete API Key
**Endpoint**: `DELETE /agent/v0/inboxes/{inbox_id}/api-keys/{api_key_id}`
**Authentication**: `Authorization: Bearer <token>`
### Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `api_key_id` | path | string | Yes |  |
| `inbox_id` | path | string | Yes |  |

### Responses

#### `200`

Successful response

#### `404`

Error response with status 404

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `message` | string | Yes | Error message. |
| `name` | string | Yes | Name of error. |

##### Example

```json
{
  "message": "<string>",
  "name": "<string>"
}
```

