Create a personality
const url = 'http://localhost:11044/api/v1/world/personalities';const options = { method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"from":"example","name":"example","slug":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:11044/api/v1/world/personalities \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "from": "example", "name": "example", "slug": "example" }'Creates a world-tier personality — blank, or duplicated from an existing one via from. Validated by rendering before it counts; a persona that cannot render is not created.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The world-tier personality to create: slug (trimmed; 1-40 lowercase letters, digits and hyphens, not starting with a hyphen), name (the display name written into its identity.yml, which is stamped source: user) and optional from (slug of a personality of any tier whose files are copied; omit for empty sections). Answers 400 when the slug is taken or invalid, from is unknown, or the result does not render
Body of POST /world/personalities: a new world-tier personality, blank or duplicated from an existing one
object
Slug of a personality, world or realm tier, whose files to copy; null for a blank personality
Display name, written into the personality’s identity.yml
Identifier of the new personality, trimmed: a lowercase letter or digit, then up to 39 lowercase letters, digits or hyphens. Refused when taken
Example generated
{ "from": "example", "name": "example", "slug": "example"}Responses
Section titled “Responses”Created
object
Refused — slug taken, unknown from, 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
