Create a profile

Creates or updates a profile and returns it with selected experience variants. The organizationId is the Client ID from Settings → SDK Keys → Optimization.

Path parameters

environmentSlugstringRequiredDefaults to main
The slug of the environment of the profile to retrieve
organizationIdstringRequired
The ID of the organization of the profile to retrieve

Query parameters

localestringOptionalDefaults to en

An ISO 639-1 language code used for experience evaluation.

typeenumOptional

Set to preflight to evaluate experiences without persisting state. Useful for SSR/ESR.

Allowed values:

Request

This endpoint expects an object.
eventslist of objectsOptional

Response

Successful response

Errors

400
Bad Request Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error