Moonborn — API · personas
Duplicate a persona into a target workspace
POST/v1/personas/{id}/duplicatescope · Bearer (API key or session JWT)
Path parameters
| Field | Type | Description |
|---|---|---|
| idreq | string | Persona id (cuid). |
Request body
| Field | Type | Description |
|---|---|---|
| targetWorkspaceIdreq | string | |
| newSlug | string |
Responses
201Duplicated
Body
| Field | Type | Description |
|---|---|---|
| idreq | string | |
| statusreq | string · "draft" | "active" | "archived" | "deleted" | |
| pipelineRunIdreq | string |
404Source persona not found
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string |
Examples
cURL
curl -X POST https://api.moonborn.co/v1/personas/<id>/duplicate \
-H "Authorization: Bearer $MOONBORN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"targetWorkspaceId": "<string>"
}'TypeScript
import Moonborn from '@moonborn/sdk';
const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });
const result = await client.personas.duplicatePersona({
id: '<id>',
targetWorkspaceId: "<string>",
});Python
import os
from moonborn import Moonborn
client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])
result = client.personas.duplicate_persona(
id="<id>",
target_workspace_id="<string>",
)