Skip to main content
Retrieve a paginated history of credit usage records.

Overview

The Credit Usage endpoint returns individual credit consumption events over a specified time window. Each record shows which feature consumed credits, how many were spent, and when. Use this for auditing, billing reconciliation, and tracking consumption trends.

Authentication

Requires a valid API key. No special permission scope is needed beyond a valid key.

Key Features

  • Detailed History: Per-event credit consumption records
  • Configurable Window: Look back 1 to 365 days
  • Paginated: Handle large usage histories with limit and offset
  • No Credit Cost: This endpoint is free to use
curl -X GET "https://api.trigify.io/v1/credits/usage?days=7&limit=50" \
  -H "x-api-key: YOUR_API_KEY"

Query Parameters

ParameterTypeDefaultDescription
daysinteger30Number of days to look back (1-365)
limitinteger50Number of records per page (1-500)
offsetinteger0Number of records to skip for pagination

Example Response

{
  "success": true,
  "data": {
    "records": [
      {
        "id": "cu_abc123",
        "feature": "search_create",
        "credits": 1,
        "description": "Created search: AI Startup Founders",
        "timestamp": "2026-03-25T14:30:00.000Z"
      },
      {
        "id": "cu_def456",
        "feature": "profile_enrich",
        "credits": 1,
        "description": "Profile enrichment",
        "timestamp": "2026-03-25T13:15:00.000Z"
      }
    ],
    "total": 142,
    "limit": 50,
    "offset": 0
  }
}

Response Fields

Each record in the records array includes:
FieldTypeDescription
idstringUnique usage record identifier
featurestringFeature that consumed credits (e.g., search_create, profile_enrich)
creditsintegerNumber of credits consumed
descriptionstringHuman-readable description of the usage event
timestampstringISO 8601 date when the credits were consumed

Credit Usage

This endpoint is free and does not consume credits.