> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.postnuvia.com/llms.txt.

# List API Keys

GET https://api.postnuvia.com/v0/pods/{pod_id}/api-keys

**CLI:**

```bash
postnuvia pods api-keys list --pod-id <pod_id>
```

Reference: https://docs.postnuvia.com/api-reference/pods/api-keys/list

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.postnuvia.com` (prod, default)
- `https://x402.api.postnuvia.com` (prod-x402)
- `https://mpp.api.postnuvia.com` (prod-mpp)
- `https://api.postnuvia.eu` (eu-prod)

## Request

### Path parameters

- `pod_id` (string, required) — ID of pod.

### Query parameters

- `limit` (integer, optional) — Limit of number of items returned.
- `page_token` (string, optional) — Page token for pagination.

## Response

### 200

- `count` (integer, required) — Number of items returned.
- `api_keys` (list of ApiKey, required) — Every credential family, ordered by `created_at`. `type` restricts to one family.
- `next_page_token` (string, optional) — Page token for pagination.

## Errors

### 404 Not Found Error

- `name` (string, required) — Name of error.
- `message` (string, required) — Error message.
- `code` (string, optional) — Stable, machine-readable error code in snake_case (for example, not_found or missing_permission). Branch on this rather than the message text.
- `fix` (string, optional) — The concrete next action that resolves the error.
- `docs` (string, optional) — Link to the error reference entry for this code.

## Types

### ApiKey

One credential of any family. `type` is `bearer` or `public_key`. A public key carrying `status` is a sign-in key; one without it is a registered signing key.

### BearerApiKey

An API key presented as a bearer token in the `Authorization` header.

- `type` ("bearer", required)
- `api_key_id` (string, required) — ID of api key.
- `prefix` (string, required) — Prefix of api key.
- `name` (string, required) — Name of api key.
- `created_at` (datetime, required) — Time at which api key was created.
- `updated_at` (datetime, required) — Time at which api key was last updated.
- `pod_id` (string, optional) — Pod ID the api key is scoped to. If set, the key can only access resources within this pod.
- `inbox_id` (string, optional) — Inbox ID the api key is scoped to. If set, the key can only access resources within this inbox.
- `used_at` (datetime, optional) — Time at which api key was last used.
- `permissions` (ApiKeyPermissions, optional) — Granular permissions for the API key. When ommitted all permissions are granted. Otherwise, only permissions set to true are granted.
- `expires_at` (datetime, optional) — Time at which api key expires. Omitted when it does not expire.

### PublicKeyCredential

An AgentID sign-in credential, scoped like a bearer key; `api_key_id` is the JWS `kid`. A sign-in key carries `status`, gains `public_key` once the client has proved it, expires 30 days after activation, and carries exactly `app_connect` and `app_share_owner`, snapshotted from the bearer key that created it and enforced from the key itself.

- `type` ("public_key", required)
- `api_key_id` (string, required) — ID of api key.
- `name` (string, required) — Name of api key.
- `permissions` (ApiKeyPermissions, required) — Granular permissions for the API key. When ommitted all permissions are granted. Otherwise, only permissions set to true are granted.
- `created_by` (ApiKeyCreator, required) — The bearer API key that created the credential. Provenance only; the credential outlives it.
- `created_at` (datetime, required) — Time at which api key was created.
- `updated_at` (datetime, required) — Time at which api key was last updated.
- `client_id` (string, optional) — Caller-chosen alias for a public key, unique within the organization and reusable after deletion. Accepted in place of `api_key_id` on get, update, and delete. Registration is idempotent on it: the same alias returns the existing key, a conflicting one returns `409`. URL-safe; no slash or `@`.
- `public_key` (PublicKeyMaterial, optional) — Registered public key material and its server-computed RFC 7638 thumbprint.
- `pod_id` (string, optional) — Pod ID the api key is scoped to. If set, the key can only access resources within this pod.
- `inbox_id` (string, optional) — Inbox ID the api key is scoped to. If set, the key can only access resources within this inbox.
- `status` (enum, optional) — Lifecycle of a sign-in key: `pending` until the client finishes creating it on the AgentID page, `active` once it can sign in as the inbox. Absent on a registered key.
  - Allowed values: `pending`, `active`
- `used_at` (datetime, optional) — Time at which api key was last used.
- `expires_at` (datetime, optional) — Time at which api key expires. Omitted when it does not expire.

### ApiKeyPermissions

Granular permissions for the API key. When ommitted all permissions are granted. Otherwise, only permissions set to true are granted.

