ads

PATCH /v1/ads/connections/{connection_id}/ai-max

Set the customer's own AI Max guard rules; a rule sent as null is Reset to recommended (za-204).

All ads endpoints

All developer docs →

Zinn®, our Viking, hammering at his anvil beside an API endpoint sending events to several listeners.

Authentication

Send an API key as a bearer token. The key must carry the ads.manage permission; a key without it is refused with 403, not 404.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X PATCH https://api.zinndigital.com/v1/ads/connections/{connection_id}/ai-max \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "rules": <object> }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

Gated on ads.manage and written to the organisation's activity log. rules is merged over the stored rules; a key sent as null returns to its Recommended value and "rules": null resets every rule. A number outside bounds refuses with badAiMaxRule naming the field.

Parameters

NameTypeRequiredWhat it is
connection_id (path)stringYes—

Request body

NameTypeRequiredWhat it is
rulesobjectYes—

Response

NameTypeRequiredWhat it is
as_ofstringYes—
currencystringYes—
skippedstring<, notInGoodStanding, readRefused>Yes—
expandedAdsAiMaxFiguresYes—
keywordAdsAiMaxFiguresYes—
verdictstring<none, learning, no_keyword_return, ok, below>Yes—
basisstring<, value, conversions>Yes—
return_pctintegerYes—
campaignsAdsAiMaxCampaign[]Yes—
waste_termsobject[]Yes—
rulesAdsAiMaxRulesYes—
ownstring[]YesThe rules the customer set (the rest are Recommended).
recommendedAdsAiMaxRulesYes—
boundsobjectYes—

Errors this endpoint can return

401 · 403 · 404 · 422 · 429