Skip to main content
POST
Draft journeys for a persona

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.

Body

application/json

Grounding source and the persona to draft for.

Exactly ONE grounding source: serverAttachmentId or environmentId. Sending both is a 400 — a request that is already confused about what it wants should not have a winner picked for it.

persona
object
required

The persona to draft goals FOR, passed BY VALUE rather than by id. Not an oversight: the create flow drafts a persona and its goals before either exists, so requiring a persisted persona would force you to save a draft you may discard.

serverAttachmentId
string
environmentId
string
goalCount
integer
description
string
Maximum string length: 2000

Response

Draft goals.

DRAFTS. Nothing here is persisted — feed what you want to keep to POST /projects/{projectId}/personas or POST /projects/{projectId}/goals.

The shape depends on the request: POST /personas/generate returns {persona, journeys} without personaCount and {personas: [{persona, journeys}]} with it; POST /goals/generate returns {journeys}. The payload KEY is still journeys: it is the drafting service's own shape, not a resource noun, and it moves at general availability with the rest of the deprecated surface.

persona
object

A generated persona draft. Nothing is persisted until you create it.

personas
object[]
journeys
object[]