CAPI Docs
Get an API token

Get Credit Balance

GET/api/v1/credits

Return the current credit balance for the token's workspace, plus its most recent transactions. Useful for checking budget before creating exports.

Authentication#

Requires a token with the read scope, sent as Authorization: Bearer cornect_….

Request#

This endpoint takes no parameters.

Response#

Balance is an integer; recent_transactions is newest-first. Negative amount values are charges; positive are grants/refunds.

json
{
  "workspace_id": "5b2fa9e8-…",
  "balance": 1250,
  "recent_transactions": [
    {
      "id": "…",
      "amount": -180,
      "reason": "export_charge",
      "reference": "export:9f1c…:create",
      "created_at": "2026-05-28T12:00:00Z"
    }
  ]
}

Code samples#

curl -X GET https://api.cornect.io/api/v1/credits \
  -H "Authorization: Bearer cornect_your_token_here"

Errors#

See Errors for the full table. Codes you're most likely to see here:

CodeStatusWhen
INVALID_TOKEN401Token not found or revoked.
429Rate limit exceeded (60/min).

Interactive reference#

Loading interactive reference…