stories

Get all variables of a story

Everything needed to fill a story's variables when creating versions: the dynamic variables manifest, the story's repeatable-content groups (as a tree of fields with example rows), and a ready-to-edit payloadExample for the data object of POST /v2/versions. A repeatable group is sent as an array of row objects under its key; nested groups sit inside their parent row under the child key. Fields flagged generated: true (AI, calculations) are produced by Storydoc and should not be sent.

get/v2/stories/{storyId}/variables

Request

  • Base URL
    https://api.storydoc.com
  • Auth
    HTTP bearer

Path parameters

storyIdstring required
Example:61b1e50223b713000a41ca74

The ID of the story

Response

Variables retrieved successfully

storyIdstring
titlestring
dynamicVariablesobject[]

The story's variables manifest (same shape as dynamicVariables on GET /v2/stories/{storyId})

payloadExampleobject

A complete example data object for POST /v2/versions: variable defaults, two example rows per group, and _optionalContent with every toggleable entity shown

Example response

{
  "repeatables": [
    {
      "key": "team",
      "name": "Team members",
      "fields": [
        {
          "key": "name",
          "name": "Name",
          "type": "input"
        }
      ]
    }
  ],
  "optionalContent": [
    {
      "id": "Xk2pQ9rLm4Tz7aBcD1eF",
      "name": "Pricing",
      "type": "slide",
      "slideIndex": 4,
      "slideTitle": "Pricing",
      "rule": {
        "variable": "industry",
        "value": "Retail"
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.