POST /decide serves content for one user on one element and records the decision. Call it when you are about to show the content, once per exposure, behind a deadline and a fallback (see Fallbacks and timeouts). Full field reference: the endpoint.
The minimum
control, because it creates the experiment; see the declaration below.
The user buckets
identifiers and attributes are merged into the stored user on every call; context is used for this decision only. On a key present in both attributes and context, the context value wins for this decision. What goes where is on Users, identifiers and attributes.
The declaration
A secret-key call is a complete declaration of how the element is optimized. Send the same one on every call, or move it todeclare.
“Supersedes” means the running experiment is concluded and a successor starts from the new declaration. An identical declaration does nothing. An unknown field anywhere, including inside nested objects, is a
400 naming the path: Received unknown parameter: rewards[0].window_second.
The response
content is the served arm’s content after {{variable}} substitution, and it is never null: the control serves when nothing else can. arm_type is control or variant. experiment_status is initializing, exploring or concluded; see The experiment lifecycle.
Two optional fields appear only when they apply:
warnings, a list of{ "code", "message" }.arm_invalid: a declared arm was skipped, and the message says which and why.serving_control_only: every variant is concluded and the control is serving alone until new variants are generated.replayed: true: this response is the stored answer to an earlier request with the sameidempotency_key. See Idempotency.
Publishable keys
A browser or mobile client holds a publishable key (curious_pk_) and may send element, user_id, identifiers, attributes, context and idempotency_key, nothing else: any declaration field is a 400. The element must already have a live experiment declared by a secret key; otherwise the call is a 409 with the message No live experiment for element "…" — publishable keys are serve-only; declare the element first with a secret-key decide call or POST /declare. The request must come from an origin on the key’s allowlist. See Keys and environments.
Several elements at once
Sendelements instead of a singular body to decide up to 50 elements in one request. See Batch calls.
With the server SDK
decide() is on Decide with the server SDK.
Next: Track outcomes, so Curious can learn from what users do. If every decision comes back as the control, start at Every decision returns the control; a 409 is explained on The API returns 409 conflict.