Moonborn — API · personas
Update mutable persona fields (slug, visibility)
PATCH/v1/personas/{id}scope · Bearer (API key or session JWT)
Path parameters
| Field | Type | Description |
|---|---|---|
| idreq | string | Persona id (cuid). |
Request body
| Field | Type | Description |
|---|---|---|
| slug | string | |
| visibility | string · "private" | "workspace" | "org" | "public" |
Responses
200OK
Body
| Field | Type | Description |
|---|---|---|
| idreq | string | |
| workspaceIdreq | string | |
| slugreq | string | |
| languagereq | string | |
| visibilityreq | string · "private" | "workspace" | "org" | "public" | |
| statusreq | string · "draft" | "active" | "archived" | "deleted" | |
| schemaVersionreq | string | |
| createdAtreq | string | |
| updatedAtreq | string | |
| intentreq | string | |
| fingerprintHashreq | string | |
| qualityScores | object |
404Persona not found
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string |
Examples
cURL
curl -X PATCH https://api.moonborn.co/v1/personas/<id> \
-H "Authorization: Bearer $MOONBORN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"slug": "<string>",
"visibility": "private"
}'TypeScript
import Moonborn from '@moonborn/sdk';
const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });
const result = await client.personas.updatePersona({
id: '<id>',
slug: "<string>",
visibility: "private",
});Python
import os
from moonborn import Moonborn
client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])
result = client.personas.update_persona(
id="<id>",
slug="<string>",
visibility="private",
)