Skip to main content
Skip table of contents

API Keys for Ad Exchange Reporting

The Sovrn Advertising Reporting API requires an Authorization header to be added to each request, ensuring that we keep our data secure. You'll need an API key in order to authenticate using this method.

How to create an API key?

To create your API key(s):

  • Log into the Sovrn Platform

  • Navigate to API Keys, found in the Account menu

  • Select the + API Key button located in the top right corner

  • Enter a name for the new API key, then select Create.

  • The newly generated API key will now be displayed. Ensure you save the key before closing the window as this will be the only time you will be able to view the value!

  • If you close the window before saving the key, you'll need to delete the API key and create a new one.

What access does a generated API key allow?

Any one of the generated keys will grant you access to all Advertising reporting data associated with your Sovrn account. All keys have the same access.

How to delete an API key?

  • Log into the Sovrn Platform

  • Navigate to API Keys, found in the Account menu

  • API key entries can be deleted here at any time by selecting the trashcan icon located on the right side of the entry.

How many API keys can I create?

There are currently no limitations on how many API keys can be created on your account.

However, any one of the generated keys will grant you access to all Advertising reporting data associated with your Sovrn account.

Who can create and manage API keys? 

You must be the account owner to create or delete API keys.
To determine the email address of the current account owner, visit Manage users in the Sovrn Platform and locate the "original user." If you need to change the account owner, please contact support.

How to use the API key to authenticate? 

The API Key is provided as part of the request header, as a key/value pair. The header name is "x-api-key" and the value is the API Key that the publisher has generated in the platform. For example:

x-api-key: {API KEY}

The API Key will be a 7-character sequence followed by a "." and then a 32-character UUID. For example:

1234567.a34d7eb0-abfc-44fea-9fcc-7es42be45663

Please ensure that the word "x-api-key" is included as text, plus a space, before passing the value of your APIKey.

Example Curl request

Below is an example CURL request that you can run to verify everything is working correctly:

CODE
curl --request GET \   
--url 'https://api.sovrn.com/reporting/advertising/publishers/262681/domains/sovrntest.com/account?start=2021-08-01T00%3A00%3A00Z&end=2021-09-02T00%3A00%3A00Z&metrics=publisherRevenue&dimensions=domain%2CzoneId' \   
--header 'x-api-key: prefix1.XXXXXXXX-YYYY-ZZZZ-AAAA-BBBBBBBBBBBB' 

Where to find more information on the API?  

Visit Sovrn's Developer Center for more information about Sovrn's APIs. 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.