Profile Update

Profile Update

A user profile contains demographic and behavioral information of a web page visitor, such as age, gender, products purchased, last time of visit, and so on that Target uses to personalize the content it serves to the visitor.

The profile information for each visitor is either stored in cookies or in third-party apps.

If your web page implements the Target code, the profile information from the cookies is passed to Target using profile parameters. Target identifies each visitor uniquely through a pcID that it generates the visitor’s cookies. However, you can pass profile parameters from an external app through mbox calls using mbox3rdPartyIds.  

Use the profile APIs when you have profile data about your visitors to send to Target that you either can't or don't want to send as part of your page-based integration with Target. This might be data from a CRM or POS that isn't available on the page, or data of a more sensitive nature that does not make sense to pass on the page.

There are two ways to update profiles via API:

  • Single profile API
  • Bulk profile update via batch  

Single Profile Update

Specify the profile parameters in the format profile.paramName=value.
There is a limit of one million profile updates in a 24-hour period.

To update the profile for a pcId, use :

To update the profile for an mbox3rdPartyId, use:

The Single Profile Update API is for updates only. If nothing is found, a profile is not created.


  • Parameters and values must be URL-encoded using UTF-8.  
  • Parameter format is profile.paramName.
  • Not all parameter values need to exist for all pcIds/mbox3rdPartyId.
  • Parameters and values are case sensitive.
  • Both GET and POST are supported.
  • The current size limitations for limit is 8KB for GET and 60KB for POST.
  • The calls to the profile update API do not count toward your mbox charges.

A sample response for the above requests looks like this:
trueRequest successfully submitted


  • This response indicates the response has been submitted and will be processed soon. In general, lag time is less than a minute.  

Bulk Profile Update

The Bulk Profile Update API allows you to update user profiles for multiple visitors to a website in bulk using a batch file.

Using Bulk Profile Update API, you can conveniently send detailed visitor profile data in the form of profile parameters for a bunch of users to Target from any external source, including CRM or POS, which isn't usually available on a web page.  

Version URL Example Features
V1 Support for bulk profile update only
  • Create profile if not found
  • Per row status update

Note: Currently, version 2 (v2) of the Bulk Profile Update API is used. However, Target still supports version 1 (v1).  


The Bulk Update API call requires a valid access token to be passed in the header of the request.

The access token can be obtained in the following way:

  1. Using the Target Classic UI, go to Configuration > Edit.
  2. Scroll to the bottom of the page.
  3. Under Profile API Settings, switch to ‘Enable’ Require Authorization.
  4. Click Generate Authentication Token.
  5. Copy the token and include it in the request in the header of the
    request in the format: “Authorization” : “Bearer ”

Optionally, use the following API to generate the token:  

Alternatively, use the Basic Authorization API as shown in the following curl example:  

Here is the sample response:

{ "access_token": "b106da37-301d-4cdd-b25f-59ab4c97b5a0", "scope": "profile_api", "expires_in": 21599, "token_type": "bearer” }  


Keep in mind the following points about authorization:

  • Authorization is enforced using the user role of the linked Target user to the Marketing Cloud login.
  • Audiences may be created by any user regardless of their role.
  • Audiences that are used in approved campaigns can only be modified by users who have the "Approver" role.  

Batch File

To update profile data in bulk, create a batch file. The batch file is a text file with values separated by commas similar to the following sample file.

pcId, param1, param2, param3, param4
123, value1
124, value1,,, value4
125,, value2
126, value1, value2, value3, value4

You reference this file in the POST call to Target servers to process the file. When creating the batch file, bear in mind the following:

  • The first row of the file must specify column headers.
  • The first header should either be a pcId or thirdPartyId. The Marketing Cloud visitor ID is not supported. pcId is a Target-generated visitor
    ID. thirdPartyId is an ID specified by the client application, which is passed to Target through an mbox call as mbox3rdPartyId. It must be
    referred to here as thirdPartyId.
  • Parameters and values you specify in the batch file must be URL-encoded using UTF-8 for security reasons. They can be forwarded to other edge nodes for processing through HTTP requests.
  • The parameters must be in the format paramName only. They are displayed in Target as profile.paramName.
  • If you are using Bulk Profile Update API v2, you need not specify all parameter values for each pcId. Profiles are created for any pcId or
    mbox3rdPartyId that is not found in Target. If you are using v1, profiles are not created for missing pcIds or mbox3rdPartyIds.
  • The size of the batch file must be less than 60MB. In addition, the total number of rows should not exceed 500,000. This limit ensures that servers don't get flooded with too many requests.
  • You can send multiple files. However, the sum total of the rows of all the files that you send in a day should not exceed one million for each client.
  • There is no limit on number of attributes you upload. However, the overall size of a profile including system data should not exceed
    2000KB. Adobe recommends you use less than 1000KB of storage for profile attributes.
  • Parameters and values are case sensitive.  

HTTP Post Request

Make an HTTP POST request to Target edge servers to process the file. Here is a sample HTTP POST request for the file batch.txt using the curl command:

curl -X POST --data-binary @BATCH.TXT CLIENTCODE/v2/profile/batchUpdate


  • BATCH.TXT is the filename.   
  • CLIENTCODE is the Target client code.   

If you don't know your client code, in the Target UI click Setup > Implementation > Edit Mbox.js Settings. The client code is shown in the Client field.


3. Inspect the response.

v2 returns a profile-by-profile
status and v1 returns only the overall status. The response includes a
link to a different URL that has the profile-by-profile success message.


In case of an error, the response will contain success=false and a detailed message for the error.

A successful response will look like the following:  

Expected values for the status fields are:   

  • success: The profile was updated. If the profile was not found, one was created with the values from the batch.   
  • error: The profile was not updated or created due to a failure, exception, or message loss.   
  • pending: The profile has not been updated or created yet.   

Any questions?

Have a question about this or any other AEM topic? Ask our Community.
Learn more about AEM topics on our help hub.
Was this helpful?

By submitting your feedback, you accept the Adobe Terms of Use.

Thank you for submitting your feedback.