get
https://api.unless.com/api/v1/public/personalizations
Retrieve all personalizations (experiences) for a specific website, including their configuration, targeting rules, variants, and status information.
Overview
The Get Personalizations endpoint retrieves all personalizations (experiences) configured for a specific website. This includes information about targeting rules, variants, component settings, scheduling, and current status.
Endpoint
GET /public/personalizations
Authentication
This endpoint requires authentication via the x-api-key header.
Parameters
| Parameter | Type | Location | Required | Description |
|---|---|---|---|---|
accountId | string | query | Yes | Your account ID. See: Account Settings |
websiteId | string | query | Yes | The website ID to retrieve personalizations for |
x-api-key | string | header | Yes | Your API key. See: Account Settings |
Response
The endpoint returns an array of personalization objects. Each personalization object contains the following fields:
Personalization Object
| Field | Type | Description |
|---|---|---|
accountId | string | null | The account ID that owns this personalization |
assignee | string | null | User assigned to this personalization |
changed | boolean | null | Whether the personalization has been modified |
componentAccountId | string | null | Account ID for component-based personalizations |
componentPackageName | string | null | Package name for component-based personalizations |
componentSettings | string | null | JSON string containing component configuration |
componentType | string | null | Type of component used |
componentVersion | number | null | Version of the component |
createdAt | number | null | Timestamp when personalization was created |
createdDate | number | null | Creation date timestamp |
delayOption | string | null | Delay trigger option (e.g., "seconds", "pageviews") |
delayValue | number | null | Delay value for trigger timing |
diffUrl | string | null | URL for viewing changes diff |
disabled | boolean | null | Whether the personalization is disabled |
endDate | number | null | Timestamp when personalization should stop running |
excludedRule | string | null | Rules for excluding visitors |
exclusive | boolean | null | Whether this personalization is exclusive |
hideOption | string | null | Option for hiding the personalization |
hideValue | number | null | Value for hide timing |
isComponent | boolean | null | Whether this is a component-based personalization |
isHiddenAiComponent | boolean | null | Whether this is a hidden AI component |
javascriptTrigger | string | null | JavaScript trigger code |
javascriptTriggerParsed | string | null | Parsed JavaScript trigger |
longurl | string | null | Extended URL information |
maxValue | number | null | Maximum value for certain triggers |
personalizationTags | string[] | null | Array of tags associated with this personalization |
prio | number | null | Priority level (higher numbers = higher priority) |
recipe | string | null | Personalization recipe/template |
redirectUrl | string | null | URL for redirect-type personalizations |
rule | string | null | Targeting rules in JSON format |
startDate | number | null | Timestamp when personalization should start running |
state | string | null | Current state (e.g., "running", "paused", "draft") |
targetTemplateDomain | string | null | Target domain for template |
targetTemplatePath | string | null | Target path for template |
testMode | string | null | Test mode configuration |
updatedDate | number | null | Timestamp of last update |
variants | Variant[] | null | Array of personalization variants |
variationId | string | null | ID of the variation |
variationName | string | null | Name of the variation |
webPagePath | string | null | Web page path where personalization applies |
websiteId | string | null | Website ID this personalization belongs to |
Example Request
curl --location 'https://rest-endpoint.unless.com/api/v1/public/personalizations?accountId=your-account-id&websiteId=your-website-id' \
--header 'x-api-key: your-api-key'Example Response
[
{
"accountId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"websiteId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"variationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"variationName": "Homepage Hero Optimization",
"state": "running",
"disabled": false,
"prio": 100,
"rule": "{\"and\":[{\"field\":\"url\",\"operator\":\"equals\",\"value\":\"/\"}]}",
"startDate": 1640995200000,
"endDate": null,
"createdAt": 1640995200000,
"updatedDate": 1641081600000,
"webPagePath": "/",
"personalizationTags": ["homepage", "hero", "conversion"],
"testMode": "live",
"exclusive": false,
"isComponent": false,
"variants": [
{
"id": "control",
"name": "Control",
"weight": 50
},
{
"id": "variation-1",
"name": "New Hero Design",
"weight": 50
}
]
}
]Response Status Codes
| Code | Description |
|---|---|
200 | Successful response with array of personalizations |
400 | Bad request - invalid parameters |
401 | Unauthorized - invalid API key |
403 | Forbidden - insufficient permissions |
404 | Not found - invalid account or website ID |
Use Cases
- Dashboard Overview: Retrieve all personalizations for management interface
- Performance Monitoring: Get current state and configuration of all experiences
- Bulk Operations: Fetch personalizations for batch updates or analysis
- Integration: Sync personalization data with external systems
- Reporting: Generate reports on personalization coverage and status
Notes
- All timestamp fields are in Unix timestamp format (milliseconds)
- Rules are stored as JSON strings and need to be parsed
- Priority (
prio) determines execution order when multiple personalizations could apply - Component-based personalizations have additional fields for component configuration
- The
variantsarray contains the different variations being tested