admin

Add or remove an account's credits, with a note. Owner only.

Change an account's balance by delta (a whole number from -1,000,000 to 1,000,000, not zero) with a required note (1 to 200 characters). A change that would take the balance below zero is 422 credits_below_zero and nothing changes; an unknown account is 404 account_not_found. Every change is audited in the same transaction (GET /v1/admin/actions). Needs the admin scope and an admin account. MCP: admin_adjust_credits.

post/v1/admin/accounts/{account_id}/credits

Request

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

Path parameters

account_idstring required

Headers

authorizationstring nullable

Bearer hd_... from POST /v1/accounts or POST /v1/keys

Request body

deltainteger

credits to add (positive) or remove (negative), not zero

notestring

why, for the audit (required)

Example request

{
  "delta": 100,
  "note": "refund for a failed run"
}

Response

Successful Response

account_idstring required
creditsinteger required

the balance after the change

deltainteger required

Example response

{
  "account_id": "8f1c2d3e-4b5a-4c6d-8e7f-9a0b1c2d3e4f",
  "credits": 537,
  "delta": 100
}

Changes

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