Skip to main content
GET
/
billing
/
api
/
v1
/
billing
/
balance
/
{organization_id}
Get organization ad balance
curl --request GET \
  --url https://www.closient.com/billing/api/v1/billing/balance/{organization_id} \
  --header 'X-API-Key: <api-key>'
{
  "balance": "<string>",
  "currency": "<string>",
  "total_spent": "<string>",
  "active_campaigns": 1
}

Authorizations

X-API-Key
string
header
required

Path Parameters

organization_id
string<shortuuid>
required

UUID of the organization.

Required string length: 22
Pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$

Response

200 - application/json

OK

Snapshot of an organization's prepaid ad balance and lifetime spend.

balance
string
required

Current prepaid ad balance as a decimal string (e.g. "150.00"). Formatted as a string to avoid IEEE-754 round-trip drift on the client. "0.00" when the organization has never funded its balance.

currency
string
required

ISO 4217 currency code for balance and total_spent (typically "USD" — Closient does not currently bill in other currencies).

total_spent
string
required

Lifetime ad spend across all of this organization's campaigns, as a decimal string in currency. Sums Campaign.spent across every campaign (active, paused, and completed). "0" when the organization has never run a campaign.

active_campaigns
integer
required

Count of currently active ad campaigns (Campaign.status == ACTIVE). Excludes paused, completed, and draft campaigns.

Required range: x >= 0