Get Ad Account Spend Limit Windows
View account spending limits.
Set a shared spending limit across all campaigns in an ad account. Choose a date range limit for a total allowance over a fixed period, or a daily limit for an allowance that renews each day. Campaign budgets still apply; account limits do not allocate spend between campaigns or pace delivery.
Note: Account spending limits are available only for ad accounts on postpaid invoice billing. Existing daily limits can still be viewed and removed if the account's billing changes. Reads require billing-read access or a permitted account-bound service key. Editing limits additionally requires spending-limit management permission.
Both types use the account currency and timezone:
- Amounts are nonnegative integers in micros:
100000000is 100 currency units. Use the currency's smallest unit, such as multiples of10000micros for USD. The maximum is 1 billion currency units (1000000000000000micros). - Dates use
YYYY-MM-DD. Limits start at midnight on the start date and end at midnight on the end date, in the account timezone. The end date is excluded. - Daily and date range limits cannot overlap. Existing scheduled limits are not removed when you create a daily limit.
- Daily allowances do not carry over or change with daylight saving time. The account timezone cannot change while a daily limit exists.
Limits apply to billable ad spend, not taxes or the total invoice. Delivery can take time to stop after a limit is reached. Amount edits take effect on save and retain counted spend; a decrease below recorded spend is rejected. Edits are not retroactive: delayed charges use the limit effective when the event occurred, and concurrent billing can add spend while an edit is saved. A lower limit cannot undo spend already billed.
Read the configuration before making changes. Use the returned edit capabilities
to determine which mutations are available. An omitted spent_micros does not
mean zero spend. Configuration evaluation time is separate from spend-counter
freshness.
Use daily_limits to inspect active and upcoming daily rules. The legacy
daily_limit field selects the active or earliest upcoming rule. Send the current
revision as expected_revision for daily mutations; use 0 only if the
revision is absent. A false can_create_daily_limit does not by itself prevent
editing an existing rule.
After a daily mutation returns 503, refresh before retrying: the change may
have succeeded even if its response could not be loaded.
Get Ad Account Spend Limit Windows
curl https://api.ads.openai.com/v1/ad_account/spend_limit_windows \
-H "Authorization: Bearer $OPENAI_ADS_API_KEY"{
"data": [
{
"amount_micros": 0,
"can_delete": true,
"can_edit": true,
"can_edit_start_date": true,
"end_date": "end_date",
"io_id": "io_id",
"name": "name",
"start_date": "start_date",
"status": "status",
"window_id": "window_id",
"spent_micros": 0
}
],
"object": "object",
"can_create_daily_limit": true,
"can_manage_spend_limits": true,
"daily_limit": {
"amount_micros": 0,
"end_date": "end_date",
"next_reset": "next_reset",
"remaining_micros": 0,
"spend_as_of": "spend_as_of",
"spent_micros": 0,
"start_date": "start_date",
"status": "status",
"timezone": "timezone",
"window_id": "window_id"
},
"daily_limits": [
{
"amount_micros": 0,
"end_date": "end_date",
"next_reset": "next_reset",
"remaining_micros": 0,
"spend_as_of": "spend_as_of",
"spent_micros": 0,
"start_date": "start_date",
"status": "status",
"timezone": "timezone",
"window_id": "window_id"
}
],
"earliest_daily_start_date": "earliest_daily_start_date",
"earliest_dated_start_date": "earliest_dated_start_date",
"evaluated_at": "evaluated_at",
"revision": 0
}Returns
Earliest accounting-safe account-local start date for a new Daily rule; activation is never same-day. The full interval must also avoid dated and IO limits.
Earliest account-local start date, YYYY-MM-DD, for new or retimed Date range limits after retained Daily protection; null if none. Does not restrict amount or metadata edits when the existing dates are unchanged.
Returns Examples
{
"data": [
{
"amount_micros": 0,
"can_delete": true,
"can_edit": true,
"can_edit_start_date": true,
"end_date": "end_date",
"io_id": "io_id",
"name": "name",
"start_date": "start_date",
"status": "status",
"window_id": "window_id",
"spent_micros": 0
}
],
"object": "object",
"can_create_daily_limit": true,
"can_manage_spend_limits": true,
"daily_limit": {
"amount_micros": 0,
"end_date": "end_date",
"next_reset": "next_reset",
"remaining_micros": 0,
"spend_as_of": "spend_as_of",
"spent_micros": 0,
"start_date": "start_date",
"status": "status",
"timezone": "timezone",
"window_id": "window_id"
},
"daily_limits": [
{
"amount_micros": 0,
"end_date": "end_date",
"next_reset": "next_reset",
"remaining_micros": 0,
"spend_as_of": "spend_as_of",
"spent_micros": 0,
"start_date": "start_date",
"status": "status",
"timezone": "timezone",
"window_id": "window_id"
}
],
"earliest_daily_start_date": "earliest_daily_start_date",
"earliest_dated_start_date": "earliest_dated_start_date",
"evaluated_at": "evaluated_at",
"revision": 0
}