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 journeys FOR, passed BY VALUE rather than by id. Not an oversight: the create flow drafts a persona and its journeys before either exists, so requiring a persisted persona would force you to save a draft you may discard.

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

Response

Draft journeys.

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

The shape depends on the request: POST /personas/generate returns {persona, journeys} without personaCount and {personas: [{persona, journeys}]} with it; POST /journeys/generate returns {journeys}.

persona
object

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

personas
object[]
journeys
object[]