Save a personality's files
const url = 'http://localhost:11044/api/v1/world/personalities/example/files';const options = { method: 'PUT', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"files":{"additionalProperty":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://localhost:11044/api/v1/world/personalities/example/files \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "files": { "additionalProperty": "example" } }'World-tier personalities only; a realm personality answers with the duplicate-first instruction. The save is validated by rendering, and rolls back if the persona no longer renders.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Slug of a world-tier personality the user made; shipped and realm personalities are read-only and answer 400 asking for a duplicate first, as does an unknown slug
Request Bodyrequired
Section titled “Request Bodyrequired”Files to write, keyed by file name (identity.yml, personality.jinja, behaviours.jinja, guardrails.jinja, response_format.jinja, verbosity.jinja), each replacing that file’s whole content; files not named are left as they are, and any other name answers 400. If the persona no longer renders afterwards the personality is rolled back to its previous files and the render error returned as 400
Body of PUT /world/personalities/{slug}/files: personality files to save, kept only if the persona still renders
object
File name to its full new content. Names are among identity.yml, personality.jinja, behaviours.jinja, guardrails.jinja, response_format.jinja and verbosity.jinja; any other is refused. Files not named are left as they are
object
Example generated
{ "files": { "additionalProperty": "example" }}Responses
Section titled “Responses”Saved
object
Refused — read-only, unknown files, or the persona does not render
A refusal from the world administration surface: what went wrong, and the word error so a client reading the body need not consult the status code
object
What was refused and why, written to be shown. Names the offending value where there is one — the unknown mode, the out-of-range threshold, the invalid cron expression
Always error. Present because the map this replaces carried it and a consumer may branch on it
Example
error
