Admin
Grant Credits
Set or adjust a workspace's credit balance by hand.
No payment is involved anywhere in this path — no Stripe call, no checkout, no card. It writes workspaces.credits directly. The ledger row it also writes lives in workspace_credit_purchases only because that is where a workspace's credit history is read from; its stripe_session_id column is a historical name being reused as a unique idempotency key, not a payment reference.
Two modes, because "top up by 500" and "make the balance 500" are different operations and guessing which one an operator meant is how a balance ends up wrong:
- add — credits is a delta. Negative corrects an over-grant.
- set — credits is the balance to end up with. The delta is derived, so the ledger and the audit log still record what actually moved.
post/admin/workspaces/{slug}/credits
Request
- Base URL: https://api.kolens.ai (the document declares no server; this is the origin it was published from)
- URL: https://api.kolens.ai/admin/workspaces/{slug}/credits
- Auth: none declared
Path parameters
slugstring required
Headers
x-admin-secretstring nullable
Request body
Response
Successful Response
object required
Changes
No recorded changes to this operation across all 1 revision of this API.