{"openapi":"3.0.0","paths":{"/attributes":{"post":{"description":"The `Create an Attribute` request lets you create a new attribute in a project.\n\nTo configure the permissions for your application via OAuth, include the `personalize:manage` scope.","operationId":"AttributeController_create","parameters":[{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"Attribute","$ref":"#/components/schemas/Attribute"}}}},"responses":{"201":{"description":"The attribute was created successfully","content":{"application/json":{"example":{"name":"Age","key":"age","description":"Age of the visitor","project":"64c7787b333555469a861224","createdBy":"bxxxxxxxxxxxx3","updatedBy":"bxxxxxxxxxxxx6","createdAt":"2024-03-13T15:39:51.645Z","updatedAt":"2024-03-13T15:39:51.645Z","uid":"6xxxxxxxxxx2","createdByUserName":"Jane Doe","updatedByUserName":"Jane Doe","__type":"CUSTOM"}}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"errors":{"key":[{"code":"personalization.ATTRIBUTES.DUPLICATE_KEY"}]},"message":"Bad request"}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Create an Attribute","tags":["Attributes"]},"get":{"description":"The `Get all Attributes` request fetches the list of all the attributes in a project.\n\nTo configure the permissions for your application via OAuth, include the `personalize:read` or `personalize:manage` scope.","operationId":"AttributeController_find","parameters":[{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The attributes were returned successfully","content":{"application/json":{"example":[{"name":"Age","key":"age","description":"Age of the visitor","project":"64c7787b333555469a861224","createdBy":"bxxxxxxxxxxxx3","updatedBy":"bxxxxxxxxxxxx6","createdAt":"2024-03-13T15:39:51.645Z","updatedAt":"2024-03-13T15:39:51.645Z","uid":"6xxxxxxxxxx2","createdByUserName":"Jane Doe","updatedByUserName":"Jane Doe","__type":"CUSTOM"}]}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Get all Attributes","tags":["Attributes"]}},"/attributes/{uid}":{"put":{"description":"The `Update an Attribute` request lets you update an existing attribute in a project.\n\nTo configure the permissions for your application via OAuth, include the `personalize:manage` scope.","operationId":"AttributeController_update","parameters":[{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}},{"name":"uid","required":true,"in":"path","description":"Enter the Attribute UID to be updated.","schema":{"example":"6xxxxxxxxxx2","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attribute"},"examples":{"Update Attribute":{"value":{"name":"Visitor Age","key":"age","description":"Age of the visitor from profile"}}}}}},"responses":{"200":{"description":"The attribute was updated successfully","content":{"application/json":{"example":{"name":"Visitor Age","key":"age","description":"Age of the visitor from profile","project":"64c7787b333555469a861224","createdBy":"bxxxxxxxxxxxx3","updatedBy":"bxxxxxxxxxxxx6","createdAt":"2024-03-13T15:39:51.645Z","updatedAt":"2024-03-13T15:40:00.000Z","uid":"6xxxxxxxxxx2","createdByUserName":"Jane Doe","updatedByUserName":"Jane Doe","__type":"CUSTOM"}}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"message":"94344555333555466666bbb700 is not a valid ObjectId","error":"Bad Request","statusCode":400}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}},"404":{"description":"Attribute not found","content":{"application/json":{"example":{"message":"personalization.ATTRIBUTES.NOT_FOUND"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Update an Attribute","tags":["Attributes"]},"delete":{"description":"The `Delete an Attribute` request lets you delete an existing attribute in a project.\n\nTo configure the permissions for your application via OAuth, include the `personalize:manage` scope.","operationId":"AttributeController_deleteAttribute","parameters":[{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}},{"name":"uid","required":true,"in":"path","description":"Enter the Attribute UID to be deleted.","schema":{"example":"6xxxxxxxxxx2","type":"string"}}],"responses":{"204":{"description":"The attributes were deleted successfully"},"400":{"description":"Bad request","content":{"application/json":{"example":{"message":"94344555333555466666bbb700 is not a valid ObjectId","error":"Bad Request","statusCode":400}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}},"404":{"description":"Attribute not found","content":{"application/json":{"example":{"message":"personalization.ATTRIBUTES.NOT_FOUND"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Delete an Attribute","tags":["Attributes"]}},"/audiences":{"post":{"description":"The `Create an Audience` request lets you create a new audience in a project.\n\nTo configure the permissions for your application via OAuth, include the `personalize:manage` scope.\n\nThe examples below provide a detailed explanation on creating audiences with various parameters.","operationId":"AudienceController_create","parameters":[{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"Audience","$ref":"#/components/schemas/Audience"},"examples":{"presetAttributes":{"summary":"Create audience with Preset Attributes","description":"In this example, we create an audience with a Geolocation Preset Attribute. The `definition` of an audience consists of a list of rules. Each rule has a reference to an attribute, an `attributeMatchCondition` and `attributeMatchOptions`.","value":{"name":"US Visitors","description":"Website visitors from the US","definition":{"__type":"RuleCombination","combinationType":"AND","rules":[{"__type":"Rule","attribute":{"__type":"PresetAttributeReference","ref":"COUNTRY"},"attributeMatchCondition":"STRING_EQUALS","attributeMatchOptions":{"__type":"StringMatchOptions","value":"US"},"invertCondition":false}]}}},"customAttributes":{"summary":"Create audience with Custom Attributes","description":"This example creates an audience with Custom Attributes. We have two rules being matched here, the second one matching a custom attribute. The `__type` on the `attribute` allows you to specify whether the attribute is Custom or Preset.","value":{"name":"Valuable US Visitors","description":"US Visitors with an average order value greater than $1000","definition":{"__type":"RuleCombination","combinationType":"AND","rules":[{"__type":"Rule","attribute":{"__type":"PresetAttributeReference","ref":"COUNTRY"},"attributeMatchCondition":"STRING_EQUALS","attributeMatchOptions":{"__type":"StringMatchOptions","value":"US"},"invertCondition":false},{"__type":"Rule","attribute":{"__type":"CustomAttributeReference","ref":"66702e03d84509d0106bec05"},"attributeMatchOptions":{"__type":"NumberMatchOptions","value":1000},"attributeMatchCondition":"NUMBER_GREATER_THAN","invertCondition":false}]}}},"queryParameterAttribute":{"summary":"Match Query Parameters","description":"Query Parameters are a Preset Attribute. In this example, the query parameter `utm_campaign` is matched for a `BLACK_FRIDAY` value. The `JSONMatchOptions` type allow you to nest a `matchOptions` so that you can match specific values for the parameter.","value":{"name":"Black Friday Campaign","description":"Visitors targeted with the Black Friday Campaign","definition":{"__type":"RuleCombination","combinationType":"AND","rules":[{"__type":"Rule","attribute":{"__type":"PresetAttributeReference","ref":"QUERY_PARAMETERS"},"attributeMatchCondition":"JSON_MATCH","attributeMatchOptions":{"__type":"JSONMatchOptions","pointer":"/utm_campaign","matchCondition":"STRING_EQUALS","matchOptions":{"__type":"StringMatchOptions","value":"BLACK_FRIDAY"},"invertCondition":false},"invertCondition":false}]}}},"dateTimeAttribute":{"summary":"Match Date and Time","description":"Date and Time is a Preset Attribute. In this example, we extend the Black Friday Campaign audience to also match only on the day of Black Friday. `useVisitorTimezone` allows us to evaluate the conditions in the visitors timezone.","value":{"name":"Black Friday Campaign","description":"Visitors targeted with the Black Friday Campaign","definition":{"__type":"RuleCombination","combinationType":"AND","rules":[{"__type":"Rule","attribute":{"__type":"PresetAttributeReference","ref":"QUERY_PARAMETERS"},"attributeMatchOptions":{"__type":"JSONMatchOptions","pointer":"/utm_campaign","matchCondition":"STRING_EQUALS","matchOptions":{"__type":"StringMatchOptions","value":"BLACK_FRIDAY"},"invertCondition":false},"attributeMatchCondition":"JSON_MATCH","invertCondition":false},{"__type":"Rule","attribute":{"__type":"PresetAttributeReference","ref":"DATE_AND_TIME"},"attributeMatchCondition":"BETWEEN_TIME","attributeMatchOptions":{"__type":"DateTimeMatchOptions","startTime":"2024-11-29T00:00:00","endTime":"2024-11-29T23:59:59","useVisitorTimezone":true},"invertCondition":false}]}}}}}}},"responses":{"201":{"description":"The audience was created successfully","content":{"application/json":{"example":{"name":"US Visitors","description":"Website visitors from the US","definition":{"__type":"RuleCombination","combinationType":"AND","rules":[{"__type":"Rule","attribute":{"__type":"PresetAttributeReference","ref":"COUNTRY"},"attributeMatchOptions":{"__type":"StringMatchOptions","value":"US"},"attributeMatchCondition":"STRING_EQUALS","invertCondition":false}]},"project":"6c7787b333555469a8612227","referredAttributes":[],"createdBy":"bxxxxxxxxxxxxxxxxx7","updatedBy":"bxxxxxxxxxxxxxxxxx7","createdAt":"2024-08-22T09:46:11.680Z","updatedAt":"2024-08-22T09:46:11.680Z","uid":"66c708e3fe314f5067826852","createdByUserName":"Jane Doe","updatedByUserName":"Jane Doe"}}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"errors":{"name":[{"code":"personalization.AUDIENCES.DUPLICATE_NAME"}]},"message":"Bad request"}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Create an Audience","tags":["Audiences"]},"get":{"description":"The `Get all Audiences` request fetches the list of all the audiences in a project.\n\nTo configure the permissions for your application via OAuth, include the `personalize:read` or `personalize:manage` scope.","operationId":"AudienceController_get","parameters":[{"name":"referredAttributes[]","required":false,"in":"query","description":"Filter audiences by passing a list of attribute UIDs. The audiences referring to the given attributes will be returned.","schema":{"example":"GET /audiences?referredAttributes[]=6xxxxxxxxxx2&referredAttributes[]=4xxxxxxxxxx3","type":"array","items":{"type":"string"}}},{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The audiences were returned successfully","content":{"application/json":{"example":[{"name":"Indian","description":"","definition":{"__type":"RuleCombination","combinationType":"AND","rules":[{"__type":"Rule","attribute":{"__type":"PresetAttributeReference","ref":"COUNTRY"},"attributeMatchOptions":{"__type":"StringMatchOptions","value":"IN"},"attributeMatchCondition":"STRING_EQUALS","invertCondition":false},{"__type":"Rule","attribute":{"__type":"PresetAttributeReference","ref":"DATE_AND_TIME"},"attributeMatchOptions":{"__type":"DateTimeMatchOptions","value":"2023-09-28T18:40:10+00:00","useVisitorTimezone":false},"attributeMatchCondition":"BEFORE_TIME","invertCondition":false},{"__type":"Rule","attribute":{"__type":"CustomAttributeReference","ref":"6c7787b333555469a861222e"},"attributeMatchOptions":{"__type":"NumberMatchOptions","value":25},"attributeMatchCondition":"NUMBER_EQUAL_TO","invertCondition":false},{"__type":"Rule","attribute":{"__type":"PresetAttributeReference","ref":"DEVICE_TYPE"},"attributeMatchOptions":{"__type":"StringMatchOptions","value":"MOBILE"},"attributeMatchCondition":"STRING_EQUALS","invertCondition":false},{"__type":"RuleCombination","combinationType":"AND","rules":[{"__type":"Rule","attribute":{"__type":"PresetAttributeReference","ref":"DEVICE_TYPE"},"attributeMatchOptions":{"__type":"StringMatchOptions","value":"MOBILE"},"attributeMatchCondition":"STRING_EQUALS","invertCondition":false}]}]},"project":"6c7787b333555469a8612227","referredAttributes":["6c7787b333555469a861222e"],"createdBy":"bxxxxxxxxxxxx3","updatedBy":"bxxxxxxxxxxxx6","createdAt":"2024-03-13T15:39:51.645Z","updatedAt":"2024-03-13T15:39:51.645Z","uid":"6c7787b333555469a8612229","createdByUserName":"Jane Doe","updatedByUserName":"Jane Doe"}]}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"message":"94344555333555466666bbb700 is not a valid ObjectId","error":"Bad Request","statusCode":400}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Get all Audiences","tags":["Audiences"]}},"/audiences/{uid}":{"put":{"description":"The `Update an Audience` request lets you update an existing audience in a project.\n\nTo configure the permissions for your application via OAuth, include the personalize:manage scope.\n\nFor more detailed request body documentation, please refer to the `Create an Audience` request.","operationId":"AudienceController_update","parameters":[{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}},{"name":"uid","required":true,"in":"path","description":"Enter the Audience UID to be updated.","schema":{"example":"6xxxxxxxxxx2","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Audience"}}}},"responses":{"200":{"description":"The audience was updated successfully","content":{"application/json":{"example":{"name":"US Visitors","description":"Visitors from the US","definition":{"__type":"RuleCombination","combinationType":"AND","rules":[{"__type":"Rule","attribute":{"__type":"PresetAttributeReference","ref":"COUNTRY"},"attributeMatchOptions":{"__type":"StringMatchOptions","value":"US"},"attributeMatchCondition":"STRING_EQUALS","invertCondition":false}]},"project":"6c7787b333555469a8612227","referredAttributes":[],"createdBy":"bxxxxxxxxxxxxxxxxx7","updatedBy":"bxxxxxxxxxxxxxxxxx7","createdAt":"2024-08-22T09:46:11.680Z","updatedAt":"2024-08-22T11:43:35.232Z","uid":"66c708e3fe314f5067826852","createdByUserName":"Jane Doe","updatedByUserName":"Jane Doe"}}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"errors":{"name":[{"code":"personalization.AUDIENCES.DUPLICATE_NAME"}]},"message":"Bad request"}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}},"404":{"description":"Audience not found","content":{"application/json":{"example":{"message":"personalization.AUDIENCES.NOT_FOUND"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Update an audience","tags":["Audiences"]},"delete":{"description":"The `Delete an Audience` request lets you delete an existing audience in a project.\n\nTo configure the permissions for your application via OAuth, include the `personalize:manage` scope.","operationId":"AudienceController_deleteAudience","parameters":[{"name":"uid","required":true,"in":"path","description":"Enter the Audience UID to be deleted.","schema":{"example":"6xxxxxxxxxx2","type":"string"}},{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The audience was deleted successfully"},"400":{"description":"Bad request","content":{"application/json":{"example":{"message":"94344555333555466666bbb700 is not a valid ObjectId","error":"Bad Request","statusCode":400}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}},"404":{"description":"Audience not found","content":{"application/json":{"example":{"message":"personalization.AUDIENCES.NOT_FOUND"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Delete an audience","tags":["Audiences"]}},"/experiences":{"post":{"description":"The `Create an Experience` request lets you create a new experience in a project. An experience can be either of `SEGMENTED` or `AB_TEST` type. Creating an experience also creates an empty draft version for the configuration.\n\nTo configure the permissions for your application via OAuth, include the `personalize:manage` scope.","operationId":"ExperienceController_create","parameters":[{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"Experience","$ref":"#/components/schemas/Experience"},"examples":{"abTesting":{"summary":"Create an A/B Test","description":"In this example, we create an A/B Test experience. The `__type` field is used to set the type of the experience. Note that the experience in the response has a `latestVersion` field pointing to the draft version created along with the experience.","value":{"name":"CTA color test","description":"Test if using a warmer color on the CTA improves conversions","__type":"AB_TEST"}},"segmented":{"summary":"Create a Segmented Experience","description":"In this example, we create a Segmented Experience. The `__type` field is used to set the type of the experience. Note that the experience in the response has a `latestVersion` field pointing to the draft version configuration created along with the experience.","value":{"name":"Australian Users Experience","description":"This is the experience for Australian users.","__type":"SEGMENTED"}}}}}},"responses":{"201":{"description":"The experience was created successfully","content":{"application/json":{"example":{"shortUid":"1","name":"CTA color test","description":"Test if using a warmer color on the CTA improves conversions","__type":"AB_TEST","project":"6887777b3335554698867847","status":"DRAFT","createdBy":"bxxxxxxxxxxxx3","updatedBy":"bxxxxxxxxxxxx6","referredAudiences":[],"referredEvents":[],"createdAt":"2024-03-13T15:39:51.645Z","updatedAt":"2024-03-13T15:39:51.645Z","uid":"6887777xxxxxxxxx98867841","hasDraft":true,"latestVersion":"66d5ad0000000001412ae841","createdByUserName":"Jane Doe","updatedByUserName":"Jane Doe"}}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"errors":{"__type":[{"code":"personalization.EXPERIENCES.INVALID_EXPERIENCE_TYPE"}]},"message":"Bad request"}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Create an Experience","tags":["Experiences"]},"get":{"description":"The `Get all Experiences` request fetches the list of all the experiences in a project.\n\nTo configure the permissions for your application via OAuth, include the `personalize:read` or `personalize:manage` scope.","operationId":"ExperienceController_find","parameters":[{"name":"referredEvents[]","required":false,"in":"query","description":"Filter experiences by passing a list of event UIDs. The experiences referring to the given events as metrics will be returned.","schema":{"example":"GET /experiences?referredEvents[]=6xxxxxxxxxx2&referredEvents[]=4xxxxxxxxxx3","type":"array","items":{"type":"string"}}},{"name":"referredAudiences[]","required":false,"in":"query","description":"Filter experiences by passing a list of audience UIDs. The experiences referring to the given audiences in its variants (for segmented experiences) or targeting criteria (for A/B test experiences) will be returned.","schema":{"example":"GET /experiences?referredAudiences[]=6xxxxxxxxxx2&referredAudiences[]=4xxxxxxxxxx3","type":"array","items":{"type":"string"}}},{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The experiences were returned successfully","content":{"application/json":{"example":[{"shortUid":"1","name":"CTA color","description":"Use a warmer color on the CTA to improve conversion","__type":"AB_TEST","project":"6887777b3335554698867847","status":"DRAFT","createdBy":"bxxxxxxxxxxxx3","updatedBy":"bxxxxxxxxxxxx6","referredAudiences":[],"referredEvents":[],"createdAt":"2024-03-13T15:39:51.645Z","updatedAt":"2024-03-14T17:00:00.000Z","uid":"6887777xxxxxxxxx98867841","hasDraft":true,"latestVersion":"66d5ad0000000001412ae841","createdByUserName":"Jane Doe","updatedByUserName":"Jane Doe"}]}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Get all Experiences","tags":["Experiences"]}},"/experiences/{uid}":{"put":{"description":"The `Update an Experience` request lets you update an existing experience in a project. Note that once an experience of a particular type has been created, the type cannot be changed with this request.\n\nTo configure the permissions for your application via OAuth, include the `personalize:manage` scope.","operationId":"ExperienceController_update","parameters":[{"name":"uid","required":true,"in":"path","description":"Enter the Experience UID to be updated.","schema":{"example":"6xxxxxxxxxx2","type":"string"}},{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"Experience","$ref":"#/components/schemas/Experience"},"examples":{"abTesting":{"value":{"name":"CTA color","description":"Use a warmer color on the CTA to improve conversion","__type":"AB_TEST"}}}}}},"responses":{"200":{"description":"The experience was updated successfully","content":{"application/json":{"example":{"shortUid":"1","name":"CTA color","description":"Use a warmer color on the CTA to improve conversion","__type":"AB_TEST","project":"6887777b3335554698867847","status":"DRAFT","createdBy":"bxxxxxxxxxxxx3","updatedBy":"bxxxxxxxxxxxx6","referredAudiences":[],"referredEvents":[],"createdAt":"2024-03-13T15:39:51.645Z","updatedAt":"2024-03-14T17:00:00.000Z","uid":"6887777xxxxxxxxx98867841","hasDraft":true,"latestVersion":"66d5ad0000000001412ae841","createdByUserName":"Jane Doe","updatedByUserName":"Jane Doe"}}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"errors":{"__type":[{"code":"personalization.EXPERIENCES.INVALID_EXPERIENCE_TYPE"}]},"message":"Bad request"}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}},"404":{"description":"Experience not found","content":{"application/json":{"example":{"message":"personalization.EXPERIENCES.NOT_FOUND"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Update an Experience","tags":["Experiences"]},"get":{"description":"The `Get a Single Experience` request fetches a specific experience created in your project.\n\nTo configure the permissions for your application via OAuth, include the `personalize:read` scope.","operationId":"ExperienceController_findOne","parameters":[{"name":"uid","required":true,"in":"path","description":"Enter the Experience UID to be retrieved","schema":{"example":"6xxxxxxxxxx2","type":"string"}},{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The experience was returned successfully","content":{"application/json":{"example":{"shortUid":"1","name":"CTA color","description":"Use a warmer color on the CTA to improve conversion","__type":"AB_TEST","project":"6887777b3335554698867847","status":"DRAFT","createdBy":"bxxxxxxxxxxxx3","updatedBy":"bxxxxxxxxxxxx6","referredAudiences":[],"referredEvents":[],"createdAt":"2024-03-13T15:39:51.645Z","updatedAt":"2024-03-14T17:00:00.000Z","uid":"6887777xxxxxxxxx98867841","hasDraft":true,"latestVersion":"66d5ad0000000001412ae841","createdByUserName":"Jane Doe","updatedByUserName":"Jane Doe"}}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"message":"94344555333555466666bbb700 is not a valid ObjectId","error":"Bad Request","statusCode":400}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}},"404":{"description":"Experience not found","content":{"application/json":{"example":{"message":"personalization.EXPERIENCES.NOT_FOUND"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Get a Single Experience","tags":["Experiences"]},"delete":{"description":"The `Delete an Experience` request lets you delete an existing experience in a project.\n\nTo configure the permissions for your application via OAuth, include the `personalize:manage` scope.","operationId":"ExperienceController_delete","parameters":[{"name":"uid","required":true,"in":"path","description":"Enter the Experience UID to be deleted","schema":{"example":"6xxxxxxxxxx2","type":"string"}},{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The experience was deleted successfully"},"400":{"description":"Bad request","content":{"application/json":{"example":{"message":"94344555333555466666bbb700 is not a valid ObjectId","error":"Bad Request","statusCode":400}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}},"404":{"description":"Experience not found","content":{"application/json":{"example":{"message":"personalization.EXPERIENCES.NOT_FOUND"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Delete an Experience","tags":["Experiences"]}},"/events":{"post":{"description":"The `Create an Event` request lets you create a new event in a project.\n\nThe `key` field is used to uniquely identify the event. You'll use it when triggering an event from the API or SDK.\n\nTo configure the permissions for your application via OAuth, include the `personalize:manage` scope.","operationId":"EventController_create","parameters":[{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"201":{"description":"The event was created successfully","content":{"application/json":{"example":{"key":"ctaClick","description":"Click on the website CTA","project":"64c7787b333555469a861223","createdBy":"bxxxxxxxxxxxx3","updatedBy":"bxxxxxxxxxxxx6","createdAt":"2024-03-13T15:39:51.645Z","updatedAt":"2024-03-13T15:39:51.645Z","uid":"65f7caf2602dc4333ec201be","createdByUserName":"Jane Doe","updatedByUserName":"Jane Doe"}}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"errors":{"key":[{"code":"personalization.EVENTS.DUPLICATE_KEY"}]},"message":"Bad request"}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Create an Event","tags":["Events"]},"get":{"description":"The `Get all Events` request fetches the list of all the events in a project.\n\nTo configure the permissions for your application via OAuth, include the `personalize:read` or `personalize:manage` scope.","operationId":"EventController_find","parameters":[{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The events were returned successfully","content":{"application/json":{"example":[{"key":"ctaClick","description":"Click on the website CTA","project":"64c7787b333555469a861227","createdBy":"bxxxxxxxxxxxx3","updatedBy":"bxxxxxxxxxxxx6","createdAt":"2024-03-13T15:39:51.645Z","updatedAt":"2024-03-13T15:39:51.645Z","uid":"64c78966ca0d5bf5f7bcc5f5","createdByUserName":"Jane Doe","updatedByUserName":"Jane Doe"}]}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Get all Events","tags":["Events"]}},"/events/{uid}":{"put":{"description":"The `Update an Event` request lets you update an existing event in a project.\n\nThe `key` field is used to uniquely identify the event. You'll use it when triggering an event from the API or SDK.\n\nTo configure the permissions for your application via OAuth, include the `personalize:manage` scope.","operationId":"EventController_update","parameters":[{"name":"uid","required":true,"in":"path","description":"Enter the Event UID to be updated.","schema":{"example":"6xxxxxxxxxx2","type":"string"}},{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"The event was updated successfully","content":{"application/json":{"example":{"key":"click","description":"Event description","project":"64c7787b333555469a861223","createdBy":"bxxxxxxxxxxxx3","updatedBy":"bxxxxxxxxxxxx6","createdAt":"2024-03-13T15:39:51.645Z","updatedAt":"2024-03-13T15:39:51.645Z","uid":"65f7caf2602dc4333ec201be","createdByUserName":"Jane Doe","updatedByUserName":"Jane Doe"}}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"errors":{"key":[{"code":"personalization.EVENTS.DUPLICATE_KEY"}]},"message":"Bad request"}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}},"404":{"description":"Event not found","content":{"application/json":{"example":{"message":"personalization.EVENTS.NOT_FOUND"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Update an Event","tags":["Events"]},"delete":{"description":"The `Delete an Event` request lets you delete an existing event in a project.\n\nTo configure the permissions for your application via OAuth, include the `personalize:manage` scope.","operationId":"EventController_deleteEvent","parameters":[{"name":"uid","required":true,"in":"path","description":"Enter the Event UID to be deleted.","schema":{"example":"6xxxxxxxxxx2","type":"string"}},{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The event was deleted successfully"},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}},"404":{"description":"Event not found","content":{"application/json":{"example":{"message":"personalization.EVENTS.NOT_FOUND"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Delete an Event","tags":["Events"]}},"/experiences/{uid}/versions":{"post":{"description":"The `Create an Experience Version` request lets you create a new version of an experience in a project.\n\nCreating a new version allows you to modify the configuration of an existing active version. A version can be created with a `DRAFT` or `ACTIVE` status. A new version cannot be created if a `DRAFT` version already exists, in which case you can only modify the existing `DRAFT` version.\n\nTo configure the permissions for your application via OAuth, include the `personalize:manage` scope.","operationId":"ExperienceVersionController_createVersion","parameters":[{"name":"uid","required":true,"in":"path","description":"Enter the Experience UID to version","schema":{"example":"6xxxxxxxxxx2","type":"string"}},{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"Experience Version","$ref":"#/components/schemas/ExperienceVersion"},"examples":{"abTest":{"summary":"Create an A/B test version","description":"Here, we create a `DRAFT` version of an existing active experience. In the draft, we add a new variant `Red` and also update where the A/B test is being targeted. Notice how we use the same short UIDs from the existing version while leaving out the short UID field for the new variant, which allows the server to create and assign a new short UID for the variant.","value":{"status":"DRAFT","variants":[{"__type":"ABTestVariant","name":"Control","shortUid":"0","trafficDistribution":33.33},{"__type":"ABTestVariant","name":"Purple","shortUid":"1","trafficDistribution":33.33},{"__type":"ABTestVariant","name":"Red","trafficDistribution":33.33}],"variantSplit":"EQUALLY_SPLIT","metrics":[{"__type":"Primary","event":"244444400000000087654321","name":"Click on CTA"}],"targeting":{"audience":{"audiences":["155555500000000012345678"],"audienceCombinationType":"AND"}}}},"segmented":{"summary":"Create a Segmented Experience version","description":"In this example, we create a new `DRAFT` version of our segmented experience. We want to target the entire Australian continent instead of just the country, and accordingly, we also target one more audience in the variant and change the `audienceCombinationType`. The short UID refers to the existing variant's short UID so that we can update it.","value":{"status":"DRAFT","variants":[{"__type":"SegmentedVariant","name":"Australian Continent Visitors","shortUid":"0","audiences":["388888800000000087654321","399999900000000044444444"],"audienceCombinationType":"OR"}]}},"active":{"summary":"Create an active version","description":"The example here is the same A/B test, however, instead of creating a `DRAFT` version, we're activating the version instantly. The changes in the version are instantly reflected and the existing version is `ARCHIVED`.","value":{"status":"ACTIVE","variants":[{"__type":"ABTestVariant","name":"Control","shortUid":"0","trafficDistribution":33.33},{"__type":"ABTestVariant","name":"Purple","shortUid":"1","trafficDistribution":33.33},{"__type":"ABTestVariant","name":"Red","trafficDistribution":33.33}],"variantSplit":"EQUALLY_SPLIT","metrics":[{"__type":"Primary","event":"244444400000000087654321","name":"Click on CTA"}],"targeting":{"audience":{"audiences":["155555500000000012345678"],"audienceCombinationType":"AND"}}}}}}}},"responses":{"200":{"description":"The version was created successfully","content":{"application/json":{"example":{"uid":"9888888xxxxxxxxx89102123","experienceUid":"688777700000000098867841","__type":"AB_TEST","variants":[{"__type":"ABTestVariant","name":"Control","shortUid":"0","trafficDistribution":33.33},{"__type":"ABTestVariant","name":"Purple","shortUid":"1","trafficDistribution":33.33},{"__type":"ABTestVariant","name":"Red","trafficDistribution":33.33,"shortUid":"2"}],"variantSplit":"EQUALLY_SPLIT","metrics":[{"__type":"Primary","event":"244444400000000087654321","name":"Click on CTA"}],"targeting":{"audience":{"audiences":["155555500000000012345678"],"audienceCombinationType":"AND"}},"status":"DRAFT","createdAt":"2024-03-15T15:39:51.645Z","updatedAt":"2024-03-15T15:39:51.645Z","createdBy":"bxxxxxxxxxxxx3","updatedBy":"bxxxxxxxxxxxx3","createdByUserName":"Jane Doe","updatedByUserName":"Jane Doe"}}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"errors":{"__type":[{"variants":"personalization.VARIATION.INVALID_PERCENTAGE_SUM"}]},"message":"Bad request"}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}},"404":{"description":"Experience not found","content":{"application/json":{"example":{"message":"personalization.EXPERIENCES.NOT_FOUND"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Create an Experience Version","tags":["Experiences"]},"get":{"description":"The `Get all Experience Versions` request fetches the list of all the versions for a given Experience.\n\nThe list of versions is sorted by the `createdAt` date.\n\nTo configure the permissions for your application via OAuth, include the `personalize:read` or `personalize:manage` scope.","operationId":"ExperienceVersionController_get","parameters":[{"name":"uid","required":true,"in":"path","description":"Enter the Experience UID to version","schema":{"example":"6xxxxxxxxxx2","type":"string"}},{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The versions were returned successfully","content":{"application/json":{"example":[{"uid":"9888888xxxxxxxxx89102123","experienceUid":"688777700000000098867841","__type":"AB_TEST","variants":[{"__type":"ABTestVariant","name":"Control","shortUid":"0","trafficDistribution":33.33},{"__type":"ABTestVariant","name":"Purple","shortUid":"1","trafficDistribution":33.33},{"__type":"ABTestVariant","name":"Red","trafficDistribution":33.33,"shortUid":"2"}],"variantSplit":"EQUALLY_SPLIT","metrics":[{"__type":"Primary","event":"244444400000000087654321","name":"Click on CTA"}],"targeting":{"audience":{"audiences":["155555500000000012345678"],"audienceCombinationType":"AND"}},"status":"DRAFT","createdAt":"2024-03-15T15:39:51.645Z","updatedAt":"2024-03-15T15:39:51.645Z","createdBy":"bxxxxxxxxxxxx3","updatedBy":"bxxxxxxxxxxxx3","createdByUserName":"Jane Doe","updatedByUserName":"Jane Doe"}]}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}},"404":{"description":"Experience not found","content":{"application/json":{"example":{"message":"personalization.EXPERIENCES.NOT_FOUND"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Get all Experience Versions","tags":["Experiences"]}},"/experiences/{uid}/versions/{versionUid}":{"put":{"description":"The `Update an Experience Version` request lets you update an existing version of an Experience. After creating an Experience initially, an empty draft version is already created, and you can update it to modify the configuration of the Experience. Once the configuration is ready, you can activate the version by updating the status to `ACTIVE`. Any existing active version's status will change to `ARCHIVED`. You can also `PAUSE` an active version with this request.\n\nTo configure the permissions for your application via OAuth, include the `personalize:manage` scope.","operationId":"ExperienceVersionController_update","parameters":[{"name":"versionUid","required":true,"in":"path","description":"Enter the Experience Version UID","schema":{"example":"6xxxxxxxxxx2","type":"string"}},{"name":"uid","required":true,"in":"path","description":"Enter the Experience UID to version","schema":{"example":"6xxxxxxxxxx2","type":"string"}},{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"Experience Version","$ref":"#/components/schemas/ExperienceVersion"},"examples":{"abTest":{"summary":"Update an A/B test version","description":"Here, we update the configuration for the A/B test created previously. Two variants, `Control` and `Purple` are added with equally split traffic distribution. We also add a primary metric for measuring the performance of these variants. Notice that the `shortUid` is skipped for these new variants as they will be generated on the server side.","value":{"status":"DRAFT","variants":[{"__type":"ABTestVariant","name":"Control","trafficDistribution":50},{"__type":"ABTestVariant","name":"Purple","trafficDistribution":50}],"variantSplit":"EQUALLY_SPLIT","metrics":[{"__type":"Primary","event":"244444400000000087654321","name":"Click on CTA"}]}},"segmented":{"summary":"Update a Segmented Experience version","description":"In this example, we update the configuration for the Segmented Experience created previously. We're creating a variant for the visitors from Australia, with the variant targeted to the Australian audience. Notice that the `shortUid` is skipped for the new variant as it will be generated on the server side.","value":{"status":"DRAFT","variants":[{"__type":"SegmentedVariant","name":"Australian Visitors","audiences":["388888800000000087654321"],"audienceCombinationType":"AND"}]}},"activate":{"summary":"Activate a version","description":"Activating a version is done by updating the status to `ACTIVE`. Any existing active version will be `ARCHIVED` following the activation of a new version.","value":{"status":"ACTIVE","variants":[{"__type":"ABTestVariant","name":"Control","trafficDistribution":50},{"__type":"ABTestVariant","name":"Purple","trafficDistribution":50}],"variantSplit":"EQUALLY_SPLIT","metrics":[{"__type":"Primary","event":"244444400000000087654321","name":"Click on CTA"}]}},"pause":{"summary":"Pause a version","description":"Pausing a version is achieved by updating the status to `PAUSED`. Once paused, the experience does not match any variants and will return `null` in the Manifest API. You can also re-activate the version again by updating it with the `ACTIVE` status.","value":{"status":"PAUSED","variants":[{"__type":"ABTestVariant","name":"Control","trafficDistribution":50},{"__type":"ABTestVariant","name":"Purple","trafficDistribution":50}],"variantSplit":"EQUALLY_SPLIT","metrics":[{"__type":"Primary","event":"244444400000000087654321","name":"Click on CTA"}]}}}}}},"responses":{"200":{"description":"The version was updated successfully","content":{"application/json":{"example":{"uid":"9888888xxxxxxxxx89102123","experienceUid":"688777700000000098867841","__type":"AB_TEST","variants":[{"__type":"ABTestVariant","name":"Control","trafficDistribution":50,"shortUid":"0"},{"__type":"ABTestVariant","name":"Purple","trafficDistribution":50,"shortUid":"1"}],"variantSplit":"EQUALLY_SPLIT","metrics":[{"__type":"Primary","event":"244444400000000087654321","name":"Click on CTA"}],"status":"DRAFT","createdAt":"2024-03-13T15:39:51.645Z","updatedAt":"2024-03-14T15:39:51.645Z","createdBy":"bxxxxxxxxxxxx3","updatedBy":"bxxxxxxxxxxxx3","createdByUserName":"Jane Doe","updatedByUserName":"Jane Doe"}}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"errors":{"__type":[{"variants":"personalization.VARIATION.INVALID_PERCENTAGE_SUM"}]},"message":"Bad request"}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}},"404":{"description":"Experience not found","content":{"application/json":{"example":{"message":"personalization.EXPERIENCES.NOT_FOUND"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Update an Experience Version","tags":["Experiences"]},"delete":{"description":"The `Delete an Experience Version` request lets you discard the draft version of an Experience. Attempting to delete an `ACTIVE`, `PAUSED` or `ARCHIVED` version will return an error.\n\nTo configure the permissions for your application via OAuth, include the `personalize:manage` scope.","operationId":"ExperienceVersionController_delete","parameters":[{"name":"versionUid","required":true,"in":"path","description":"Enter the Experience Version UID","schema":{"example":"6xxxxxxxxxx2","type":"string"}},{"name":"uid","required":true,"in":"path","description":"Enter the Experience UID to version","schema":{"example":"6xxxxxxxxxx2","type":"string"}},{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The Experience Version was deleted successfully"},"400":{"description":"Bad request","content":{"application/json":{"example":{"errors":{"status":[{"code":"personalize.EXPERIENCES.VERSIONS.CANNOT_DELETE_LOCKED_VERSION"}]},"message":"Bad request"}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}},"404":{"description":"Experience not found","content":{"application/json":{"example":{"message":"personalization.EXPERIENCES.NOT_FOUND"}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Delete an Experience Version","tags":["Experiences"]}},"/experiences-priority":{"get":{"description":"The `Get Experiences Priority` request retrieves the experience priority order for a given project. This contains every experience available within the project sorted in decreasing order of priority.\n\nTo configure the permissions for your application via OAuth, include the `personalize:read` or `personalize:manage` scope.","operationId":"ExperiencesPriorityController_getExperiencesPriority","parameters":[{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The experiences priority was returned successfully","content":{"application/json":{"example":{"priorityOrder":["66d5ad0000000001412ae841","66d5ad0000000001412ae842","66d5ad0000000001412ae843"],"project":"6887777b3335554698867847","createdBy":"bxxxxxxxxxxxx3","updatedBy":"bxxxxxxxxxxxx6","createdAt":"2024-03-13T15:39:51.645Z","updatedAt":"2024-03-13T15:39:51.645Z","createdByUserName":"Jane Doe","updatedByUserName":"Jane Doe"}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Get Experiences Priority","tags":["Experiences Priority"]},"put":{"description":"The `Update Experiences Priority` request lets you rearrange experiences in the priority order at any given time. For example, if you create a new experience that should have a higher priority than others, the priority order can be updated after creating the new experience.\n\nTo configure the permissions for your application via OAuth, include the `personalize:manage` scope.","operationId":"ExperiencesPriorityController_updateExperiencesPriority","parameters":[{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"Experiences Priority","$ref":"#/components/schemas/ExperiencesPriority"},"examples":{"update":{"summary":"Update Experiences Priority","description":"Update the priority order of the experiences in a project. The priority order is used to determine the order in which the experiences are displayed for a visitor. The experience with the highest priority is prioritized.\n\nTo configure the permissions for your application via OAuth, include the `personalize:manage` scope.","value":{"priorityOrder":["66d5ad0000000001412ae841","66d5ad0000000001412ae842","66d5ad0000000001412ae843"]}}}}}},"responses":{"200":{"description":"The experiences priority was updated successfully","content":{"application/json":{"example":{"priorityOrder":["66d5ad0000000001412ae841","66d5ad0000000001412ae842","66d5ad0000000001412ae843"],"project":"6887777b3335554698867847","createdBy":"bxxxxxxxxxxxx3","updatedBy":"bxxxxxxxxxxxx6","createdAt":"2024-03-13T15:39:51.645Z","updatedAt":"2024-03-13T15:39:51.645Z","createdByUserName":"Jane Doe","updatedByUserName":"Jane Doe"}}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"errors":{"priorityOrder":[{"code":"personalize.EXPERIENCES_PRIORITY.MISSING_EXPERIENCES"}]},"message":"Bad request"}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Update Experiences Priority","tags":["Experiences Priority"]}},"/experiences/{uid}/analytics/summary":{"get":{"description":"The `Get Analytics Summary` request fetches the analytics summary of a specific experience of a project. The summary gives you a count of impressions and conversions for a variant, along with its probability to be best in the given timeframe. The leading or winning variant information as determined by the analytics engine is also calculated and returned provided that sufficient data exists.\n\nPlease note that leading variant and conversion information is only available on A/B test experiences.\n\nTo configure the permissions for your application via OAuth, include the `personalize:read` or the `personalize:manage` scope.","operationId":"AnalyticsController_fetchAnalyticsSummary","parameters":[{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"The “to” parameter allows you to specify the end date for the analytics summary of the experiences. The timestamp is provided in the ISO-8601 format. If not specified, analytics leading upto the present date is returned.","schema":{"example":"2024-04-08T05:03:32.112Z","type":"string"}},{"name":"from","required":false,"in":"query","description":"The “from” parameter allows you to specify the start date for the analytics summary of the experiences. The timestamp is provided in the ISO-8601 format. If not specified, analytics from the beginning of the experiment is returned.","schema":{"example":"2024-04-08T05:03:32.112Z","type":"string"}},{"name":"version","required":true,"in":"query","description":"The analytics is filtered to fetch a specific version. Pass the version `uid` here. This is a required query parameter.","schema":{"example":"6xxxxxxxxxx2","type":"string"}},{"name":"uid","required":true,"in":"path","description":"Enter the Experience UID to fetch analytics for","schema":{"example":"6xxxxxxxxxx2","type":"string"}}],"responses":{"200":{"description":"The analytics summary was returned successfully","content":{"application/json":{"example":{"variants":[{"name":"Control","shortUid":"0","impressions":2160,"conversions":[{"metric":"Click","__type":"Primary","count":108}],"probabilityToBeBest":95},{"name":"Alternate Heading","shortUid":"1","impressions":2161,"conversions":[{"metric":"Click","__type":"Primary","count":72}],"probabilityToBeBest":5}],"leadingVariant":{"status":"LEADING","name":"Control","shortUid":"0"},"refreshedAt":"2026-05-09T10:01:09.661Z","experienceVersion":"6887777b3335554698867847"}}}},"400":{"description":"Bad request","content":{"application/json":{"examples":{"experienceNotFound":{"value":{"errors":{"uid":[{"code":"personalization.EXPERIENCES.NOT_FOUND"}]},"message":"Bad request"}},"invalidObjectId":{"value":{"message":"94344555333555466666bbb700 is not a valid ObjectId","error":"Bad Request","statusCode":400}}}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Get Analytics Summary","tags":["Experience Analytics"]}},"/experiences/{uid}/analytics/time-series":{"get":{"description":"The `Get Time-series Analytics` request fetches the time-series analytics of a specific experience of a project. The response contains hourly impressions and conversions for the specified time-frame. The duration for each interval is specified in the ISO-8601 interval format.\n\nTo configure the permissions for your application via OAuth, include the `personalize:read` or `personalize:manage` scope.","operationId":"AnalyticsController_fetchTimeSeriesAnalytics","parameters":[{"name":"x-project-uid","in":"header","required":true,"schema":{"type":"string"}},{"name":"to","required":false,"in":"query","description":"The “to” parameter allows you to specify the end date for the analytics summary of the experiences. The timestamp is provided in the ISO-8601 format. If not specified, analytics leading upto the present date is returned.","schema":{"example":"2024-04-08T05:03:32.112Z","type":"string"}},{"name":"from","required":false,"in":"query","description":"The “from” parameter allows you to specify the start date for the analytics summary of the experiences. The timestamp is provided in the ISO-8601 format. If not specified, analytics from the beginning of the experiment is returned.","schema":{"example":"2024-04-08T05:03:32.112Z","type":"string"}},{"name":"metric","required":false,"in":"query","description":"The `metric` parameter allows you to fetch the time-series analytics for a specific event metric configured in the A/B test. Filtering by metric only works for an A/B test.","schema":{"example":"click","type":"string"}},{"name":"version","required":true,"in":"query","description":"The analytics is filtered to fetch a specific version. Pass the version `uid` here. This is a required query parameter.","schema":{"example":"6xxxxxxxxxx2","type":"string"}},{"name":"uid","required":true,"in":"path","description":"Enter the Experience UID to fetch analytics for","schema":{"example":"6xxxxxxxxxx2"}}],"responses":{"200":{"description":"The time-series analytics was returned successfully","content":{"application/json":{"example":[{"interval":"2024-09-21T10:47:56.660Z/PT1H","variants":[{"shortUid":"0","impressions":1080,"conversions":[{"metric":"Click","count":54,"__type":"Primary"}]},{"shortUid":"1","impressions":1081,"conversions":[{"metric":"Click","count":36,"__type":"Primary"}]}],"experienceVersion":"6887777b3335554698867847"},{"interval":"2024-09-21T11:47:56.660Z/PT1H","variants":[{"shortUid":"0","impressions":1080,"conversions":[{"metric":"Click","count":54,"__type":"Primary"}]},{"shortUid":"1","impressions":1081,"conversions":[{"metric":"Click","count":36,"__type":"Primary"}]}],"experienceVersion":"6887777b3335554698867847"}]}}},"400":{"description":"Bad request","content":{"application/json":{"examples":{"experienceNotFound":{"value":{"errors":{"uid":[{"code":"personalization.EXPERIENCES.NOT_FOUND"}]},"message":"Bad request"}},"invalidObjectId":{"value":{"message":"94344555333555466666bbb700 is not a valid ObjectId","error":"Bad Request","statusCode":400}}}}}},"403":{"description":"Unauthorized Request","content":{"application/json":{"example":{"message":"Forbidden resource","error":"Forbidden","statusCode":403}}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Get Time-series Analytics","tags":["Experience Analytics"]}},"/geolocation/regions":{"get":{"description":"The `Get all Regions` request fetches all the region-based information based on the provided search query. Regions are administrative divisions of a country, such as states or provinces, defined according to ISO 3166-2 (https://en.wikipedia.org/wiki/ISO_3166-2) standard. You can also filter the list by name and region codes.\n\nTo configure the permissions for your application via OAuth, include the `personalize:read` or `personalize:manage` scope.","operationId":"RegionController_searchRegions","parameters":[{"name":"skip","required":false,"in":"query","description":"The `skip` parameter will allow you to skip the specified number of regions from the response. Along with the `limit` parameter, the `skip` parameter helps you to paginate the response. If there are 1000 regions and you `skip` 900 with a `limit` of 100, the last 100 cities in the list will be returned.","schema":{"example":10,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"The `limit` parameter will return a specific number of regions (in between 1-1000) in your response based on the value you provide. If there are 1000 regions and you want to fetch only 100 regions, set the limit as 100. If omited, then only 10 regions are returned by default.","schema":{"example":100,"type":"number"}},{"name":"code[]","required":false,"in":"query","description":"The `code[]` parameter will return the regions with the matching code in your response based on the query you provide. This query should be in string format. You can specify multiple codes by repeating the parameter. The region code is case sensitive, and based on the ISO 3166-2 standard.","schema":{"example":"US-TX","type":"string"}},{"name":"name","required":false,"in":"query","description":"The `name` parameter will return the regions with the matching name in your response based on the value you provide.","schema":{"example":"Texas","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":[{"code":"US-TX","name":"Texas","parent":"US","displayName":"Texas, United States of America"}]}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Get all Regions","tags":["Geolocation"]}},"/geolocation/countries":{"get":{"description":"The `Get all Countries` request fetches all the country-based information based on the provided search query. The country list is based on the current ISO 3166-1 (https://en.wikipedia.org/wiki/ISO_3166-1) standard.\n\nTo configure the permissions for your application via OAuth, include the `personalize:read` or `personalize:manage` scope.","operationId":"CountryController_searchRegions","parameters":[{"name":"skip","required":false,"in":"query","description":"The `skip` parameter will allow you to skip the specified number of countries from the response. Along with the `limit` parameter, the `skip` parameter helps you to paginate the response. If there are 200 countries and you `skip` 150 with a `limit` of 50, the last 50 countries in the list will be returned.","schema":{"example":10,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"The `limit` parameter will return a specific number of countries (in between 1-1000) in your response based on the value you provide. If there are 200 countries and you want to fetch only 100 countries, set the limit as 100. If omited, then only 10 countries are returned by default.","schema":{"example":100,"type":"number"}},{"name":"code[]","required":false,"in":"query","description":"The `code[]` parameter will return the countries with the matching code in your response based on the query you provide. This query should be in string format. You can specify multiple codes by repeating the parameter. The country code is case sensitive, and based on the ISO 3166-1 standard.","schema":{"example":"US","type":"string"}},{"name":"name","required":false,"in":"query","description":"The `name` parameter will return the countries with the matching name in your response based on the value you provide.","schema":{"example":"United States","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":[{"name":"United States of America","code":"US"}]}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Get all Countries","tags":["Geolocation"]}},"/geolocation/cities":{"get":{"description":"The `Get all Cities` request fetches all the city-based information based on the provided search query. You can also filter the list by name and city codes.\n\nTo configure the permissions for your application via OAuth, include the `personalize:read` or `personalize:manage` scope.","operationId":"CityController_searchCities","parameters":[{"name":"skip","required":false,"in":"query","description":"The `skip` parameter will allow you to skip the specified number of cities from the response. Along with the `limit` parameter, the `skip` parameter helps you to paginate the response. If there are 1000 cities and you `skip` 900 with a `limit` of 100, the last 100 cities in the list will be returned.","schema":{"example":10,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"The `limit` parameter will return a specific number of cities (in between 1-1000) in your response based on the value you provide. If there are 1000 cities and you want to fetch only 100 cities, set the limit as 100. If omited, then only 10 cities are returned by default.","schema":{"example":100,"type":"number"}},{"name":"code[]","required":false,"in":"query","description":"The `code[]` parameter will return the cities with the matching code in your response based on the query you provide. This query should be in string format. You can specify multiple codes by repeating the parameter. The city code is case sensitive.","schema":{"example":"austin,TX,US","type":"string"}},{"name":"name","required":false,"in":"query","description":"The `name` parameter will return the cities with the matching name in your response based on the value you provide.","schema":{"example":"Austin","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":[{"code":"austin,TX,US","displayName":"Austin, Texas, United States"}]}}}},"security":[{"authorization":[]},{"authtoken":[]}],"summary":"Get all Cities","tags":["Geolocation"]}}},"info":{"title":"Contentstack Personalize Management API","description":"","version":"0.1","contact":{}},"tags":[{"name":"Attributes","description":"Attributes are the individual data points or characteristics about a user that can be used to personalize content, recommendations, and experiences for that user. For example age, location, browsing history, purchases, campaign sources, and so on."},{"name":"Audiences","description":"Audiences refer to a specific group of people who share certain characteristics, behaviors, or interests. These groups are identified based on various criteria such as demographics (age, gender, location), behavior (buying habits, website visits), interests (hobbies, favorite types of products), and more."},{"name":"Events","description":"Events refer to specific actions or behaviors that users perform. These actions can then be tracked and analyzed to better understand user's preferences and tailor experiences accordingly. The following Events requests allow you to manage the defined events within a project."},{"name":"Geolocation","description":"Geolocation, in the context of personalization, is about using a user's geographic location to tailor the experience, making services or content more relevant to their specific physical location. Geolocation APIs in Personalize allow you to access the underlying dataset of Countries, Regions and Cities that you can target.\n\nThis product includes GeoLite2 data created by MaxMind, available from https://www.maxmind.com."},{"name":"Experiences","description":"Experiences help you create different variations of content pages that cater to different sections of your audience. Experiences are also versioned, so that you can make draft changes on an active version of an experience. The following requests allow you to manage the Segmented and A/B Test Experiences within a project."},{"name":"Experience Analytics","description":"Experience Analytics refers to the process of collecting, analyzing, and interpreting data about user interactions to understand and improve the Personalize experiences. Analytics is only available for activated experiences. The following requests allow you to fetch the analytics of the specific experiences performance within a project."},{"name":"Experiences Priority","description":"Experiences Priority helps you define the degree of importance for each experience in your project. If mulitple experiences customize the same section of your digital property, it needs to be decided which experience's personalized content is to be ultimately presented. The priority order can be used to make this decision. It contains the UIDs of each experience in the project, in decreasing order of priority. The following requests allow you to manage the priority order of the experiences within a project."}],"servers":[{"url":"https://personalize-api.contentstack.com","description":"North America"},{"url":"https://eu-personalize-api.contentstack.com","description":"Europe"},{"url":"https://azure-na-personalize-api.contentstack.com","description":"Azure - North America"},{"url":"https://azure-eu-personalize-api.contentstack.com","description":"Azure - Europe"},{"url":"https://gcp-na-personalize-api.contentstack.com","description":"GCP - North America"},{"url":"https://gcp-eu-personalize-api.contentstack.com","description":"GCP - Europe"},{"url":"https://au-personalize-api.contentstack.com","description":"Australia"}],"components":{"securitySchemes":{"authorization":{"type":"http","scheme":"bearer","description":"Enter your OAuth token here. Read more: https://www.contentstack.com/docs/developers/developer-hub/contentstack-oauth"},"authtoken":{"type":"apiKey","name":"authtoken","in":"header","description":"Enter your authtoken here. Read more: https://www.contentstack.com/docs/developers/create-tokens/types-of-tokens#authentication-tokens-authtokens"}},"schemas":{"Attribute":{"type":"object","properties":{"name":{"type":"string","example":"Age","description":"Name your attribute. The name is unique and have a maximum of 200 characters."},"key":{"type":"string","example":"age","description":"The literal key for the attribute. The key is used to access the attribute value from the user profile."},"description":{"type":"string","example":"Age of the visitor","description":"Describe your attribute"}},"required":["name","key"]},"CustomAttributeReference":{"type":"object","properties":{"ref":{"type":"string","example":"6429018375342"}},"required":["ref"]},"PresetAttributeReference":{"type":"object","properties":{"ref":{"type":"string","enum":["DEVICE_TYPE","OPERATING_SYSTEM","QUERY_PARAMETERS","REFERRER","COUNTRY","REGION","CITY","DATE_AND_TIME"]}},"required":["ref"]},"LyticsAttributeReference":{"type":"object","properties":{}},"StringMatchOptions":{"type":"object","properties":{"value":{"type":"string","example":"name"}},"required":["value"]},"NumberMatchOptions":{"type":"object","properties":{"value":{"type":"number","example":5}},"required":["value"]},"JSONMatchOptions":{"type":"object","properties":{"pointer":{"type":"string","example":"/pointer"},"matchCondition":{"type":"string","enum":["STRING_EQUALS","HAS_ANY_VALUE","CONTAINS_SUBSTRING","IS_FALSE","IS_TRUE","NUMBER_LESS_THAN","NUMBER_GREATER_THAN","NUMBER_EQUAL_TO"]},"matchOptions":{"anyOf":[{"$ref":"#/components/schemas/StringMatchOptions"},{"$ref":"#/components/schemas/NumberMatchOptions"}],"example":"name"},"invertCondition":{"type":"boolean"}},"required":["pointer","matchCondition","matchOptions","invertCondition"]},"DateTimeMatchOptions":{"type":"object","properties":{"value":{"type":"string","example":"2021-12-21T11:50:44+05:30"},"startTime":{"type":"string","example":"2021-12-21T11:50:44+05:30"},"endTime":{"type":"string","example":"2021-12-21T11:50:44+05:30"},"useVisitorTimezone":{"type":"boolean"}}},"AudienceMatchOptions":{"type":"object","properties":{}},"Rule":{"type":"object","properties":{"attribute":{"anyOf":[{"$ref":"#/components/schemas/CustomAttributeReference"},{"$ref":"#/components/schemas/PresetAttributeReference"}]},"attributeMatchCondition":{"type":"string","enum":["STRING_EQUALS","HAS_ANY_VALUE","CONTAINS_SUBSTRING","IS_FALSE","IS_TRUE","NUMBER_LESS_THAN","NUMBER_GREATER_THAN","NUMBER_EQUAL_TO","JSON_MATCH","BEFORE_TIME","AFTER_TIME","BETWEEN_TIME","IS_MEMBER_OF"]},"attributeMatchOptions":{"anyOf":[{"$ref":"#/components/schemas/StringMatchOptions"},{"$ref":"#/components/schemas/NumberMatchOptions"},{"$ref":"#/components/schemas/JSONMatchOptions"},{"$ref":"#/components/schemas/DateTimeMatchOptions"},{"$ref":"#/components/schemas/AudienceMatchOptions"}]},"invertCondition":{"type":"boolean"}},"required":["attribute","attributeMatchCondition","attributeMatchOptions","invertCondition"]},"RuleCombination":{"type":"object","properties":{"combinationType":{"type":"string","enum":["OR","AND"]},"rules":{"example":[{"__type":"Rule","attribute":{"__type":"PresetAttributeReference","ref":"COUNTRY"},"attributeMatchCondition":"STRING_EQUALS","attributeMatchOptions":{"__type":"StringMatchOptions","value":"AU"},"invertCondition":false}],"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/Rule"},{"$ref":"#/components/schemas/RuleCombination","title":"RuleCombination"}]}}},"required":["combinationType","rules"]},"Audience":{"type":"object","properties":{"name":{"type":"string","example":"Australian"},"description":{"type":"string","example":"Australian Audience description"},"definition":{"example":{"__type":"RuleCombination","combinationType":"AND","rules":[{"__type":"Rule","attribute":{"__type":"PresetAttributeReference","ref":"COUNTRY"},"attributeMatchCondition":"STRING_EQUALS","attributeMatchOptions":{"__type":"StringMatchOptions","value":"AU"},"invertCondition":false}]},"allOf":[{"$ref":"#/components/schemas/RuleCombination"}]}},"required":["name","definition"]},"SegmentedVariant":{"type":"object","properties":{"name":{"type":"string","example":"New Variant"},"shortUid":{"type":"string","example":"2"},"__type":{"type":"string","example":"SegmentedVariant"},"audiences":{"example":["2444444xxxxxxxxx87654321","8749824xxxxxxxxxxx325423"],"type":"array","items":{"type":"string"}},"audienceCombinationType":{"type":"string","enum":["AND","OR"]}},"required":["name","__type","audiences","audienceCombinationType"]},"ABTestVariant":{"type":"object","properties":{"name":{"type":"string","example":"New Variant"},"shortUid":{"type":"string","example":"2"},"__type":{"type":"string","example":"ABTestVariant"},"trafficDistribution":{"type":"number","example":8}},"required":["name","__type"]},"Metric":{"type":"object","properties":{"__type":{"type":"string","enum":["Primary"],"example":"Primary"},"event":{"type":"string","example":"2444444xxxxxxxxx87654321"},"name":{"type":"string","example":"click"}},"required":["event","name"]},"Experience":{"type":"object","properties":{"name":{"type":"string","example":"New Experience"},"description":{"type":"string","example":"New Experience description"},"__type":{"type":"string","enum":["SEGMENTED","AB_TEST"]}},"required":["name","__type"]},"Event":{"type":"object","properties":{"key":{"type":"string","example":"ctaClick"},"description":{"type":"string","example":"Click on the website CTA"}},"required":["key"]},"TargetAudience":{"type":"object","properties":{"audiences":{"example":{"audiences":["64xxxxxxxxxxxxxx2"]},"type":"array","items":{"type":"string"}},"audienceCombinationType":{"type":"string","enum":["AND","OR"]}}},"Targeting":{"type":"object","properties":{"audience":{"example":{"audience":{"audiences":["8749824xxxxxxxxxxx325423"],"audienceCombinationType":"AND"}},"allOf":[{"$ref":"#/components/schemas/TargetAudience"}]}}},"ExperienceVersion":{"type":"object","properties":{"status":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED","ARCHIVED"]},"variants":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/SegmentedVariant"},{"$ref":"#/components/schemas/ABTestVariant","title":"Variant"}]}},"variantSplit":{"type":"string","enum":["EQUALLY_SPLIT","CUSTOM_PERCENTAGE","BANDIT"]},"metrics":{"type":"array","items":{"$ref":"#/components/schemas/Metric"}},"targeting":{"$ref":"#/components/schemas/Targeting"}},"required":["status","variants"]},"ExperiencesPriority":{"type":"object","properties":{"priorityOrder":{"example":["64xxxxxxxxxxxxxx2","65xxxxxxxxxxxxxxd"],"type":"array","items":{"type":"string"}}},"required":["priorityOrder"]}}}}