This guide provides a technical overview and step-by-step instructions to programmatically duplicate a Contentstack Personalize Project from one Organization or Region to another.
| Item | API Endpoint(s) | Description |
| Attributes | GET /attributes, POST /attributes | Supports CRUD (Create, Read, Update, Delete) operations. Use GET to export all attribute definitions and POST to create them in the destination project. |
| Audiences | GET /audiences, POST /audiences | Supports CRUD operations. Use GET to export audience configurations and POST to create them in the destination project. |
| Events | GET /events, POST /events | Supports CRUD operations. Use GET to export events and POST to create them in the destination project. |
| Experiences | GET /experiences, POST /experiences | Use GET to fetch a list of all experiences. Use the POST endpoints to create new experiences in the destination project. |
| Experience Versions | GET /experiences/{exp_uid}/versions POST /experiences/{exp_uid}/versions PUT /experiences/{exp_uid}/versions | Use GET to retrieve detailed variant data. POST to create new versions, and PUT to activate (or pause) them. |
Duplicating a personalization experience across organizations/regions follows the Extract, Transform, Load (ETL) pattern:
The key endpoint for this process is GET /experiences/{exp_uid}/versions, which provides the detailed variant data required for a complete duplication.
GET /personalize/projects/{source_project_uid}/attributes
GET /personalize/projects/{source_project_uid}/audiences
GET /personalize/projects/{source_project_uid}/events
Response Example (Attributes):
[
{
"uid": "attr_01",
"key": "region",
"__type": "CUSTOM"
},
{
"uid": "attr_02",
"key": "user_type",
"__type": "CUSTOM"
}
]
Response Example (Audiences):
[
{
"uid": "aud_01",
"name": "US Visitors"
},
{
"uid": "aud_02",
"name": "Returning Customers"
}
]
Response Example (Events):
[
{
"uid": "evt_01",
"key": "cta_click",
"name": "CTA Click"
},
{
"uid": "evt_02",
"key": "form_submit",
"name": "Form Submit"
}
]
Note: These examples do not show the complete API responses. To view detailed response structures, refer to the Personalize Management API documentation.
Ensure that all attribute keys and audience rules exactly match the source project to maintain targeting accuracy.
Note: Recreating an event copies only the event definition, including its metadata such as name, key, description, and type. Historical event data like clicks, impressions, or conversions are not copied. The recreated events receive new UIDs in the destination project, but you can reuse the same event keys to maintain tracking consistency. Preset attributes automatically get populated in a project.
Example (Attributes):
POST /personalize/projects/{destination_project_uid}/attributes
{
"key": "region",
"display_name": "Region",
"__type": "CUSTOM"
}
Example (Audiences):
POST /personalize/projects/{destination_project_uid}/audiences
{
"name": "US Visitors",
"rules": { "region": "United States"
}
}
Example (Events):
POST /personalize/projects/{destination_project_uid}/events
{
"key": "cta_click",
"name": "CTA Click",
"description": "Tracks button click events on the homepage"
}
GET /personalize/projects/{source_project_uid}/experiences
[
{ "uid": "exp_01", "name": "Homepage Banner Test", "type": "AB_TEST" }
]Request Example:
A/B Test Experience
POST /personalize/projects/{destination_project_uid}/experiences
{
"name": "Homepage Banner Test",
"__type": "AB_TEST",
"description": "Cloned from Staging"
}
Segmented Experience
POST /personalize/projects/{destination_project_uid}/experiences
{
"name": "Homepage Banner Test",
"__type": "SEGMENTED",
"description": "Cloned from Staging"
}
Response Example:
{ "uid": "exp_new01", "status": "DRAFT" }Note: These examples do not show the complete API responses. To view detailed response structures, refer to the Personalize Management API Documentation.
Response Example:
{
"data": [
{
"version": 2,
"variants": [
{
"alias": "Banner_A",
"fields": { "title": "Summer Sale" }
},
{
"alias": "Banner_B",
"fields": { "title": "Winter Sale" }
}
]
}
]
}
Capture all variant definitions, audience mappings, and targeting conditions for reuse in the destination experience.
Note:Variant and audience IDs differ between projects. Verify all mappings to prevent broken references.
Request Example:
POST {BASE_URL}/experiences/{experience_uid}/versions
{
"status": "DRAFT",
"variants": [
{
"__type": "ABTestVariant",
"name": "Control",
"shortUid": "0",
"trafficDistribution": 50
},
{
"__type": "ABTestVariant",
"name": "Bold",
"shortUid": "1",
"trafficDistribution": 50
}
]
}Request Example:
PUT {BASE_URL}/experiences/{experience_uid}/versions/{version_uid}
{
"status": "ACTIVE"
}Additional Resource: For more information, refer to Update an Experience Version documentation.