Skip to main content
GET
/
api
/
credentials
List Credentials
curl --request GET \
  --url https://api.example.com/api/credentials
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "service": "openai",
    "name": "primary",
    "created_at": 1700000000,
    "last_used_at": 1700100000
  },
  {
    "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "service": "anthropic",
    "name": "production",
    "created_at": 1700000100,
    "last_used_at": null
  }
]
Retrieves a list of all stored credentials metadata without exposing the actual credential values.

Authentication

Requires a valid session token in the Authorization header:
Authorization: Bearer <session_token>

Response

Returns an array of credential metadata objects. The encrypted key values are never returned.

Credential Metadata Object

id
string
required
Unique credential identifier (UUID)
service
string
required
Service name (e.g., “openai”, “anthropic”, “custom.github”)
name
string
required
Human-readable credential name
created_at
integer
required
Unix timestamp when the credential was created
last_used_at
integer | null
required
Unix timestamp when the credential was last used, or null if never used
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "service": "openai",
    "name": "primary",
    "created_at": 1700000000,
    "last_used_at": 1700100000
  },
  {
    "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "service": "anthropic",
    "name": "production",
    "created_at": 1700000100,
    "last_used_at": null
  }
]

Error Responses

error
string
Error message if the operation fails

Status Codes

  • 200 - Success
  • 401 - Unauthorized (missing or invalid session token)
  • 500 - Internal server error

Examples

curl -X GET https://localhost:3978/api/credentials \
  -H "Authorization: Bearer fn_sess_abc123..."

Security Notes

  • Credential keys are never returned in API responses
  • All credentials are encrypted at rest using libsodium secretbox
  • The last_used_at timestamp is updated when credentials are retrieved for proxy requests

Build docs developers (and LLMs) love