Reporting API
Deprecation Notice
The Rokt Reporting APIs documented below are now deprecated and will no longer receive new updates or enhancements. We strongly encourage all clients to migrate to the Rokt Query API, which offers greater flexibility, improved performance, and expanded metric/dimension support across reporting use cases.
Why the change?
The Query API provides a modernized and unified interface for retrieving campaign and transaction data, enabling:
- Dynamic grouping with multiple dimensions
- A simplified and consistent request structure
- Enhanced filtering capabilities
- Scalable support for future reporting metrics and dimensions
Migration Support
To assist with your migration, please refer to our Query API Migration Guide, which maps each legacy reporting endpoint to its corresponding Query API request body. This guide includes:
- One-to-one examples for replacing current API calls
- Instructions on parameter translation (e.g., account ID, time zone, currency)
- Information on currently unsupported metadata endpoints
⚠️ Note: Certain legacy metadata endpoints (Campaign, Audience, and Creative Metadata) are not yet supported by the Query API. Continue using these legacy endpoints until otherwise notified.
Overview
The Rokt Reporting API enables advertisers and partners to retrieve their performance data from the Rokt platform to build their own reports and dashboards. It's an HTTP-based API that can be used to programmatically query and integrate Rokt data into external business applications. The API works with any language that supports making HTTP requests. Almost all requests are passed to the https://api.rokt.com
host URL.
To keep your data safe and secure, the Rokt Reporting API uses access tokens to authenticate requests. Access tokens allow Rokt to identify client applications and the type of data being accessed, as well as prevent malicious apps from accessing data that they should not be able to see.
Authentication to the API is performed via OAuth 2.0. To make a successful API call, you need to use an App ID and App Secret to obtain an access token. API requests without authentication will fail. The Rokt Reporting API only allows you to retrieve data from the accounts that your user credentials have access to.
Version
For early adopters using the Alpha Release version of the API, make sure "rokt-version":"alpha-20200701"
is used in your API request header to minimize possible breaking change. If no rokt-version
header is used, your endpoint request will always point to the LATEST
version of the Rokt Reporting API.
Authentication
The Rokt Reporting API leverages the OAuth 2.0 approach to client integration. See the OAuth 2.0 Credentials Flow for more details. You need to use your Rokt App ID and App Secret to access the Rokt Reporting API.
The steps to generate the App ID and App Secret are explained below. You can generate credentials for the Rokt Event API with these same steps.
You need to use these client app credentials in the REST interactions with the Rokt Reporting API.
Generating App ID and App Secret
-
Sign in to One Platform at my.rokt.com.
-
Navigate to Profile Settings under your account icon at the bottom left.
-
Scroll down to the Generate Personal API Credentials section.
-
Enter the name of your app.
-
Click Generate.
-
Your credentials for both the Reporting API and Event API will generate right away and will look something like this:
AppId: "40svbin0d194subpohl079rhck"
AppSecret: "1dimhvr1v6skae9uhvtgs3chs2astnjf0469df6ul9hurubtoovn" -
Store the App ID and App Secret in a secure location. You will not have access to the App Secret again after this session.
-
You can use these credentials right away.
You should keep the credentials confidential in order to protect your account and they should never be emailed. Do not share them outside your organization, even if an inquiry appears to come from Rokt. No one who legitimately represents Rokt will ever ask you for your App Secret.
Getting an access token
An access token is needed to call any endpoint on the Rokt Reporting API. Access tokens allow Rokt to identify client apps, the type of data that each client app is accessing, and prevent malicious apps from accessing data that they do not have access to.
Authentication to the API is performed via OAuth 2.0. To run a successful API call, you will need to use an App ID and App Secret to obtain an access token that will need to be used in all API calls. App ID and App Secret can be generated on the Profile Settings page in One Platform as described above.
API requests without authentication or with incorrect authentication will fail. The API will return either a 400 or 403 error code. From the Rokt Reporting API, you can only retrieve data from the accounts that your user credentials have access to.
Access tokens are generated based on the App ID and App Secret created in the previous step. The access token lasts one hour. During that hour the access token can be used to call all endpoints on the Rokt Reporting API. Before it expires, you need to re-generate the access token based on the client app credentials.
In order to get the access token, an endpoint is exposed in the Rokt Reporting API:
POST https://api.rokt.com/auth/oauth2/token