Skip to content

How to use SDKs and APIs for Key Value Pairs

What are Audience Insights Key-Value Pairs?

Audience Insights Key-Value Pairs (KVPs) are used to store and organize customer data with flexible key-value Pairs. You can configure validation rules to maintain data consistency, and use built-in templates aligned with IAB standards for consistent, comparable taxonomies.

Using Key Value Pairs from a public domain through APIs

All available public APIs are documented in our Open API documentation. You can identify these APIs by the presence of /identity/public/v2/extprofile/kv/ in the endpoint URL. The APIs require authentication, you must pass a valid access_token (Authorization header). Ensure the access token is valid before making the API call.

Authentication and Authorization

For tracking user calls and accessing protected public APIs, most of our public APIs requires an access token. This access token is in JWT (JSON web tokens) format and is returned after the user is logged in to the system. See here for more: Connect and log in with Arc XP Identity SDKs and APIs on the web When the user logs in, two JWTs are returned if the request is successful:

  • Access token: This token has a limited lifetime (15 minutes by default) and identifies the user. It must be passed as a Bearer token in the protected request.

  • Refresh token: This token is used to refresh and obtain a new access token when the old one expires. You can customize the lifetime of the refresh token through the CSR tool.

You must pass the access token in the Authorization header as a Bearer token when making API calls that require authentication. It is recommended that you use the browser SDKs when possible, as they will handle token expiration and refreshing automatically.

Example: Authentication required

Terminal window
curl --location 'https://{ApiOrigin|CDN}/identity/public/v2/extprofile/kv' \
--header 'Authorization: Bearer {access_token}'

For more information about the available APIs, see Audience Insights APIs.

Arc XP Audience Insights KV Pairs SDK Methods

Before utilizing these methods, see Audience Insights: Getting Started for more information on setting up the SDK.

As mentioned earlier, our SDK methods serve as wrappers, making it easier for developers to interact with our APIs. The following table lists the Sales SDK methods and the corresponding APIs they wrap.

SDK MethodAPI
submitValue(key, value)POST /identity/public/v2/extprofile/kv
listKVPairs()GET /identity/public/v2/extprofile/kv
getKeyValue(key)GET /identity/public/v2/extprofile/kv/{key}