Intempt
  1. API Reference
Intempt
  • Installation
    • Basic Intempt Installation
    • Create source
    • Google Tag Manager
    • Environment Setup
    • Validating Installation
  • SDK
    • JS SDK
    • Android SDK
    • iOS SDK
    • Node.js SDK
  • API Reference
    • Track data
      POST
    • Consent
      POST
    • Choose API
      POST
    • Recommendations Feed API
      POST
  • Data Ingestion & Tracking
    • intempt:html / intempt:page / intempt:session
    • Product Catalog Ingestion via API
    • How Intempt Works — A One-Page Mental Model
    • Revenue & Refund Tracking
    • Recommendation events mapping
    • Track Events API (Recommendations)
  • Data Models & Event Schema
    • Event Schema Overview
  • Webhooks
    • All about Webhooks
  • Server Side Experiments
    • Overview
  1. API Reference

Choose API

POST
/{orgName}/projects/{projectName}/optimization/choose-api
Ingest purpose: Resolve server-side experiments and personalizations for a user before you render or respond.
Use this endpoint to:
• Fetch the correct variation / personalization body for a user
• Resolve experiences by names or groups
• Ensure consistent assignments using sessionId + device (optional but recommended)
What it returns: a choices[] array. Each choice includes:
• name (experience name)
• group (optional group name)
• body (the payload your backend must apply)

Request

Path Params

Query Params

Body Params application/json

Examples

Responses

🟢200OK
application/json
200
Body

🟠400Bad Request
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST '//projects//optimization/choose-api?apiKey' \
--header 'Content-Type: application/json' \
--data-raw '{
    "identification": {
        "userId": "customer@example.com"
    },
    "names": [
        "demo-server-side-experiment",
        "demo-server-side-personalization-most-popular"
    ],
    "device": "desktop",
    "sessionId": "sess_web_20260127_001"
}'
Response Response Example
200 - Success
{
    "choices": []
}
Modified at 2026-01-27 13:25:55
Previous
Consent
Next
Recommendations Feed API
Built with