Skip to content

Create a personality

POST
/api/v1/world/personalities
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.

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

Media typeapplication/json

Body of POST /world/personalities: a new world-tier personality, blank or duplicated from an existing one

object
from

Slug of a personality, world or realm tier, whose files to copy; null for a blank personality

string
name
required

Display name, written into the personality’s identity.yml

string
slug
required

Identifier of the new personality, trimmed: a lowercase letter or digit, then up to 39 lowercase letters, digits or hyphens. Refused when taken

string

Example generated

{
"from": "example",
"name": "example",
"slug": "example"
}

Created

Media type*/*
object

Refused — slug taken, unknown from, or the persona does not render

Media type*/*

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
message
required

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

string
status
required

Always error. Present because the map this replaces carried it and a consumer may branch on it

string

Example

error