Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
API ReferenceBilling and usageBilling

Read the org's auto-recharge policy

Returns the org's auto-recharge settings: whether it is on, the available-balance threshold that triggers a charge, and the amount charged, in cents.

Required permission

Requires the billing.read permission. See Permissions for the roles and API key permissions that include it.

Command line

The orl CLI wraps this endpoint:

orl billing auto-recharge get
GET
/v1/orgs/{orgId}/billing/auto-recharge

Authorization

apiKey
headerAuthorizationBearer <token>

OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).

Path Parameters

orgId*string

Response Body

Current settings (defaults when never set)

application/json
  1. response
enabled*boolean

When on, the balance is topped up automatically below the threshold.

thresholdCents*integer

Recharge fires when available balance drops below this. For an org subject to auto-stop, a value under the $0.50 auto-stop floor acts as the floor, so a recharge is attempted before workloads are stopped. The attempt is still subject to the amount bounds and the monthly spend limit.

amountCents*integer

Amount charged per auto-recharge, in cents. When enabled is true it must sit within the deposit bounds, $25 to $500; a stored amount under the $25 floor is never charged. Ignored while enabled is false.

Example Request
curl -X GET 'https://api.openrelay.inc/v1/orgs/string/billing/auto-recharge'
Example Response
{  "enabled": true,  "thresholdCents": 0,  "amountCents": 0}