dev

Grant Credits

Grant credits to a user (dev-only endpoint).

Uses credit_service.add_reward_credits so the grant is recorded as an ADJUSTMENT transaction in credit_transactions — keeping an auditable trail of who/when/why, rather than silently mutating user_credits.balance.

Example: POST /api/v1/dev/grant-credits Headers: X-Lapis-Dev-Token: <token> Body: { "email": "user@example.com", "amount": 50, "reason": "support comp" }

post/api/v1/dev/grant-credits

Request

  • Base URL: https://api.trylapis.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.trylapis.com/api/v1/dev/grant-credits
  • Auth: none declared

Headers

x-lapis-dev-tokenstring

Request body

emailstring required

User email address

amountinteger required

Number of credits to grant (must be positive)

reasonstring nullable

Optional free-text reason; stored on the credit transaction

Response

Successful Response

statusstring required
messagestring required
user_idinteger required
user_emailstring required
amount_grantedinteger required
new_balanceinteger required

Changes

No recorded changes to this operation across all 1 revision of this API.