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

# List Pod Credentials

GET https://api.agentmail.to/v0/pods/{pod_id}/credentials

Reference: https://agentmail.to/docs/api-reference/pods/credentials/list

## Authentication

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

## Servers

- `https://api.agentmail.to` (prod, default)
- `https://x402.api.agentmail.to` (prod-x402)
- `https://mpp.api.agentmail.to` (prod-mpp)
- `https://api.agentmail.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.
- `ascending` (boolean, optional)
- `origin` (string, optional)
- `rp_id` (string, optional)
- `site` (string, optional)
- `name` (string, optional)

## Response

### 200

- `count` (integer, required) — Number of items returned.
- `credentials` (list of CredentialItem, required)
- `limit` (integer, optional) — Limit of number of items returned.
- `next_page_token` (string, optional) — Page token for pagination.

## Errors

### 400 Validation Error

- `name` (string, required) — Name of error.
- `errors` (any, required) — Validation errors. Each entry has a path and a message identifying the invalid field.
- `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.
- `message` (string, optional) — Error message.
- `fix` (string, optional) — The concrete next action that resolves the error.
- `docs` (string, optional) — Link to the error reference entry for this code.

### 403 Credential Forbidden 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.

### 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

### CredentialItem

- `credential_id` (string, required)
- `organization_id` (string, required) — ID of organization.
- `type` (enum, required)
  - Allowed values: `password`, `totp`, `secret`, `signing_key`, `passkey`, `api_key`
- `created_at` (datetime, required)
- `updated_at` (datetime, required)
- `pod_id` (string, optional)
- `inbox_id` (string, optional)
- `client_id` (string, optional)
- `name` (string, optional)
- `origin` (string, optional)
- `user` (CredentialUser, optional)
- `rp` (CredentialRp, optional)
- `totp` (TotpSettings, optional)
- `auth` (ApiKeyAuth, optional)
- `expires_at` (datetime, optional)

### CredentialUser

- `id` (string, optional)
- `name` (string, optional)
- `display_name` (string, optional)

### CredentialRp

- `id` (string, required)
- `name` (string, optional)

### TotpSettings

- `algorithm` (enum, optional)
  - Allowed values: `SHA1`, `SHA256`, `SHA512`
- `digits` (integer, optional)
- `period` (integer, optional)
- `issuer` (string, optional)

### ApiKeyAuth

- `in`: `header`
  - `name` (string, required)
  - `prefix` (string, optional)
- `in`: `query`
  - `name` (string, required)

## Examples

**Response**

```json
{
  "count": 1,
  "credentials": [
    {
      "credential_id": "credential_id",
      "organization_id": "organization_id",
      "type": "password",
      "created_at": "2024-01-15T09:30:00Z",
      "updated_at": "2024-01-15T09:30:00Z",
      "pod_id": "pod_id",
      "inbox_id": "inbox_id",
      "client_id": "client_id",
      "name": "name",
      "origin": "origin",
      "user": {
        "id": "id",
        "name": "name",
        "display_name": "display_name"
      },
      "rp": {
        "id": "id",
        "name": "name"
      },
      "totp": {
        "algorithm": "SHA1",
        "digits": 1,
        "period": 1,
        "issuer": "issuer"
      },
      "auth": {
        "in": "header",
        "name": "name",
        "prefix": "prefix"
      },
      "expires_at": "2024-01-15T09:30:00Z"
    },
    {
      "credential_id": "credential_id",
      "organization_id": "organization_id",
      "type": "password",
      "created_at": "2024-01-15T09:30:00Z",
      "updated_at": "2024-01-15T09:30:00Z",
      "pod_id": "pod_id",
      "inbox_id": "inbox_id",
      "client_id": "client_id",
      "name": "name",
      "origin": "origin",
      "user": {
        "id": "id",
        "name": "name",
        "display_name": "display_name"
      },
      "rp": {
        "id": "id",
        "name": "name"
      },
      "totp": {
        "algorithm": "SHA1",
        "digits": 1,
        "period": 1,
        "issuer": "issuer"
      },
      "auth": {
        "in": "header",
        "name": "name",
        "prefix": "prefix"
      },
      "expires_at": "2024-01-15T09:30:00Z"
    }
  ],
  "limit": 1,
  "next_page_token": "next_page_token"
}
```

**SDK Code**

```python
import requests

url = "https://api.agentmail.to/v0/pods/pod_id/credentials"

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

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

print(response.json())
```

```javascript
const url = 'https://api.agentmail.to/v0/pods/pod_id/credentials';
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.agentmail.to/v0/pods/pod_id/credentials"

	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.agentmail.to/v0/pods/pod_id/credentials")

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.agentmail.to/v0/pods/pod_id/credentials")
  .header("Authorization", "Bearer <api_key>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp
using RestSharp;

var client = new RestClient("https://api.agentmail.to/v0/pods/pod_id/credentials");
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.agentmail.to/v0/pods/pod_id/credentials")! 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()
```