Endpoints and resources
World pages
List, read, create and edit characters, locations, factions, items and custom World pages.
Use character, location, faction, item or custom as the entity kind. GET requests require campaign:read. Public-content keys see entities with hidden_from_wiki: false; custom entities also require a visible parent type. Private-content keys include hidden entities and types.
List pages
/api/public/v2/entitiesLists metadata in ascending id order. Accepts no request body. Use the document routes to read descriptions.
| Parameter | Type | Description |
|---|---|---|
kind |
string | Required. One of the five kinds above. |
type_id |
UUID string | Optional. Filters custom entities to one type. Invalid with another kind. |
q |
string | Optional literal, case-insensitive substring of the name. Requires at least two characters after trimming and at most 200 in the supplied value, without control characters. |
limit |
integer | Optional, 1 to 100. Defaults to 25. |
cursor |
string | Optional cursor from the previous response. Keep the same filters and key. |
The response has data and pagination. Follow the pagination rules for another page.
curl "https://app.saga20.com/api/public/v2/entities?kind=character&q=Nyra&limit=25" \
-H "Authorization: Bearer $SAGA20_API_KEY"
{
"data": [
{
"kind": "character",
"id": "a4f1b6d2-0e5c-4b7a-8c33-1d9e2f7a6b50",
"name": "Nyra Vael",
"tags": ["Greywatch"],
"icon": "saga20:mage",
"hidden_from_wiki": false,
"created_at": "2026-09-02T18:00:11+00:00",
"updated_at": "2026-09-25T08:04:02+00:00",
"is_player_character": true,
"status_key": "alive",
"status_label": "Alive"
}
],
"pagination": {"has_more": false, "next_cursor": null}
}
Page response fields
The same projection appears in lists and single-entity reads. Fields for the kind are always present, with null for unset stored values.
| Field | Type | Description |
|---|---|---|
kind |
string | Entity kind. |
id |
string | Entity id. |
name |
string or null | Stored name. |
tags |
array of strings or null | Stored tags. |
icon |
string or null | Stored icon. |
hidden_from_wiki |
boolean or null | Stored visibility setting. |
created_at |
string or null | Creation timestamp. |
updated_at |
string or null | Update timestamp. |
is_player_character |
boolean or null | Characters only. True for a player character, false for an NPC. |
status_key |
string or null | Characters only. Stored status; older records can contain other values. |
status_label |
string or null | Characters only. Stored display label. |
type |
string or null | Locations only. Stored location type. |
entity_type_id |
string or null | Custom entities only. Parent type id. |
Characters
Use kind=character for both player characters and NPCs. The response includes is_player_character, status_key and status_label. Detail edits accept name, tags, status_key and is_player_character.
Locations
Use kind=location. The response includes the stored type. Detail edits accept name, tags and type.
Factions
Use kind=faction. Detail edits accept name and tags. Read or edit the description through the document routes.
Items
Use kind=item. Detail edits accept name and tags. Descriptions also use the document routes.
Custom page types
Use kind=custom and read the custom page type list to find a type id. Pass type_id to filter a list, and include it when creating a custom page. The response includes entity_type_id. Detail edits accept name and tags.
Public-content keys see a custom page only when both the page and its parent type are visible. Private-content permission includes hidden pages and types.
Get one page
/api/public/v2/entities/{kind}/{id}Requires campaign:read. Returns data with the projection above and an ETag header. Accepts no query parameters or request body. A missing, other-campaign or inaccessible entity returns 404 with not_found.
| Parameter | Type | Description |
|---|---|---|
kind |
string | Required path parameter. Supported entity kind. |
id |
UUID string | Required path parameter. Entity id from a list. |
curl -i "https://app.saga20.com/api/public/v2/entities/character/a4f1b6d2-0e5c-4b7a-8c33-1d9e2f7a6b50" \
-H "Authorization: Bearer $SAGA20_API_KEY"
{
"data": {
"kind": "character",
"id": "a4f1b6d2-0e5c-4b7a-8c33-1d9e2f7a6b50",
"name": "Nyra Vael",
"tags": ["Greywatch"],
"icon": "saga20:mage",
"hidden_from_wiki": false,
"created_at": "2026-09-02T18:00:11+00:00",
"updated_at": "2026-09-25T08:04:02+00:00",
"is_player_character": true,
"status_key": "alive",
"status_label": "Alive"
}
}
Create a page
/api/public/v2/entitiesRequires campaign:write and both read scopes. Accepts no query parameters. Send Content-Type: application/json and a new Idempotency-Key. This creates a hidden page with an empty description. Use a document write to add its description. If-Match is not required for creation.
| Field | Type | Description |
|---|---|---|
kind |
string | Required. Supported entity kind. |
name |
string | Required, 1 to 120 characters. Must contain non-whitespace text without control characters. Leading and trailing whitespace is trimmed. |
type_id |
UUID string | Required for custom, forbidden for other kinds. Use a type from /entity-types. |
is_player_character |
boolean | Optional, characters only. True creates a player character. Omitted or false creates an NPC. |
Unknown fields are rejected. The 201 acknowledgement contains id, kind, name, hidden_from_wiki: true and resource_url in data, plus meta.replayed. Location points to that resource. Read it to get its current data and ETag.
curl -X POST "https://app.saga20.com/api/public/v2/entities" \
-H "Authorization: Bearer $SAGA20_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: greywatch-create-mara-20261001" \
--data '{"kind":"character","name":"Mara Voss","is_player_character":false}'
{
"data": {
"id": "0c1f2a3b-4d5e-4f60-8a7b-9c0d1e2f3a4b",
"kind": "character",
"name": "Mara Voss",
"hidden_from_wiki": true,
"resource_url": "/api/public/v2/entities/character/0c1f2a3b-4d5e-4f60-8a7b-9c0d1e2f3a4b"
},
"meta": {"replayed": false}
}
Edit page details
/api/public/v2/entities/{kind}/{id}Requires campaign:write and both read scopes. Path parameters are the supported kind and UUID id. Accepts no query parameters. Send a JSON object with at least one supported field, a new Idempotency-Key and If-Match from the single-entity GET. In examples, SAGA20_ETAG holds that exact quoted ETag.
| Field | Type | Description |
|---|---|---|
name |
string | Optional. Characters: 1 to 100 characters. Other kinds: 1 to 120. Saga20 trims and collapses whitespace. Character names must pass the campaign's name and alias checks. |
tags |
array of strings | Optional complete replacement. At most 20 supplied tags, each 1 to 40 characters. Saga20 trims and collapses whitespace, removes blanks and deduplicates without regard to case. Send [] to clear. |
status_key |
string or null | Characters only. alive, missing, deceased or null. Also sets the matching label and color, or clears them. |
is_player_character |
boolean | Characters only. Switches between player character and NPC and clears the folder assignment. |
type |
string or null | Locations only. At most 60 characters. Saga20 trims, collapses whitespace and lowercases it. Null or whitespace clears it. |
Faction, item and custom edits accept only name and tags. Unknown fields are rejected. Descriptions use the document routes. The 200 acknowledgement has id, updated_at, resource_url and meta.replayed; follow resource_url for the new ETag.
curl -X PATCH "https://app.saga20.com/api/public/v2/entities/character/a4f1b6d2-0e5c-4b7a-8c33-1d9e2f7a6b50" \
-H "Authorization: Bearer $SAGA20_API_KEY" \
-H "Content-Type: application/json" \
-H "If-Match: $SAGA20_ETAG" \
-H "Idempotency-Key: greywatch-nyra-details-20261001" \
--data '{"tags":["Greywatch","ally"],"status_key":"alive"}'
{
"data": {
"id": "a4f1b6d2-0e5c-4b7a-8c33-1d9e2f7a6b50",
"updated_at": "2026-10-01T08:03:10+00:00",
"resource_url": "/api/public/v2/entities/character/a4f1b6d2-0e5c-4b7a-8c33-1d9e2f7a6b50"
},
"meta": {"replayed": false}
}