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

Create Ad Account Spend Limit Window

POST
/ad_account/spend_limit_windows

Create a spend limit window with an inclusive start date and exclusive end date. Available only for ad accounts on postpaid invoice billing.

Choose a valid period that does not overlap another limit.

You can schedule up to 60 future date range limits.

Create Ad Account Spend Limit Window

curl https://api.ads.openai.com/v1/ad_account/spend_limit_windows \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $OPENAI_ADS_API_KEY" \
    -d '{
          "amount_micros": 0,
          "end_date": "xxxxxxxxxx",
          "start_date": "xxxxxxxxxx"
        }'
200 — Example
{
  "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
}
Body Parameters
JSON
amount_micros: integer
minimum0
end_date: string
minLength10
maxLength10
start_date: string
minLength10
maxLength10
io_id: optional string
maxLength256
name: optional string
maxLength256
Returns
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
Returns Examples
200 — Example
{
  "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
}