Skip to content
POST/v1/properties/{propertyId}/reports/events

Returns the number of events for each event name and each day of a date range of up to 31 days.

This endpoint needs IDs that other endpoints return:

  1. Call List the account properties. Copy the id of the property: it is the propertyId.
  2. Call this endpoint with these IDs.

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

propertyIdstringrequired
ID of the property. Get it from listProperties (id).
application/jsonrequired
fromstring · daterequired
First day of the report, included, in the property time zone. The range covers at most 31 days.
Format YYYY-MM-DD, e.g. 2026-01-31
tostring · daterequired
Last day of the report, included, in the property time zone. to must be on or after from.
Format YYYY-MM-DD, e.g. 2026-01-31
eventNamesarray of string
Event names to include, for example Purchase or Lead. Without this field, the report includes every event.
Min items 1Max items 50Item min length 1Item max length 64
limitinteger
Number of items on each page.
Default 50Min 1Max 100
cursorstring
The nextCursor from the previous page. Keep the property and query fields unchanged. limit may change where supported. Pages are not snapshot-consistent.
Min length 1Max length 2048

Every response field is present unless it shows optional. A type that ends in | null can be null.

application/json
dataarray of object
Rows of the report on this page. Each row is one event name on one day.
Show 3 child attributes
datestring
Day of the events, in the property time zone.
eventNamestring
AnyTrack event name, for example Purchase or Lead.
countnumber
Number of events with this name on this day.
nextCursorstring | null
Cursor of the next page. Send it as cursor with the same query to get the next page. null on the last page.
reportobject
Settings that AnyTrack used for the report.
Show 5 child attributes
propertyIdstring
ID of the property.
fromstring
First day of the report, as in the request.
tostring
Last day of the report, as in the request.
timezonestring
Time zone of the report. It is the time zone of the property.
currencystring
Configured reporting currency of the property. For individual conversions, use the currency returned on each event for its value.

Every error returns 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.

Command template. Replace the path placeholders. Put the request body in request-body.json, as in the schema above. Add the query parameters that you need. This is not a recorded request or response.

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

Download the OpenAPI contract.