Skip to main content
POST
Top up the test credit balance

Authorizations

Authorization
string
header
required

Short-lived JWT issued by the CarHub auth service (Better Auth), verified against its JWKS. Claims: sub (user), org_id (active organisation) and role (owner | admin | member). Used by the dashboard for /mgmt/v1/… only — it is never accepted on /v1/….

Headers

Idempotency-Key
string

Client-generated key (a UUID is ideal) making this POST safe to retry. The first request is executed and its response stored for 24 h; any replay with the same key returns that stored response with Idempotent-Replayed: true and bills nothing. Reusing a key with a different payload is a 409 idempotency_key_reuse.

Required string length: 8 - 255

Body

application/json
amount
integer
required

Simulated money to deposit, in minor currency units.

Required range: 1 <= x <= 10000000

Response

Test balance updated.

granted
integer
required

Credits added to the test balance.

test_balance
integer
required

Test credit balance after the operation.

Required range: x >= 0