Moonborn — API · portraits
Set a portrait as the persona card (active) image
Activatable portraits must be in `generated` or `approved` status. Activation only updates the `personas.active_portrait_id` pointer — the canonical itself stays the identity anchor for future variants.
POST/v1/personas/{id}/portrait/{pid}/activatescope · Bearer (API key or session JWT)
Path parameters
| Field | Type | Description |
|---|---|---|
| idreq | string | Persona id (uuid). |
| pidreq | string | Portrait id (uuid). |
Responses
200Activated
Body
| Field | Type | Description |
|---|---|---|
| okreq | object |
409Portrait not in an activatable status
Body
| Field | Type | Description |
|---|---|---|
| errorreq | string | |
| message | string | |
| used | number | |
| limit | number | |
| pii | string[] | |
| term | string | |
| scores | object | |
| provider | string |
503Feature not configured
Body
| Field | Type | Description |
|---|---|---|
| errorreq | string | |
| message | string | |
| used | number | |
| limit | number | |
| pii | string[] | |
| term | string | |
| scores | object | |
| provider | string |
Examples
cURL
curl -X POST https://api.moonborn.co/v1/personas/<id>/portrait/<pid>/activate \ -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.portraits.activatePersonaPortrait({
id: '<id>',
pid: '<pid>',
});Python
import os
from moonborn import Moonborn
client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])
result = client.portraits.activate_persona_portrait(
id="<id>",
pid="<pid>",
)