GET/v1/properties/{propertyId}/connections
Returns the ad platform connections of a property. A connection is an ad platform account that a user authorized for the property. AnyTrack uses it to sync spend and campaign data. The API never returns tokens or credentials.
Before you call
Section titled “Before you call”This endpoint needs IDs that other endpoints return:
- Call List the account properties. Copy the
idof the property: it is thepropertyId. - Call this endpoint with these IDs.
Authentication
Section titled “Authentication”bearerAuth: API key created in the dashboard (atk_…). Send it in the Authorization: Bearer YOUR_API_KEY header.
Path parameters
Section titled “Path parameters”propertyIdstringrequiredID of the property. Get it from
listProperties (id).Responses
Section titled “Responses”Every response field is present unless it shows optional. A type that ends in | null can be null.
200 Successful response
Section titled “200 Successful response”application/json
dataarray of objectAd platform connections of the property. This list has no pages.
Show 10 child attributes
idstringID of the connection. Send it as
connectionId to Get an ad platform connection.platformstringAd platform of the connection.
accountobjectAd platform account that the connection gives access to.
Show 7 child attributes
idstringID of the account on the ad platform.
namestringName of the account on the ad platform.
kindstringType of the account resource, as the ad platform names it.
currencystring | nullCurrency of the account on the ad platform.
timezonestring | nullTime zone of the account on the ad platform.
statusstring | nullStatus of the account, as the ad platform gives it.
parentobject | nullParent of the account on the ad platform.
null when the account has no parent.Show 2 child attributes
idstringID of the parent on the ad platform.
namestring | nullName of the parent.
setupobjectSetup state of the connection.
Show 2 child attributes
statusstringprovisioning: AnyTrack is setting up the connection. ready: the setup is complete. error: the setup failed. Read errorCode.Allowed values
provisioning ready errorerrorCodestring | nullError code of the setup.
null when the setup has no error.authorizedAtstring | nullTime when a user authorized the connection, in ISO 8601 format and in UTC.
authorizedBystring | nullName of the user who authorized the connection.
lastSyncedAtstring | nullTime of the last sync of spend and campaign data from the ad platform, in ISO 8601 format and in UTC.
null before the first sync.destinationIdsarray of stringIDs of the destinations that use this connection. Send one as
destinationId to Get a pixel or ad destination.createdAtstringCreation time of the connection, in ISO 8601 format and in UTC.
updatedAtstringTime of the last change to the connection, in ISO 8601 format and in UTC.
Errors
Section titled “Errors”Every error returns the error object.
| Status | Description and action |
|---|---|
400 | invalid_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. |
401 | unauthenticated: 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. |
403 | api_access_unavailable: API access is disabled for this account. Contact AnyTrack support. OAuth requests also require the anytrack:read scope (insufficient_scope). |
404 | not_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. |
429 | rate_limited: The account sent more than 60 requests in one minute. Wait for the number of seconds in the Retry-After header, then retry. |
500 | response_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. |
503 | service_unavailable: The service is not available for a short time. Retry later, and wait longer after each failed retry. |
Request example
Section titled “Request example”Command template. Replace the path placeholders. Add the query parameters that you need. This is not a recorded request or response.
curl --request GET 'https://api.anytrack.io/v1/properties/{propertyId}/connections' \ --header 'Authorization: Bearer YOUR_API_KEY'