Moonborn — API · personas
Create a persona via the 6-step generation pipeline
Runs intent_parse → soul_draft → self_enrich → mask_build → surface_ground → audit. When `stream=true`, the response is `text/event-stream` (handled by C3 SSE).
POST/v1/personasscope · Bearer (API key or session JWT)
Request body
| Field | Type | Description |
|---|---|---|
| intentreq | string | |
| workspaceIdreq | string | |
| slug | string | |
| visibility | string · "private" | "workspace" | "org" | "public" | default: "workspace" |
| language | string | default: "en" |
| stream | boolean | default: false |
Responses
201Persona created
Body
| Field | Type | Description |
|---|---|---|
| idreq | string | |
| statusreq | string · "draft" | "active" | "archived" | "deleted" | |
| pipelineRunIdreq | string |
422Validation error
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string |
429Rate limit exceeded
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string |
Examples
cURL
curl -X POST https://api.moonborn.co/v1/personas \
-H "Authorization: Bearer $MOONBORN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"intent": "<string>",
"workspaceId": "<string>"
}'TypeScript
import Moonborn from '@moonborn/sdk';
const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });
const result = await client.personas.createPersona({
intent: "<string>",
workspaceId: "<string>",
});Python
import os
from moonborn import Moonborn
client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])
result = client.personas.create_persona(
intent="<string>",
workspace_id="<string>",
)