Topup Child Workspace
POST/api/v1/workspaces/:workspace_id/credits
Top up a customer workspace's balance. Returns 404 if not yours, 403 if suspended, 409 if parent has insufficient balance.
Requires Idempotency-Key header for retry safety. amount_usd is parsed as a decimal and converted to microdollars (1 USD = 1,000,000 microdollars). Non-positive or non-integral microdollars are rejected with 422.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 429
Successful Response
Idempotency-Key header missing, or the request was rejected before any work started.
X-API-Key missing, invalid or revoked.
The key has no access to this workspace, or the workspace has the feature disabled.
No such resource in the key's workspace.
This Idempotency-Key was already used with a different body, or the same request is still in progress.
Response Headers
Seconds to wait before retrying.
Validation Error
Per-key rate limit exceeded.
Response Headers
Seconds to wait before retrying.