Skip to main content
POST
Error

Authorizations

X-LeaderOS-Key
string
header
required

Public key from Dashboard → Settings → Headless (pk_live_...).

Authorization
string
header
required

User token from POST /auth/login or /auth/register.

Body

application/json
username
string
required
amount
number
required
Required range: x >= 1

Response

OK

success
boolean
required
data
object
required

The user's balance after a request that changed it. Same keys as User.credits / User.creditsFormatted: put them into your credit state instead of refetching the user.

message
string