Choose API — Endpoint & Request Structure#
Endpoint#
POST https://api.intempt.com/v1/{orgName}/projects/{projectName}/optimization/choose-api?apiKey=YOUR_API_KEY
Path Parameters#
orgName — Your Intempt organization name
projectName — The project where the experiment is configured
apiKey — Your API key (passed as a query parameter)
Request Body Structure#
The request body defines how the user is identified and which experiment(s) or group(s) you want to resolve.Identification Methods#
1. Using sourceId + profileId#
"identification": {
"sourceId": "1575686747310551XXX",
"profileId": "profile_c2daf740e3e9f7aa48c6f6563f192XXX"
}
2. Using userId#
(Works only if this userId already exists in Intempt)"identification": {
"userId": "user_123456"
}
Optional Session & Device Fields#
Including these fields improves accuracy and reporting:sessionId#
A unique ID that groups multiple requests within the same browsing session."sessionId": "my_session_1"
device#
Defines the device where the experiment is running.
Possible values: "mobile", "desktop"These fields can also be used as limitations when configuring experiences in Intempt.
Resolving by Experiment Names#
{
"identification": {
"sourceId": "1575686747310551XXX",
"profileId": "profile_c2daf740e3e9f7aa48c6f6563f192XXX"
},
"names": [
"demo-server-side-experiment",
"demo-server-side-personalization-most-popular"
],
"device": "mobile",
"sessionId": "my_session_XXX"
}
Resolving by Groups#
{
"identification": {
"sourceId": "1575686747310551XXX",
"profileId": "profile_c2daf740e3e9f7aa48c6f6563f192XXX"
},
"groups": ["my-group"],
"device": "mobile",
"sessionId": "my_session_XXX"
}
Example Response#
{
"choices": [
{
"name": "demo-server-side-personalization-most-popular",
"group": "my-group",
"body": {
"label": "My most popular products PERSONALIZATION",
"products": [
{
"price": "250.0",
"title": "PMC Bronze 9mm (FMJ) 124 GR. 1000 Rds. (SKU: 9G)",
"category": "Ammunition"
}
]
}
}
]
}
Modified at 2025-12-03 13:41:10