For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Overview Agent Access Ads ChatGPT + Codex user docs Use cases

API Reference

Set Ad Account Daily Spend Limit

POST
/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
        }'
200 — Example
{
  "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 Parameters
JSON
amount_micros: integer

Maximum billable ad spend for each account-local day, in account-currency micros.

minimum0
expected_revision: integer

Revision from the latest account-limit list response; use 0 when absent.

minimum0
end_date: optional string or null

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.

minLength10
maxLength10
start_date: optional string

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.

minLength10
maxLength10
window_id: optional string or null

Daily rule ID to edit. Send null to create a new non-overlapping Daily rule. Omit only for legacy singleton upsert; multiple active or upcoming rules require an ID.

minLength1
Returns
spend_limits: object { data, object, can_create_daily_limit, 7 more }
data: array of object { amount_micros, can_delete, can_edit, 8 more }
amount_micros: integer
can_delete: boolean
can_edit: boolean
can_edit_start_date: boolean
end_date: string
io_id: string or null
name: string or null
start_date: string
status: string
window_id: string
spent_micros: optional integer
object: string
can_create_daily_limit: optional boolean
can_manage_spend_limits: optional boolean
daily_limit: optional object { amount_micros, end_date, next_reset, 7 more } or null
amount_micros: integer

Current daily billable ad-spend cap.

end_date: string or null

Exclusive account-local end date, YYYY-MM-DD; null means no end.

next_reset: string or null

Next account-local midnight with a fresh allowance, ISO 8601; null before activation or on the final protected day.

remaining_micros: integer or null
spend_as_of: string or null

Actual enforcement counter update timestamp, ISO 8601; null if unavailable.

spent_micros: integer or null

Enforcement-backed spend for this day; null if unavailable or not active.

start_date: string

First protected account-local date, YYYY-MM-DD.

status: string

active or upcoming.

timezone: string

Recorded IANA timezone; immutable while Daily exists.

window_id: optional string

Immutable Daily rule ID for targeted edits and removal.

daily_limits: optional array of object { amount_micros, end_date, next_reset, 7 more }

Active and upcoming Daily rules, ordered by start date ascending.

amount_micros: integer

Current daily billable ad-spend cap.

end_date: string or null

Exclusive account-local end date, YYYY-MM-DD; null means no end.

next_reset: string or null

Next account-local midnight with a fresh allowance, ISO 8601; null before activation or on the final protected day.

remaining_micros: integer or null
spend_as_of: string or null

Actual enforcement counter update timestamp, ISO 8601; null if unavailable.

spent_micros: integer or null

Enforcement-backed spend for this day; null if unavailable or not active.

start_date: string

First protected account-local date, YYYY-MM-DD.

status: string

active or upcoming.

timezone: string

Recorded IANA timezone; immutable while Daily exists.

window_id: optional string

Immutable Daily rule ID for targeted edits and removal.

earliest_daily_start_date: optional string

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_dated_start_date: optional string or null

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.

evaluated_at: optional string

Evaluation timestamp, ISO 8601; distinct from spend reporting freshness.

revision: optional integer

Current configuration revision for conditional Daily mutations.

Returns Examples
200 — Example
{
  "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
  }
}