Skip to main content
POST
Create a npc (game-narrative pack term: characters)

Path Parameters

project_id
string
required

Body

application/json

POST /v1/projects/{project_id}/{pack}/{term} - per-type upsert.

The pack-prefix routes (e.g. POST /v1/projects/{pid}/ttrpg/npcs) derive the canonical entity type from the URL path. The request body therefore drops the type field present on the legacy generic UpsertEntityRequest.

See entity-api-shape concept (R104).

name
string
required

Display name

Required string length: 1 - 200
external_id
string | null

Developer-provided stable identifier - used for upsert idempotency AND as the human-readable URL slug on the dashboard. When omitted, the server derives one from the entity name (slugified, with collision suffix). Once set, this field cannot be changed via PATCH; re-upserting with the same external_id updates the existing row.

Maximum string length: 200
properties
Properties · object

Domain-specific properties.

parent
string | null

Optional parent entity external_id. When set, this entity becomes a child of the referenced entity and location_path is computed automatically.

Response

Successful Response

Entity resource representation.

id
string
required

Entity ID (ent_ prefixed)

project_id
string
required

Parent project ID

external_id
string
required

Developer-provided stable identifier

type
string
required

Entity type

name
string
required

Display name

created_at
string<date-time>
required

Creation timestamp (UTC)

updated_at
string<date-time>
required

Last update timestamp (UTC)

properties
Properties · object

Domain-specific properties

valid_from_seq
integer | null

KG temporal anchor: first valid sequence

valid_to_seq
integer | null

KG temporal anchor: last valid sequence (null = current)

parent_id
string | null

System ID (ent_ prefixed) of the parent entity. None for root entities.

location_path
string | null

Materialized path string for subtree queries. Format: '/{external_id}' for roots, '/{ancestor}/{...}/{own_ext_id}' for children. None for entities that have never had a parent set.

Link that caused this shadow entity. None for native entities.

source_entity_id
string | null

Originating entity ID in the source project. None for native entities.

source_project_id
string | null

Originating project ID. None for native entities.