Credit consumption history
Returns a paginated ledger of individual credit consumption events. Each entry records the amount consumed, the reason, and the resulting balance.
Authorization
BearerAuth API key passed as a Bearer token. Production keys start with
am_live_ and sandbox keys start with am_test_.
In: header
Query Parameters
Only return entries created at or after this ISO 8601 timestamp.
date-timeFilter entries by consumption reason.
"message_received" | "message_sent" | "ai_scan" | "pii_redaction" | "hitl_review"Maximum number of items to return per page.
251 <= value <= 100Opaque pagination cursor returned as next_cursor from a previous request.
Response Body
application/json
application/json
application/json
curl -X GET "https://secureagentmail.com/api/v1/credits/ledger"{
"entries": [
{
"id": "crd_w5x1y6",
"amount": 10,
"reason": "ai_scan",
"resource_id": "msg_x7k9m2",
"balance_after": 5790,
"created_at": "2026-02-25T10:15:30Z"
}
],
"has_more": true,
"next_cursor": "string"
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key.",
"status": 401
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded. Please retry after 30 seconds.",
"status": 429
}
}Balance and usage summary
Returns the current credit balance, usage totals, and a per-category breakdown for the current billing period.
List audit entries
Returns a paginated, reverse-chronological list of security and operational audit events. Results can be filtered by inbox, event type, severity, and time range.