Update Credit Balance
PUT /users/{user_id}/credits
Overview
Updates a user’s credit balance by increasing or decreasing the current amount.
This operation is typically used after a user action that consumes or restores credits.
Typical use cases
Deducting credits when a service is used
Adding credits through events or rewards
Manually adjusting credits by an administrator
Header
Content-Type
application/json
Authorization (API Key)
Bearer <API Key>
Path
user_id
User identifier (user_id). Optional on create — if not provided, a system-generated ID will be used More description
Body
credit_delta
number
The amount by which the user’s credit balance should change.
A positive value will increase the user’s balance, and a negative value will decrease it.
description (optional)
string
A human-readable explanation of the action or transaction.
This text helps provide context or reasoning for why the credit was updated.
Response
This http condition occurs when credit_delta doesn't contain a request body or credit_delta is not a number.
This HTTP status occurs when the system cannot find a user profile associated with the given userId.
Last updated