- `inbox_read` (boolean, optional) — Read inbox details.
- `inbox_create` (boolean, optional) — Create new inboxes.
- `inbox_update` (boolean, optional) — Update inbox settings.
- `inbox_delete` (boolean, optional) — Delete inboxes.
- `message_read` (boolean, optional) — Read messages. Also required to read threads.
- `message_reply` (boolean, optional) — Reply and reply-all when the request is signed with a registered public key. Bearer keys reply with `message_send`.
- `message_send` (boolean, optional) — Send messages.
- `message_update` (boolean, optional) — Update message labels. Also required to update threads.
- `message_delete` (boolean, optional) — Delete messages. Also required to delete threads.
- `label_spam_read` (boolean, optional) — Access messages labeled spam.
- `label_blocked_read` (boolean, optional) — Access messages labeled blocked.
- `label_unauthenticated_read` (boolean, optional) — Access messages labeled unauthenticated.
- `label_trash_read` (boolean, optional) — Access messages labeled trash.
- `draft_read` (boolean, optional) — Read drafts.
- `draft_create` (boolean, optional) — Create drafts.
- `draft_update` (boolean, optional) — Update drafts.
- `draft_delete` (boolean, optional) — Delete drafts.
- `draft_send` (boolean, optional) — Send drafts.
- `webhook_read` (boolean, optional) — Read webhook configurations.
- `webhook_create` (boolean, optional) — Create webhooks.
- `webhook_update` (boolean, optional) — Update webhooks.
- `webhook_delete` (boolean, optional) — Delete webhooks.
- `domain_read` (boolean, optional) — Read domain details.
- `domain_create` (boolean, optional) — Create domains.
- `domain_update` (boolean, optional) — Update domains.
- `domain_delete` (boolean, optional) — Delete domains.
- `list_entry_read` (boolean, optional) — Read list entries.
- `list_entry_create` (boolean, optional) — Create list entries.
- `list_entry_delete` (boolean, optional) — Delete list entries.
- `metrics_read` (boolean, optional) — Read metrics.
- `api_key_read` (boolean, optional) — Read API keys.
- `api_key_create` (boolean, optional) — Create API keys.
- `api_key_update` (boolean, optional) — Update API keys.
- `api_key_delete` (boolean, optional) — Delete API keys.
- `app_connect` (boolean, optional) — Sign in to apps as an inbox: connect an app, authorize an inbox, and mint the sign-in keys. Omitted on a new bearer key means false, whatever else the key holds.
- `app_share_owner` (boolean, optional) — Share the organization owner's name and email with apps at sign-in. One permission for both values.
- `account_update` (boolean, optional) — Update accounts: disable or re-enable an inbox's sign-in at an app. Reading accounts needs only `inbox_read`.
- `pod_read` (boolean, optional) — Read pods.
- `pod_create` (boolean, optional) — Create pods.
- `pod_update` (boolean, optional) — Update pods.
- `pod_delete` (boolean, optional) — Delete pods.
- `calendar_read` (boolean, optional) — Read inbox calendar settings.
- `calendar_update` (boolean, optional) — Update inbox calendar settings.
- `calendar_event_read` (boolean, optional) — Read calendar events, and receive `calendar.event.*` webhook and WebSocket events.
- `calendar_event_create` (boolean, optional) — Create calendar events.
- `calendar_event_update` (boolean, optional) — Update calendar events and respond to invitations.
- `calendar_event_delete` (boolean, optional) — Delete calendar events.

### ApiKeyCreator

The bearer API key that created the credential. Provenance only; the credential outlives it.

- `api_key_id` (string, required) — ID of api key.

### PublicKeyMaterial

Registered public key material and its server-computed RFC 7638 thumbprint.

- `jwk` (PublicJwk, required) — A public P-256 JWK. The object accepts exactly `kty`, `crv`, `x`, and `y`. Private key material such as `d`, embedded key IDs, and all other members are rejected. The server also rejects coordinates that are not a point on P-256.
- `fingerprint` (string, required) — RFC 7638 SHA-256 JWK thumbprint encoded as unpadded base64url.

### PublicJwk

A public P-256 JWK. The object accepts exactly `kty`, `crv`, `x`, and `y`. Private key material such as `d`, embedded key IDs, and all other members are rejected. The server also rejects coordinates that are not a point on P-256.

- `kty` ("EC", required)
- `crv` ("P-256", required)
- `x` (string, required) — A 32-byte P-256 coordinate encoded as unpadded base64url.
- `y` (string, required) — A 32-byte P-256 coordinate encoded as unpadded base64url.

## Examples

**Response**

