GET
/
v1
/
billing
/
{organizationId}
/
credits
/
history
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

const client = new OctosparkClient({
  token: process.env.OCTOSPARK_TOKEN
})

const response = await client.billingGetCreditHistory({
  organizationId: process.env.OCTOSPARK_ORGANIZATION_ID ?? "organizationId",
  query: {},
})
{
  "items": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "amountDecimillicents": 123,
      "reason": "<string>",
      "referenceId": "<string>",
      "balanceAfter": 123,
      "createdAt": "<string>"
    }
  ],
  "cursor": "<string>",
  "hasMore": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

organizationId
string
required

Query Parameters

limit
string
cursor
string

Response

Success

items
object[]
required
cursor
string | null
required
hasMore
boolean
required