Generate sample profiles based on a source schema

The first step in testing your file-based destination is to use the /sample-profiles endpoint to generate a sample profile based on your existing source schema.

Sample profiles can help you understand the JSON structure of a profile. Additionally, they give you a default that you can customize with your own profile data, for further destination testing.

Getting started getting-started

Before continuing, please review the getting started guide for important information that you need to know in order to successfully make calls to the API, including how to obtain the required destination authoring permission and required headers.

Prerequisites prerequisites

Before you can use the /sample-profiles endpoint, make sure you meet the following conditions:

  • You have an existing file-based destination created through the Destination SDK and you can see it in your destinations catalog.

  • You have created at least one activation flow for your destination in the Experience Platform UI. The /sample-profiles endpoint creates the profiles based on the source schema that you defined in your activation flow. See the activation tutorial to learn how to create an activation flow.

  • To successfully make the API request, you need the destination instance ID corresponding to the destination instance that you will be testing. Get the destination instance ID that you should use in the API call, from the URL, when browsing a connection with your destination in the Platform UI.

    UI image showing how to get destination instance ID from the URL.

Generate sample profiles for destination testing generate-sample-profiles

You can generate sample profiles based on your source schema by making a GET request to the /sample-profiles endpoint with the destination instance ID of the destination that you want to test.

API format

GET /authoring/sample-profiles?destinationInstanceId={DESTINATION_INSTANCE_ID}&count={NUMBER_OF_GENERATED_PROFILES}
Query parameters
The ID of the destination instance for which you are generating sample profiles. See the prerequisites section for details on how to obtain this ID.
Optional. The number of sample profiles that you want to generate. The parameter can take values between 1 - 1000. If this property is not defined, then the API generates a single sample profile.


The following request generates a sample profile based on the source schema defined in the destination instance with the corresponding destinationInstanceId.

 -H 'Authorization: Bearer {ACCESS_TOKEN}' \
 -H 'Content-Type: application/json' \
 -H 'x-gw-ims-org-id: {IMS_ORG}' \
 -H 'x-api-key: {API_KEY}' \
 -H 'x-sandbox-name: {SANDBOX_NAME}' \


A successful response returns HTTP status 200 with the specified number of sample profiles, with audience membership, identities, and profile attributes that correspond to the source XDM schema.

The response returns only audience membership, identities, and profile attributes that are used in the destination instance. Even if your source schema has other fields, these are ignored.

Image showing the mapping from the UI to the fields from the API response.

A map object which describes the individual’s audience memberships. For more information on segmentMembership, read Audience Membership Details.
A timestamp of the last time this profile qualified for the segment.

A string field that indicates whether the audience membership has been realized as part of the current request. The following values are accepted:

  • realized: The profile is part of the segment.
  • exited: The profile is exiting the audience as part of the current request.
A map-type field that describes the various identity values for an individual, along with their associated namespaces. For more information on identityMap, see basis of schema composition.

API error handling api-error-handling

Destination SDK API endpoints follow the general Experience Platform API error message principles. Refer to API status codes and request header errors in the Platform troubleshooting guide.

Next steps

After reading this document, you now know how to generate sample profiles based on the source schema that you configured in your destination activation flow.

You can now customize these profiles or use them as they are returned by the API, to test your file-based destination configuration.