GET /api/v1/credits
Prepaid X credit: balance, the X API price list (X's price × markup, 1 by default) and the latest ledger entries. With X credit on, X calls are debited before they are sent, refunded when X refuses them (4xx), and refused with 402 insufficient_x_credit when the balance does not cover them
BearerAuthAuthorizationBearer <token>API key sk_...
limit?integerMaximum items (default 50, max 200)
1 <= value <= 20050before?stringnextBefore of the previous page
date-timeCredits
application/json- response
currency?"USD""USD"balance?numberX credit balance in USD (negative only after a refund of spent credit)
balanceMicros?stringBalance in USD micro-units
lowBalance?booleanlowBalanceThreshold?numbermetered?booleanX credit applies (X_CREDIT_ENABLED and X live): X calls are paid from this balance
markup?numberMultiplier on X's prices (1 = exactly X's cost)
prices?array<>ledger?array<>Newest first
nextBefore?|Pass as before for the next page
topup?Top-ups are bought by workspace owners and admins in the dashboard (Stripe Checkout); the processing fee is added on top so the full credit is received
curl -X GET 'https://example.com/api/v1/credits'{ "currency": "USD", "balance": 0, "balanceMicros": "string", "lowBalance": true, "lowBalanceThreshold": 0, "metered": true, "markup": 0, "prices": [ { "action": "string", "label": "string", "xPrice": 0, "price": 0 } ], "ledger": [ { "id": "string", "type": "topup", "amount": 0, "amountMicros": "string", "action": "string", "platform": "string", "reason": "string", "createdAt": "2019-08-24T14:15:22Z" } ], "nextBefore": "string", "topup": { "enabled": true, "presets": [ { "credit": 0, "fee": 0, "total": 0 } ], "minimum": 0, "maximum": 0, "processingFee": { "fixed": 0, "percent": 0 } }}GET /api/v1/accounts/{id}/posts GET
The account's most recent posts as they exist on the platform (published through Postgale or not), with postgalePostId when Postgale published them. Where supported (else 400 not_supported)
GET /api/v1/billing GET
The workspace's plan: trial, seats used and allowed, whether publishing is paused, and billing_url where a person pays. Read-only: paying is done by a workspace owner or admin in the dashboard