# Get all variables of a story **GET /v2/stories/{storyId}/variables** 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. ## Servers - Production API server: https://api.storydoc.com (Production API server) ## Authentication methods - Bearer auth ## Parameters ### Path parameters - **storyId** (string) The ID of the story ## Responses ### 200 Variables retrieved successfully #### Body: application/json (object) - **storyId** (string) - **title** (string) - **dynamicVariables** (array[object]) The story's variables manifest (same shape as `dynamicVariables` on GET /v2/stories/{storyId}) - **repeatables** (array[object]) Root repeatable-content groups; each group's rows are sent as `data[key] = [row, …]` - **payloadExample** (object) A complete example `data` object for POST /v2/versions: variable defaults plus two example rows per group ### 400 Missing storyId, or the API token is invalid, revoked or inactive #### Body: application/json (object) - **error** (string) ### 403 Authentication failed, missing token, or token scoped to another story #### Body: application/json (object) - **error** (string) - **code** (string) `VARIABLES_PLAN_REQUIRED` when the story uses variables above the account's plan; absent for authentication failures. - **requiredPlan** (string) With `VARIABLES_PLAN_REQUIRED`: the lowest plan that covers every blocked variable. - **variables** (array[object]) With `VARIABLES_PLAN_REQUIRED`: the blocked variables and the plan each needs. ### 404 Story not found #### Body: application/json (object) - **error** (string) ### 429 Rate limit exceeded #### Body: application/json (object) - **error** (string) ### 500 Internal server error #### Body: application/json (object) - **error** (string) - **errorId** (string) [Powered by Bump.sh](https://bump.sh)