Manual credit adjustment (admin only)

Manually grant (positive) or claw back (negative) credits.

Callers should always send Idempotency-Key. Without it, a request that commits here but whose response is lost — an 8-second client read timeout is enough — cannot be told apart from one that never arrived, and a retry grants twice. Two layers use the key: the shared HTTP idempotency cache (concurrent retries get 409, completed ones replay byte-for-byte) and a guard stored on the grant or ledger row itself, which shares the balance change's transaction and outlives the cache's TTL.

post/v1/admin/tenants/{tenant_id}/adjust-credits

Request

  • Base URL: https://api.clichefactory.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.clichefactory.com/v1/admin/tenants/{tenant_id}/adjust-credits
  • Auth: none declared

Path parameters

tenant_idstring required

Headers

Idempotency-Keystring nullable

Makes a retry after a lost response safe. Reuse the same key for the same adjustment; a repeat replays the original response (or, after the 24h cache, returns it with credited=false) instead of moving credits twice.

X-API-KEYstring nullable

Request body

creditsinteger required

Signed; never zero. Sign must fit the kind.

reasonstring
promote_to_paidboolean
kind'comp' | 'revocation' | 'correction' nullable

Response

Successful Response

tenant_idstring required
credits_adjustedinteger required
new_balance_creditsinteger required
new_plan_typestring required
reasonstring required
ledger_idinteger nullable
grant_idinteger nullable
creditedboolean
kindstring

Changes

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