curl --request POST \
--url https://api.kitefrost.ai/v1/projects/{project_id}/game-narrative/characters \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "blacksmith-gideon",
"name": "Gideon the Blacksmith",
"properties": {
"role": "merchant",
"personality": "gruff but kind, secretly a retired adventurer",
"location": "village-square"
}
}
'import requests
url = "https://api.kitefrost.ai/v1/projects/{project_id}/game-narrative/characters"
payload = {
"external_id": "blacksmith-gideon",
"name": "Gideon the Blacksmith",
"properties": {
"role": "merchant",
"personality": "gruff but kind, secretly a retired adventurer",
"location": "village-square"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: 'blacksmith-gideon',
name: 'Gideon the Blacksmith',
properties: {
role: 'merchant',
personality: 'gruff but kind, secretly a retired adventurer',
location: 'village-square'
}
})
};
fetch('https://api.kitefrost.ai/v1/projects/{project_id}/game-narrative/characters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kitefrost.ai/v1/projects/{project_id}/game-narrative/characters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'external_id' => 'blacksmith-gideon',
'name' => 'Gideon the Blacksmith',
'properties' => [
'role' => 'merchant',
'personality' => 'gruff but kind, secretly a retired adventurer',
'location' => 'village-square'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kitefrost.ai/v1/projects/{project_id}/game-narrative/characters"
payload := strings.NewReader("{\n \"external_id\": \"blacksmith-gideon\",\n \"name\": \"Gideon the Blacksmith\",\n \"properties\": {\n \"role\": \"merchant\",\n \"personality\": \"gruff but kind, secretly a retired adventurer\",\n \"location\": \"village-square\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kitefrost.ai/v1/projects/{project_id}/game-narrative/characters")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"blacksmith-gideon\",\n \"name\": \"Gideon the Blacksmith\",\n \"properties\": {\n \"role\": \"merchant\",\n \"personality\": \"gruff but kind, secretly a retired adventurer\",\n \"location\": \"village-square\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kitefrost.ai/v1/projects/{project_id}/game-narrative/characters")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_id\": \"blacksmith-gideon\",\n \"name\": \"Gideon the Blacksmith\",\n \"properties\": {\n \"role\": \"merchant\",\n \"personality\": \"gruff but kind, secretly a retired adventurer\",\n \"location\": \"village-square\"\n }\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2026-03-24T10:01:00Z",
"external_id": "blacksmith-gideon",
"id": "ent_xyz789",
"name": "Gideon the Blacksmith",
"project_id": "a1b2c3d4-1111-2222-3333-444444444444",
"properties": {
"role": "merchant"
},
"type": "npc",
"updated_at": "2026-03-24T10:01:00Z"
}{
"error": "Unauthorized",
"code": "unauthorized",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"message": "No valid API key was supplied.",
"doc_url": "https://docs.kitefrost.ai/errors/unauthorized"
}{
"error": "Forbidden",
"code": "forbidden",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"message": "Your API key does not have the required scope.",
"doc_url": "https://docs.kitefrost.ai/errors/forbidden"
}{
"error": "Not found",
"code": "not_found",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"message": "The requested resource does not exist.",
"doc_url": "https://docs.kitefrost.ai/errors/not_found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": "Rate limit exceeded",
"code": "rate_limited",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"message": "You have exceeded the rate limit for your plan.",
"doc_url": "https://docs.kitefrost.ai/errors/rate_limited"
}{
"error": "Internal server error",
"code": "internal_error",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"message": "An unexpected error occurred.",
"doc_url": "https://docs.kitefrost.ai/errors/internal_error"
}Create a npc (game-narrative pack term: characters)
Create or update an entity of canonical type ‘npc’ using the game-narrative pack vocabulary term ‘characters’. Equivalent to POST /v1/projects/{pid}/entities with type='npc' but with a typed contract.
curl --request POST \
--url https://api.kitefrost.ai/v1/projects/{project_id}/game-narrative/characters \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "blacksmith-gideon",
"name": "Gideon the Blacksmith",
"properties": {
"role": "merchant",
"personality": "gruff but kind, secretly a retired adventurer",
"location": "village-square"
}
}
'import requests
url = "https://api.kitefrost.ai/v1/projects/{project_id}/game-narrative/characters"
payload = {
"external_id": "blacksmith-gideon",
"name": "Gideon the Blacksmith",
"properties": {
"role": "merchant",
"personality": "gruff but kind, secretly a retired adventurer",
"location": "village-square"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: 'blacksmith-gideon',
name: 'Gideon the Blacksmith',
properties: {
role: 'merchant',
personality: 'gruff but kind, secretly a retired adventurer',
location: 'village-square'
}
})
};
fetch('https://api.kitefrost.ai/v1/projects/{project_id}/game-narrative/characters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kitefrost.ai/v1/projects/{project_id}/game-narrative/characters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'external_id' => 'blacksmith-gideon',
'name' => 'Gideon the Blacksmith',
'properties' => [
'role' => 'merchant',
'personality' => 'gruff but kind, secretly a retired adventurer',
'location' => 'village-square'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kitefrost.ai/v1/projects/{project_id}/game-narrative/characters"
payload := strings.NewReader("{\n \"external_id\": \"blacksmith-gideon\",\n \"name\": \"Gideon the Blacksmith\",\n \"properties\": {\n \"role\": \"merchant\",\n \"personality\": \"gruff but kind, secretly a retired adventurer\",\n \"location\": \"village-square\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kitefrost.ai/v1/projects/{project_id}/game-narrative/characters")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"blacksmith-gideon\",\n \"name\": \"Gideon the Blacksmith\",\n \"properties\": {\n \"role\": \"merchant\",\n \"personality\": \"gruff but kind, secretly a retired adventurer\",\n \"location\": \"village-square\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kitefrost.ai/v1/projects/{project_id}/game-narrative/characters")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_id\": \"blacksmith-gideon\",\n \"name\": \"Gideon the Blacksmith\",\n \"properties\": {\n \"role\": \"merchant\",\n \"personality\": \"gruff but kind, secretly a retired adventurer\",\n \"location\": \"village-square\"\n }\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2026-03-24T10:01:00Z",
"external_id": "blacksmith-gideon",
"id": "ent_xyz789",
"name": "Gideon the Blacksmith",
"project_id": "a1b2c3d4-1111-2222-3333-444444444444",
"properties": {
"role": "merchant"
},
"type": "npc",
"updated_at": "2026-03-24T10:01:00Z"
}{
"error": "Unauthorized",
"code": "unauthorized",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"message": "No valid API key was supplied.",
"doc_url": "https://docs.kitefrost.ai/errors/unauthorized"
}{
"error": "Forbidden",
"code": "forbidden",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"message": "Your API key does not have the required scope.",
"doc_url": "https://docs.kitefrost.ai/errors/forbidden"
}{
"error": "Not found",
"code": "not_found",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"message": "The requested resource does not exist.",
"doc_url": "https://docs.kitefrost.ai/errors/not_found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": "Rate limit exceeded",
"code": "rate_limited",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"message": "You have exceeded the rate limit for your plan.",
"doc_url": "https://docs.kitefrost.ai/errors/rate_limited"
}{
"error": "Internal server error",
"code": "internal_error",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"message": "An unexpected error occurred.",
"doc_url": "https://docs.kitefrost.ai/errors/internal_error"
}Path Parameters
Body
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).
Display name
1 - 200Developer-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.
200Domain-specific properties.
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.
Entity ID (ent_ prefixed)
Parent project ID
Developer-provided stable identifier
Entity type
Display name
Creation timestamp (UTC)
Last update timestamp (UTC)
Domain-specific properties
KG temporal anchor: first valid sequence
KG temporal anchor: last valid sequence (null = current)
System ID (ent_ prefixed) of the parent entity. None for root entities.
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.
Originating entity ID in the source project. None for native entities.
Originating project ID. None for native entities.