```json
{
  "count": 1,
  "api_keys": [
    {
      "type": "bearer",
      "api_key_id": "api_key_id",
      "prefix": "prefix",
      "name": "name",
      "pod_id": "pod_id",
      "inbox_id": "inbox_id",
      "used_at": "2024-01-15T09:30:00Z",
      "permissions": {
        "inbox_read": true,
        "inbox_create": true,
        "inbox_update": true,
        "inbox_delete": true,
        "message_read": true,
        "message_reply": true,
        "message_send": true,
        "message_update": true,
        "message_delete": true,
        "label_spam_read": true,
        "label_blocked_read": true,
        "label_unauthenticated_read": true,
        "label_trash_read": true,
        "draft_read": true,
        "draft_create": true,
        "draft_update": true,
        "draft_delete": true,
        "draft_send": true,
        "webhook_read": true,
        "webhook_create": true,
        "webhook_update": true,
        "webhook_delete": true,
        "domain_read": true,
        "domain_create": true,
        "domain_update": true,
        "domain_delete": true,
        "list_entry_read": true,
        "list_entry_create": true,
        "list_entry_delete": true,
        "metrics_read": true,
        "api_key_read": true,
        "api_key_create": true,
        "api_key_update": true,
        "api_key_delete": true,
        "app_connect": true,
        "app_share_owner": true,
        "account_update": true,
        "pod_read": true,
        "pod_create": true,
        "pod_update": true,
        "pod_delete": true,
        "calendar_read": true,
        "calendar_update": true,
        "calendar_event_read": true,
        "calendar_event_create": true,
        "calendar_event_update": true,
        "calendar_event_delete": true
      },
      "created_at": "2024-01-15T09:30:00Z",
      "updated_at": "2024-01-15T09:30:00Z",
      "expires_at": "2024-01-15T09:30:00Z"
    },
    {
      "type": "bearer",
      "api_key_id": "api_key_id",
      "prefix": "prefix",
      "name": "name",
      "pod_id": "pod_id",
      "inbox_id": "inbox_id",
      "used_at": "2024-01-15T09:30:00Z",
      "permissions": {
        "inbox_read": true,
        "inbox_create": true,
        "inbox_update": true,
        "inbox_delete": true,
        "message_read": true,
        "message_reply": true,
        "message_send": true,
        "message_update": true,
        "message_delete": true,
        "label_spam_read": true,
        "label_blocked_read": true,
        "label_unauthenticated_read": true,
        "label_trash_read": true,
        "draft_read": true,
        "draft_create": true,
        "draft_update": true,
        "draft_delete": true,
        "draft_send": true,
        "webhook_read": true,
        "webhook_create": true,
        "webhook_update": true,
        "webhook_delete": true,
        "domain_read": true,
        "domain_create": true,
        "domain_update": true,
        "domain_delete": true,
        "list_entry_read": true,
        "list_entry_create": true,
        "list_entry_delete": true,
        "metrics_read": true,
        "api_key_read": true,
        "api_key_create": true,
        "api_key_update": true,
        "api_key_delete": true,
        "app_connect": true,
        "app_share_owner": true,
        "account_update": true,
        "pod_read": true,
        "pod_create": true,
        "pod_update": true,
        "pod_delete": true,
        "calendar_read": true,
        "calendar_update": true,
        "calendar_event_read": true,
        "calendar_event_create": true,
        "calendar_event_update": true,
        "calendar_event_delete": true
      },
      "created_at": "2024-01-15T09:30:00Z",
      "updated_at": "2024-01-15T09:30:00Z",
      "expires_at": "2024-01-15T09:30:00Z"
    }
  ],
  "next_page_token": "next_page_token"
}
```

**SDK Code**

```python
import requests

url = "https://api.postnuvia.com/v0/pods/pod_id/api-keys"

headers = {"Authorization": "Bearer <api_key>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.postnuvia.com/v0/pods/pod_id/api-keys';
const options = {method: 'GET', headers: {Authorization: 'Bearer <api_key>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.postnuvia.com/v0/pods/pod_id/api-keys"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <api_key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.postnuvia.com/v0/pods/pod_id/api-keys")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <api_key>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.postnuvia.com/v0/pods/pod_id/api-keys")
  .header("Authorization", "Bearer <api_key>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.postnuvia.com/v0/pods/pod_id/api-keys', [
  'headers' => [
    'Authorization' => 'Bearer <api_key>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.postnuvia.com/v0/pods/pod_id/api-keys");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <api_key>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <api_key>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postnuvia.com/v0/pods/pod_id/api-keys")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```