Set Ad Account Daily Spend Limit
Set an account-wide daily billable ad-spend limit, with an optional exclusive end date. Send window_id=null to create a separate non-overlapping schedule, or a rule ID to edit. Omitting window_id retains legacy singleton upsert and rejects ambiguous configurations. Creating or editing a daily limit requires an ad account on postpaid invoice billing. Omit end_date to retain an existing end, or send null for no end. First activation takes effect no earlier than the next account-local day. Increases and decreases apply on save and retain today's counted spend; a decrease below recorded spend is rejected. Like Date range limits, edits are not retroactive: delayed charges use the settings effective at their event time, and the spend check is not atomic with concurrent billing. The saved amount repeats each day in the recorded account timezone, without carryover, proration, or campaign-style flexibility.
Use earliest_daily_start_date from the list response when scheduling a new limit.
Use the latest revision and an allowed start date from the list response, and check for overlaps before submitting.
For an amount edit, send the intended window_id, amount_micros, and the latest
expected_revision;
omit start_date. Both increases and decreases take effect on save, subject
to the edit rules above.
Inspect spend_limits.daily_limits and identify the saved rule by its
window_id; read spend_limits.revision for the new revision. The legacy
daily_limit field selects the active or earliest upcoming rule, which may
not be the rule just saved.
Set Ad Account Daily Spend Limit
curl https://api.ads.openai.com/v1/ad_account/daily_spend_limit \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $OPENAI_ADS_API_KEY" \
-d '{
"amount_micros": 0,
"expected_revision": 0
}'{
"spend_limits": {
"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
}
}Body ParametersJSON
Maximum billable ad spend for each account-local day, in account-currency micros.
Revision from the latest account-limit list response; use 0 when absent.
Optional exclusive account-local end date (YYYY-MM-DD). Omit to retain an existing end, or send null for no end. Must be after the start date and in the future. Expired limits cannot be edited.
Account-local activation date (YYYY-MM-DD). Defaults to earliest_daily_start_date from the list response on first creation; required when recreating a removed or expired limit. New limits cannot start before earliest_daily_start_date. Omit when editing an existing active or upcoming limit; its start date cannot change.
Returns Examples
{
"spend_limits": {
"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
}
}