latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-15140179507.6 KB

d3adfe49fbbf

User testing

Publish an environment for user testing

PUT, not POST, because publishing is IDEMPOTENT: one scenario per environment, and publishing an already-published environment returns the existing one rather than minting a second. created says which happened.

Requires project ADMIN.

put/projects/{projectId}/environments/{environmentId}/scenario

Request body

namestring
descriptionstring
mode'project_members' | 'invited_only' | 'anyone_with_link'

Who may open the share link:

  • project_members — signed-in members of the project only
  • invited_only — named members, invited individually
  • anyone_with_linkanyone holding the URL, signed in or not

Response

The scenario, new or existing.

idstring required
environmentIdstring required
namestring required
mode'project_members' | 'invited_only' | 'anyone_with_link' required

Who may open the share link:

  • project_members — signed-in members of the project only
  • invited_only — named members, invited individually
  • anyone_with_linkanyone holding the URL, signed in or not
accessVersioninteger required

Bumped whenever access NARROWS — a mode change, or a member removal. Sessions minted under an older version stop working, which is what makes those changes take effect at once rather than at expiry. A link ROTATION is deliberately not one of them: it mints a new URL without bumping this, so anyone who already redeemed the old link keeps working. Rotating is half of closing a leak — see the rotate-link operation.

linkstring nullable required

The share link. null when the scenario has no link token.

createdboolean

False when the environment was ALREADY published and this returned the existing scenario. Publishing is idempotent, so this is how you tell "I published it" from "it was already there" without a preflight read.

overridesIgnoredboolean

True when the create-time overrides (name, description, mode) were NOT applied because the environment was already published. Paired with created: false — change an existing scenario with PATCH .../user-testing/scenarios/{scenarioId}.