Guide

AdServices attribution API: what 404, 400 and attribution=false mean

Updated 2026-11-03 · 3 min read

Short answer: A 404 means Apple couldn't find the record yet or the token is older than its 24-hour TTL; retry every 5 seconds, up to three times. A 400 means the token is invalid. A 200 with attribution=false means no matching Apple Ads tap (30 days) or view (24 hours), or the ad group uses age or gender settings. A 500 means retry later.

The flow

  1. Call AAAttribution.attributionToken() on the device (iOS 14.3+, macOS 11.1+). It returns a Base64 token with a 24-hour TTL.
  2. POST the token as the raw body with Content-Type: text/plain to https://api-adservices.apple.com/api/v1/.
  3. Read the JSON payload: attribution, orgId, campaignId, adGroupId, keywordId, adId, conversionType, claimType, clickDate or impressionDate, countryOrRegion, supplyPlacement.

Response codes

CodeMeaningWhat to do
200, attribution=trueMatching Apple Ads tap or viewStore the campaign, ad group and keyword ids
200, attribution=falseNo match, or the ad group uses age/gender settingsTreat as not attributed to Apple Ads
400Invalid tokenCheck you're sending the raw token as text/plain
404Record not found yet, or the token is older than 24 hoursRetry every 5 seconds, max three attempts; post within 24 hours
500Apple Ads server temporarily unavailableRetry later

Common mistakes

Tap vs view

claimType is Click for tap-through (30-day window) or Impression for view-through (24-hour window). Taps take priority over views.

Questions

How long is the AdServices token valid?

24 hours. Posting it later returns 404.

Why does attribution return false for my campaign?

Either there was no Apple Ads tap in the last 30 days or view in the last 24 hours, or the ad group uses age or gender settings, which always return false.

Sources

Related integrations

More guides