Skip to content
Go To Dashboard

List transactions

GET /v1/transactions

Requires Bearer token authentication.

ParameterTypeDefaultDescription
sortstring-Sort field (prefix with - for DESC)
page[before]string-Cursor for previous page
page[after]string-Cursor for next page
page[limit]number-Number of results to return (max 100)
filter[to_date]string-Custom end date (ISO 8601)
filter[from_date]string-Custom start date (ISO 8601)
filter[time_period]string-Filter by time period
filter[rule]string-Filter by rule ID (returns transactions with rule executions for this rule)
filter[agent]string-Filter by agent ID
filter[service]string-Filter by service name
filter[status]string-Filter by transaction status
Terminal window
curl -X GET "https://api.sapiom.ai/v1/transactions" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"tenantId": "123e4567-e89b-12d3-a456-426614174000",
"serviceName": "openai",
"actionName": "completion",
"resourceName": "gpt-4",
"serviceId": "123e4567-e89b-12d3-a456-426614174000",
"status": "authorized",
"requiresPayment": true,
"qualifiers": {
"model": "gpt-4",
"tokens": 1000
},
"metadata": null,
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"authorizedAt": "2024-01-01T00:00:00.000Z",
"completedAt": "2024-01-01T00:00:00.000Z",
"outcome": "success",
"currentPaymentTransactionId": "123e4567-e89b-12d3-a456-426614174000",
"payment": null,
"trace": null,
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"agent": null,
"costs": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"transactionId": "123e4567-e89b-12d3-a456-426614174000",
"tenantId": "123e4567-e89b-12d3-a456-426614174000",
"paymentTransactionId": "123e4567-e89b-12d3-a456-426614174000",
"fiatAmount": "0.25",
"fiatAssetId": "123e4567-e89b-12d3-a456-426614174000",
"isEstimate": false,
"isActive": true,
"supersedesCostId": "123e4567-e89b-12d3-a456-426614174000",
"supersededAt": "2024-01-15T10:30:00Z",
"costDetails": {
"provider": "anthropic",
"model": "claude-3-5-sonnet-20241022",
"inputTokens": 1000,
"outputTokens": 5000
},
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
]
}
],
"links": {
"self": "string",
"next": "string",
"prev": "string"
},
"meta": {
"page": {
"limit": 0,
"hasNext": true,
"hasPrev": true
}
}
}
StatusCodeDescription
401-Unauthorized - invalid or missing API key

See API Introduction for error handling details.