Set the optimization targets
The daily spend goal and CPA band drive both the optimization plan and the safe-apply policy: a budget raise is only ever auto-applied when the campaign's 30-day CPA sits inside this band. Setting the band wrong is the fastest way to make the API too eager or too timid. Pass null to clear a field. Read them back from GET /accounts/{projectId}/plan.
Required scope: admin.
bearerAuthAuthorizationBearer <token>An API key from Workspace → Settings → API keys, sent as Authorization: Bearer tsk_….
Authorization has two independent axes.
The scope is ranked — a key satisfies any requirement at or below its own tier:
read— see state. Never changes anything.write— propose changes (theactions/*endpoints), trigger audits and reports.admin— connection, account import, sync, targets and brief.
There is no approve scope. It was a rung once; it is not one now, and a key requested with it is rejected.
The approval grant (can_approve) is a separate boolean, not a rung. Deciding a queued proposal — approve, reject, revert — needs write and the grant. Keeping them on separate axes is what makes the review gate a control rather than a convention: a key that may propose is not automatically a key that may approve its own proposal.
A key is either org-scoped (reaches every account, optionally limited to a subset) or bound to a single account.
projectId*stringThe account's project UUID — from GET /accounts, NOT the Apple asaOrgId. Pass the literal current with an account-scoped key to use its bound account.
application/json- body
targetDailySpend?|Daily spend goal in currency units (e.g. 300 for €300/day). null clears.
targetCpaMin?|Lower bound of the acceptable CPA band, currency units. Informational — a low CPA is never a spend problem. null clears.
targetCpaMax?|Upper bound of the acceptable CPA band, currency units. This is the gate for budget raises and trims. null clears.
exploreSharePct?|Percent of the daily spend goal reserved for unproven silos (e.g. 10 for 10%). Drives the plan's explore group. null clears it back to the 10% default; 0 turns exploration off.
reason*string10 <= length <= 1500Targets updated.
application/json- response
The stored targets.
[key: string]?anycurl -X PATCH 'https://tapandscale.com/api/v1/accounts/current/targets' \ -H 'Content-Type: application/json' \ -d '{ "reason": "stringstri"}'{}