Open app
Moonborn — API · persona-versions

Roll the persona back to a prior version (creates a new version row).

POST/v1/personas/{id}/versions/{no}/restorescope · Bearer (API key or session JWT)
Path parameters
FieldTypeDescription
idreqstring
noreqstring

Responses

200Restored
Body
FieldTypeDescription
newVersionNumberreqnumber
restoredFromreqnumber
404Version not found
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring
409Restore conflict (concurrent edit)
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring

Examples

cURL
curl -X POST https://api.moonborn.co/v1/personas/<id>/versions/<no>/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.persona_versions.restorePersonaVersion({
  id: '<id>',
  no: '<no>',
});
Python
import os
from moonborn import Moonborn

client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])

result = client.persona_versions.restore_persona_version(
    id="<id>",
    no="<no>",
)