Audience Manager API Introduction


Before you start:

There are a few things you need before you can get started working with the AAM APIs. You will need:

  • API Access needs to be granted.
  • A customer id (also called the Client ID).
  • An API secret.
  • Software to facilitate the API requests (I recommend a stand alone Google Chrome application called Postman, but others including CuRL can be used as well).

Please talk with your consultant, or the AAM Customer Care team, to obtain this information.

Once you have obtained this information you will need to encode the Client ID and the API secret using base 64 encoding. The encoded string needs to be in the following format:



You can use a site such as to do the encoding.

The resulting encoding will look something like this: bXljbGllbnRpZDpteWFwaXNlY3JldA==


Document Overview:

Click on a link below to jump to that section of the document


Setting up your client (Postman)

Request an Access Token

Further Examples


Setting Up Your Client:

As was mentioned before, there are multiple differnet options when choosing an HTTP client.  In this document, I am going to be focusing on a stand alone Chrome application called Postman.

You can get Postman here:


Postman offers a lot of really nice features that make organizing or working with HTTP requests really nice.  The application is broken into two main sections.  On the left is a search field, as well as the ability to look at your request history and to store requests in collections.  The rest of the application is dedicated to the compiling and sending of requests.


Creating request in Postman is a fairly straightforward process.  For HTTP requests in general, we need to know the type of request we are going to make, the URL we are targetting, and the parameters required.  Since each request is different, it is recommended that you reference the API documentation to ensure that you have the necessary information.


Note: Before you can make any requests against the API, you must first request an access token. Please see Requesting an Access Token for more information.


Once you know the kind of request you want to make, begin by specifying the type of request  by selecting it from the drop down.

Next, enter in the API URL into the URL field.  This should be in the format like "".

The final step is to define the request parameters.  This is done by entering in various values on either the "Headers" or "Body" tabs.


The Headers change slightly depending on the request being sent, but generally they contain the following three items:


  • Accept | application/json
  • Authorization | Bearer <access token>
  • Content-Type | applicaiton/json

The Body also changes depending on both the type of request being sent, as well as what URL (or endpoint) we are targetting.  Generally values are supplied in a JSON formatted block that contain the various data pairs.

With other requests, the values will be supplied in parameters instead.


Once everything has been setup for the request, you can either send it by clicking the "Send" button in the top right, or save it to a collection by clicking the disk button.


Requesting an Access Token:

The first API call we need to make is to request an Access Token.  To do so, we will submit a POST request to "".  As part of the post, we need to define several headers and other parameters.





Accept : application/json
Authorization : Basic <base 64 encoded token>


Form Type: x-www-form-urlencoded


Request Body (individual key:value pairs):

grant_type : password
username : <AAM Customer Username>
password : <AAM Customer Password>


Example Curl:

curl -X POST -H "Accept: application/json"
-H "Authorization: Basic " -H
"Cache-Control: no-cache" -H "Content-Type:
application/x-www-form-urlencoded" -d


Further Examples:

Here are some additional examples to help you get started with using the API.


Creating a Trait:

HTTP Request Type: Post



  • Accept: application/json
  • Authorization: Bearer <access token>
  • Content-Type: application/json

Request Body:

When creating a new
trait, we need to define both the structure and type of trait, as well as the rules the trait will follow.  Some of the required values include the trait type, trait name, trait description, trait rule, data source id, and the parent folder id. For more information

	"traitType": "RULE_BASED_TRAIT",
	"name": "Blog Post",
	"description": "Tracks when a blog post has been created within the Demo app",
	"comments": "",
	"integrationCode": "post-1",
	"traitRule": "blogPostID==\"1\"",
	"dataSourceId": 14266,
	"folderId": 81659


Request All Rule Based Traits:

HTTP Request Type: Get



  • Accept: application/json
  • Authorization: Bearer <access token>
  • Content-Type: application/json

Request Body: N/A


API Documentation

For more information on what you can do with the API's, please refer to our documentation page.