Api Reference

Storyforms

Retrieve the complete structure of a Storyform within the Subtxt Narrative Framework, including detailed IDs for Transits, Perspectives, Progressions, and Events.

The Subtxt Narrative Framework supports writers and developers by mapping out the thematic and structural foundations of a narrative, enabling richer, more cohesive storytelling. With the Storyform endpoint, users can integrate these insights directly into their applications, allowing for an in-depth look at the underlying narrative structure and its thematic components. This resource is especially useful for visualizing how each part of the story interrelates, making it easier to build or analyze the thematic integrity and progression within a story.

Using the Storyform Endpoint

To retrieve a Storyform’s structure, submit a POST request to the Storyform endpoint. The request requires specifying the unique Storyform identifiers, and the response details each Throughline's Perspectives, Storybeats, and Events, helping clarify the narrative’s thematic and structural flow.

API Endpoint

URL: https://api.subtxt.app/api/v1/storyform

Parameters

The storyform endpoint requires two parameters:

ParameterTypeDescription
structure_idstringThe unique identifier for the Storyform structure you wish to retrieve.
user_idstringThe ID of the user requesting the Storyform data. Required for authorizing access to the requested Storyform.

Request Example

To fetch a Storyform, send a POST request with the following structure:

Terminal
curl -X POST https://api.subtxt.app/api/v1/storyform \
-H "Authorization: Bearer your-token-here" \
-H "Content-Type: application/json" \
-d '{
        "structure_id": "your-structure-id",
        "user_id": "your-user-id"
    }'

Sample Response

A successful request will return the Storyform details, structured by Throughline and listing associated IDs for each element, such as Transits, Perspectives, Progressions, and Events.

{
    "meta": {
        "id": "struct_8criGysEh5FMQqikjWPFHREw",
        "title": "William's Snowman",
        "author": "Jim"
    },
    "objective_story": {
        "perspectives": {
            "id": "persp_BIhRXvP0Mn5gWqicDQYxpSlB",
            "title": "Building the snowman",
            "storytelling": "...",
            "context": "Objective Story"
        },
        "players": [
            {
                "id": "player_sNqQ3rgj3uizF5mV6pxuEDBI",
                "name": "William",
                "role": "young kid",
                "storytelling": "...",
                "elements": [...]
            }
        ],
        "storypoints": [...],
        "storybeats": [...],
        "overviews": [...]
    },
    "main_character": {
        "perspectives": [...]
    },
    "obstacle_character": {
        "perspectives": [...]
    },
    "relationship_story": {
        "perspectives": [...]
    }
}

In this response, each Throughline displays its key Storyform components, including Perspectives, Storypoints, Storybeats, and Overviews, offering a complete map of the Storyform’s thematic structure.


Copyright © 2017-2024