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

Update Ad Account Spend Limit Window

POST
/ad_account/spend_limit_windows/{window_id}

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

Send at least one field from the create request. Omitted fields retain their values; send null to clear name or io_id. Dates and amounts cannot be null. Date range mutations do not require expected_revision.

Only upcoming limits can change their start date. An active limit's end date must remain in the future. Completed limits cannot be edited.

For example, a $1,500 allowance in a USD account is amount_micros: 1500000000.

Update Ad Account Spend Limit Window

curl https://api.ads.openai.com/v1/ad_account/spend_limit_windows/$WINDOW_ID \
    -X POST \
    -H "Authorization: Bearer $OPENAI_ADS_API_KEY"
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
}
Path Parameters
window_id: string
minLength1
Body Parameters
JSON
amount_micros: optional integer
minimum0
end_date: optional string
minLength10
maxLength10
io_id: optional string or null
maxLength256
name: optional string or null
maxLength256
start_date: optional string
minLength10
maxLength10
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
}