Skip to main content
PATCH
Update a scenario

Authorizations

Authorization
string
header
required

MCPJam API key (sk_…). Create one at Settings → API keys. Guest sessions cannot use the API, and API keys cannot manage other API keys.

Path Parameters

projectId
string
required

ID of the hosted project that contains the server.

scenarioId
string
required

Scenario ID, as returned by publishing an environment or by the project's scenario reads.

Body

application/json

At least one field. Send mode on its own: identity and exposure are separate operations upstream, and applying them in sequence could leave the scenario live in a mode you did not ask for.

name
string
Maximum string length: 200
description
string
Maximum string length: 2000
mode
enum<string>

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
Available options:
project_members,
invited_only,
anyone_with_link

Response

The updated scenario.

Scenario metadata after an update. Deliberately WITHOUT accessVersion: a mode change bumps it upstream, but the envelope this route re-reads does not carry the new value — reporting a stale one would document a revocation signal the response cannot deliver. The publish response carries the real one.

id
string
required
projectId
string
required
name
string | null
required
description
string | null
required
mode
enum<string> | null
required
Available options:
project_members,
invited_only,
anyone_with_link,
null