Moonborn — API · personas
Restore a soft-deleted persona within the 30-day grace window
POST/v1/personas/{id}/restorescope · Bearer (API key or session JWT)
Path parameters
| Field | Type | Description |
|---|---|---|
| idreq | string | Persona id (cuid). |
Responses
200Restored
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 |
410Persona permanently deleted; restore window expired
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string |
Examples
cURL
curl -X POST https://api.moonborn.co/v1/personas/<id>/restore \ -H "Authorization: Bearer $MOONBORN_API_KEY"
TypeScript
import Moonborn from '@moonborn/sdk';
const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });
const result = await client.personas.restorePersona({
id: '<id>',
});Python
import os
from moonborn import Moonborn
client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])
result = client.personas.restore_persona(
id="<id>",
)