Skip to content

Export campaign performance as CSV

Exports all matching rows without a summary, using the property time zone. Date ranges are limited to 31 days and files to 1048576 bytes. CSV columns are name, refType, refId, followed by the requested metrics.

POST/v1/properties/{propertyId}/reports/campaigns/export

bearerAuth: API key created in the dashboard (atk_…). Send it in the Authorization: Bearer YOUR_API_KEY header.

propertyIdstringrequired
Property id
application/jsonrequired
fromstring · daterequired
Inclusive start date in the report time zone
Format YYYY-MM-DD, e.g. 2026-01-31
tostring · daterequired
Inclusive end date in the report time zone
Format YYYY-MM-DD, e.g. 2026-01-31
attributionstring
Allowed values last-ad-click first-ad-clickDefault last-ad-click
groupBystring
Allowed values campaign adset adDefault campaign
metricsarray of string
Min items 1Max items 20Item max length 80
conversionEventsarray of string
Defaults to the property conversion events
Min items 1Max items 20Item min length 1Item max length 64
filtersobject
Show 6 child attributes
channelarray of string
Min items 1Max items 50Item min length 1Item max length 256
platformarray of string
Min items 1Max items 50Item min length 1Item max length 256
adNetworkarray of string
Min items 1Max items 50Item min length 1Item max length 256
campaignIdsarray of string
Min items 1Max items 50Item min length 1Item max length 256
adsetIdsarray of string
Min items 1Max items 50Item min length 1Item max length 256
adIdsarray of string
Min items 1Max items 50Item min length 1Item max length 256
sortobject
Show 2 child attributes
metricstringrequired
Allowed values spend impressions reach frequency linkClicks sessions clients eventValues results resultValues cpm cpc ctr roas
directionstring
Allowed values asc descDefault desc
text/csv
string
application/json
errorobjectrequired
Show 5 child attributes
codestringrequired
Allowed values invalid_request invalid_cursor unauthenticated api_access_unavailable not_found payload_too_large rate_limited response_too_large upstream_timeout service_unavailable internal_error
messagestringrequired
requestIdstringrequired
retryablebooleanrequired
Whether retrying the request can succeed
detailsarray of object
Show 2 child attributes
pathstringrequired
messagestringrequired
messagestring
codestring
issuesarray of object
Show 1 child attribute
messagestringrequired

Same response body as 400.

Same response body as 400.

Same response body as 400.

Same response body as 400.

Same response body as 400.

503 Temporarily unavailable; retry with backoff

Section titled “503 Temporarily unavailable; retry with backoff”

Same response body as 400.

504 The query timed out; narrow the date range or retry

Section titled “504 The query timed out; narrow the date range or retry”

Same response body as 400.

Synthesized command template. Replace path placeholders and provide request-body.json matching the schema above; add query parameters as needed. This is not a recorded request or response.

Terminal window
curl --request POST 'https://api.anytrack.io/v1/properties/{propertyId}/reports/campaigns/export' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data @request-body.json

Download the OpenAPI contract.