Skip to main content
GET
/
api
/
v1
/
credits
/
grants
Get a list of credit grants
curl --request GET \
  --url https://api.example.com/api/v1/credits/grants \
  --header 'X-API-KEY: <api-key>'
{
  "data": [
    {
      "id": "cred-grant-abc123",
      "displayName": "Monthly credits",
      "amount": 1000,
      "consumedAmount": 250,
      "grantType": "PROMOTIONAL",
      "sourceType": null,
      "priority": 1,
      "effectiveAt": "2024-01-01T00:00:00.000Z",
      "expireAt": "2024-12-31T23:59:59.000Z",
      "voidedAt": null,
      "metadata": {},
      "cost": {
        "amount": 0,
        "currency": "usd"
      },
      "comment": null,
      "customerId": "customer-123",
      "resourceId": null,
      "currencyId": "credits",
      "invoiceId": null,
      "latestInvoice": null,
      "paymentCollection": "NOT_REQUIRED",
      "status": "ACTIVE",
      "createdAt": "2027-01-13T05:56:18.153Z",
      "updatedAt": "2027-01-13T05:56:18.154Z"
    }
  ],
  "pagination": {
    "next": "c9b0a382-5b7d-4d32-9f62-8c4e1a7b3d9f",
    "prev": "a1d4e8f2-6c3b-4a9e-b5f7-2d8c9e0f1a3b"
  }
}

Authorizations

X-API-KEY
string
header
required

Server API Key

Query Parameters

after
string<uuid>

Return items that come after this cursor

before
string<uuid>

Return items that come before this cursor

limit
integer
default:20

Maximum number of items to return

Required range: 1 <= x <= 100
customerId
string
required

Filter by customer ID (required)

Maximum string length: 255
resourceId
string

Filter by resource ID. When omitted, only grants without a resource are returned

Maximum string length: 255
currencyId
string

Filter by currency ID

Maximum string length: 255
createdAt
object

Filter by creation date using range operators: gt, gte, lt, lte

Response

A paginated list of credit grant objects.

Response list object

data
CreditGrant · object[]
required
pagination
object
required

Pagination metadata including cursors for navigating through results