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

# Get Pod Credential

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

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

## 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.
- `credential_id` (string, required)

## Response

### 200

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

## Errors

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

### ApiKeyAuth

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

### CredentialPublicKey

- `algorithm` (string, required)
- `jwk` (map from string to any, required)
- `webauthn_id` (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)

### CredentialUser

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

## Examples

**Response**

```json
{
  "created_at": "2024-01-15T09:30:00Z",
  "credential_id": "credential_id",
  "organization_id": "organization_id",
  "type": "password",
  "updated_at": "2024-01-15T09:30:00Z",
  "version": 1,
  "auth": {
    "in": "header",
    "name": "name",
    "prefix": "prefix"
  },
  "client_id": "client_id",
  "expires_at": "2024-01-15T09:30:00Z",
  "inbox_id": "inbox_id",
  "last_used_at": "2024-01-15T09:30:00Z",
  "name": "name",
  "origin": "origin",
  "pod_id": "pod_id",
  "public_key": {
    "algorithm": "algorithm",
    "jwk": {
      "jwk": {
        "key": "value"
      }
    },
    "webauthn_id": "webauthn_id"
  },
  "rp": {
    "id": "id",
    "name": "name"
  },
  "totp": {
    "algorithm": "SHA1",
    "digits": 1,
    "period": 1,
    "issuer": "issuer"
  },
  "use_count": 1,
  "user": {
    "id": "id",
    "name": "name",
    "display_name": "display_name"
  }
}
```

**SDK Code**

```python
import requests

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

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/credential_id';
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/credential_id"

	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/credential_id")

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/credential_id")
  .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/credential_id', [
  'headers' => [
    'Authorization' => 'Bearer <api_key>',
  ],
]);

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

```csharp
using RestSharp;

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