Reference
What the API returns
Read the visibility rules and the Markdown and text formats used for public session summaries and world entry descriptions.
Your key returns the campaign's public content. The same visibility rules govern list requests and single-record requests.
Visibility rules
A session shows up only when visibility is "public". Processing status and session type play no part in what the API filters, which means a session marked public can show up before its summary exists.
A character, location, faction or item shows up only when hidden_from_wiki is false. These filters still hold when the campaign wiki is turned off.
A private session, a hidden world entry or a record belonging to another campaign gives back the same 404 that a missing record gives. Pull ids from list responses when you want details.
Public content
Saga20 strips the GM-only sections, nested private sections included, before it formats summaries and descriptions. Session transcripts are never included.
Endpoints that list records give back metadata. A response for one session also carries summary_markdown and summary_text. A response for one world entry also carries description_markdown and description_text.
Session summaries
The summary is built from the saved session notes, your edits included. When notes have never been saved, Saga20 falls back to the summary it generated at first.
A saved empty document, or a document holding only GM-only sections, gives back empty summary strings. Saga20 holds on to that saved version and does not fall back to an older summary. World entry descriptions that are empty also give back empty strings.
The example carries only the content fields of a session response.
{
"summary_markdown": "## At Greywatch\n\nNyra found the **cold iron key**.\n\n- The party opened the west gate.",
"summary_text": "At Greywatch\n\nNyra found the cold iron key.\n\n- The party opened the west gate."
}
Markdown from saved notes
The Markdown fields turn saved editor content into the formats listed below. Older summaries kept as Markdown keep the syntax they already have once whitespace is normalized.
| Content | Returned format |
|---|---|
| Headings | Markdown heading markers for levels 1 through 6. |
| Bold | Double-asterisk bold markers. |
| Bulleted lists | Each item starts with - . |
| Numbered lists | Each item starts with 1. . |
| Entity mentions and new entry labels | The displayed name as text. An entity mention uses its alias when present. |
| Tables | Pipe tables with one header row. Extra header rows become body rows, and tables without a header get a blank header. Pipes inside cells are escaped. |
| Images | Markdown images with the caption and image URL. Spaces and parentheses in URLs are encoded. |
| Italic, underline, inline code and color styles | The text remains, with those styles removed. |
| Quotes, code blocks and checklists | Their text, without the editor block formatting. |
| Nested blocks | Child content follows on new lines without indentation. |
Blank lines separate blocks. Saga20 trims lines, collapses repeated spaces and brings three or more newlines down to two.
Text fields
Text fields drop the bold and heading markers and leave out images. List markers and table pipes stay. Other Markdown syntax can stay in older summaries.
Reach for the Markdown field when your tool renders Markdown. Reach for the text field when you want the words with no heading or bold formatting.
For the complete response shapes, browse endpoints.