Get performance by segment
Campaign-grain performance split by one dimension. dimension is required — each comes from a different fact table, so there is no 'all dimensions' read. Remember Apple has no bid modifiers: to bid differently on a segment you split it into its own ad group or campaign.
Required scope: read.
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.
dimension*stringWhich dimension to split by.
"device""storefront""day_of_week""hour""age""gender"campaignId?stringRestrict to one campaign.
days?integerLook-back window in days. Anchors at YESTERDAY, not today — Apple's current-day numbers are incomplete.
1 <= value <= 9030Performance rows for the dimension.
application/json- response
dimension?stringcurrency?string|nullrows?array<>dataFreshness?curl -X GET 'https://tapandscale.com/api/v1/accounts/current/segments?dimension=device'{ "dimension": "string", "currency": "string", "rows": [ {} ], "dataFreshness": { "lastSyncAt": "2019-08-24T14:15:22Z", "ageHours": 0, "coverage": "string", "warning": "string" }}