Credentials API
List Credentials
GET /api/v1/credentialsReturns metadata for all credentials (values are never returned in list responses).
Query Parameters:
| Param | Description |
|---|---|
type | Filter by credential type |
Response:
{
"data": [
{
"path": "openai/api_key",
"type": "api_key",
"description": "OpenAI production key",
"created_at": "2026-02-10T23:15:00Z",
"updated_at": "2026-02-10T23:15:00Z",
"access_count": 42
}
]
}Get Credential
GET /api/v1/credentials/:pathRetrieve a credential value. Creates a lease with TTL based on the applicable policy.
Response:
{
"data": {
"path": "openai/api_key",
"value": "sk-proj-abc123...",
"lease_id": "lease_abc123",
"expires_at": "2026-02-14T22:35:00Z"
}
}Errors:
| Code | Status | Description |
|---|---|---|
NOT_FOUND | 404 | Credential does not exist |
ACCESS_DENIED | 403 | No policy grants access |
Store Credential
POST /api/v1/credentialsBody:
{
"path": "openai/api_key",
"type": "api_key",
"value": "sk-proj-abc123...",
"description": "OpenAI production key"
}Response: 201 Created
{
"data": {
"path": "openai/api_key",
"type": "api_key",
"created_at": "2026-02-14T22:30:00Z"
}
}Delete Credential
DELETE /api/v1/credentials/:pathResponse: 204 No Content