Skip to content

Read-only API for your AnyTrack data: properties, campaign, event, and conversion reports, integrations, ad connections, pixels, and webhooks.

The AnyTrack API gives read-only access to the data in your AnyTrack account. Use the API to send your AnyTrack data to your own tools, for example a data warehouse, a dashboard, or a script.

  • List your properties, and get the reporting settings of each property.
  • Get the campaign report, the events report, and the conversions report of a property. Export the campaign report as a CSV file.
  • Get the full record of one conversion event.
  • List your integrations, and read the requests that each integration receives. Use these logs to troubleshoot a postback or a webhook.
  • List the ad platform connections, the pixels and ad destinations, and the webhooks of a property.

The API cannot change your data. To use the API, create an API key. See API Keys.

Base URLhttps://api.anytrack.io/v1

Contract version 1.0.0. Generated from the production specification at KB build time. Download this build’s OpenAPI snapshot.

Your AnyTrack accountOne API key reads every property and every integration of the account.
Properties propertyId
Integrations integrationId
Each level needs the ID of the level above it. Get the ID from the list endpoint of that level.

The resources also link to each other:

  • An integration has a propertyId when it belongs to a property.
  • A conversion event has an integrationId when an integration sent it.
  • A connection has destinationIds: the destinations that use the connection.

Most endpoints need IDs that other endpoints return. The Before you call section of each endpoint gives the calls in order. For example, to get one ad platform connection:

  1. Call List the account properties. Copy the id of the property.
  2. Call List the ad platform connections of a property with this propertyId. Copy the id of the connection.
  3. Call Get an ad platform connection with the propertyId and the connectionId.
  • required on a request field or parameter: send it in every request.
  • optional on a response field: the field can be absent from the response. Every other response field is always present.
  • A type that ends in | null can have the value null.
  • Show child attributes opens the fields of an object.

The property list, the reports, and the integration logs return one page at a time. Each page has data and nextCursor.

  1. Send the first request without cursor.
  2. If nextCursor is not null, send the same request again with cursor set to the value of nextCursor.
  3. Stop when nextCursor is null.

A page has 50 items by default. Set limit to a value from 1 to 100. Integration logs have 20 items on each page. A cursor works only with the query that made it. With a different query, the API returns 400 with the code invalid_cursor.

Pages are not a snapshot. If the data changes while you read the pages, an item can move to a different page. For a consistent result, start again from the first page. The lists of integrations, connections, destinations, and webhooks have no pages: one response contains all the items.

  • from and to are calendar dates in the format YYYY-MM-DD. The range includes both days. A report covers at most 31 days.
  • Reports use the time zone and the currency of the property. The report object of each report response gives both. You cannot change them in the request.
  • Integration logs use dates in UTC.
  • Timestamps, such as time and createdAt, use the ISO 8601 format in UTC.
  • Events can take a few minutes to show in reports, and AnyTrack syncs ad spend on a schedule. The data of the current day is not complete.
LimitValue
Requests60 per minute for each account. All the API keys of the account share this limit.
Report range31 days
Page size1 to 100 items, 50 by default
Request body16 KB
Response1 MB
Report query time65 seconds

Each account can send 60 requests per minute. A response within the limit has the headers X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset. Above the limit, the API returns 429 with the code rate_limited and a Retry-After header.

AnyTrack will set the rate limit by plan. The limit of each plan is not available yet.

Every error response contains one error object. Every response has an X-Request-Id header.

{
"error": {
"code": "invalid_request",
"message": "Invalid request",
"requestId": "req_5f0c1a2b3c4d5e6f7a8b9c0d",
"retryable": false,
"details": [{ "path": "to", "message": "Date range cannot exceed 31 days" }]
}
}

Retry a request only when error.retryable is true. A request body that is not valid JSON gets a 400 response without the error object.

StatusDescription and action
400invalid_request, invalid_cursor: A parameter or a body field is not valid, or the cursor belongs to a different query. Correct the request. error.details, when present, names invalid fields. Do not reuse a cursor with a different query.
401unauthenticated: Missing, invalid or deleted API key. Send a valid key in Authorization: Bearer. MCP uses an OAuth access token, which may also expire or be revoked.
403api_access_unavailable: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the anytrack:read scope (insufficient_scope).
404not_found: An ID does not exist, or it belongs to a different account. The API gives the same error for both. Check the IDs. Get them again from the list endpoints.
413payload_too_large: The request body is larger than 16 KB. Send a smaller request body.
429rate_limited: The account sent more than 60 requests in one minute. Wait for the number of seconds in the Retry-After header, then retry.
500response_too_large, internal_error: The response is larger than 1 MB, or the API has an internal error. For response_too_large, ask for fewer rows or metrics. For internal_error, contact AnyTrack support with the requestId.
503service_unavailable: The service is not available for a short time. Retry later, and wait longer after each failed retry.
504upstream_timeout: A downstream request timed out (the report client timeout is 65 seconds). Narrow the date range, then retry with backoff.
errorobject
The error.
Show 5 child attributes
codestring
Error code. Your code can test this value. See the table of error codes.
Allowed values invalid_request invalid_cursor unauthenticated insufficient_scope api_access_unavailable not_found payload_too_large rate_limited response_too_large upstream_timeout service_unavailable internal_error
messagestring
Description of the error for people.
requestIdstring
ID of the request. Give it to AnyTrack support when you report a problem.
retryableboolean
true when a retry of the same request can succeed. Retry only when this value is true.
detailsarray of objectoptional
Problems in the request, one item for each field. Validation errors use it.
Show 2 child attributes
pathstring
Request field that has the problem.
messagestring
Description of the problem.
messagestringoptional
Added to some errors by the API framework. Use error.message instead.
codestringoptional
Added to some errors by the API framework. Use error.code instead.
issuesarray of objectoptional
Added to some validation errors by the API framework. Use error.details instead.
Show 1 child attribute
messagestring
Description of the problem.

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

A connection is an ad platform account authorized for a property. AnyTrack uses it to sync spend and campaign data.

A conversion is one tracked event, such as a Purchase or a Lead. Find events with the conversions report, then get one event with its id.

A destination is a pixel or an ad platform that receives conversions from a property.

An integration is a source of events, such as a store, a form, or an affiliate network. Integrations belong to the account, and each one can also belong to one property.

A property is a website or funnel that AnyTrack tracks. Every report, conversion, connection, destination, and webhook belongs to one property.

Reports return the data of a property for up to 31 days, in the time zone and currency of the property.

An outgoing webhook sends the events of a property to a URL.