Skip to main content
PATCH
Update a swarm

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.

swarmId
string
required

Swarm ID, as returned by the project's swarm list.

Body

application/json

Fields to change.

Same tri-state as the goal patch (null clears), and the same rule that iterations (or its deprecated sessionsPerTarget alias, never both) and maxTurns travel together.

name
string
Maximum string length: 200
description
string | null
Maximum string length: 2000
environmentIds
string[] | null
Minimum array length: 1
iterations
integer
Required range: 1 <= x <= 100
sessionsPerTarget
integer
deprecated

Pre-rename spelling of iterations. Accepted until general availability; never alongside it.

Required range: 1 <= x <= 100
maxTurns
integer
Required range: 1 <= x <= 200

Response

The updated swarm.

An authoring container for goals. It holds DEFAULTS, not execution state — launching happens per goal.

id
string
required
projectId
string
required
name
string
required
description
string | null
required
environmentIds
string[]
required

Default fan-out for goals authored under this container.

iterations
integer | null
required

Sessions run against EACH target. Total sessions = targets x this.

sessionsPerTarget
integer | null
required
deprecated

Pre-rename spelling of iterations, emitted alongside it until general availability.

maxTurns
integer | null
required
createdAt
number
required

Epoch milliseconds.

updatedAt
number
required

Epoch milliseconds.

setupWrites
boolean

Whether prerequisite setup may create or modify workspace data before sessions run. Defaults to false.