Update an existing version

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.storydoc.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Storydoc API MCP server": {
    "url": "https://docs.storydoc.com/mcp"
  }
}

Close
POST /v2/versions/{versionId}

Updates the data in an existing version, keeping the same version and the same link. By default the version's own content is preserved - including any manual edits made to it in the editor - and only the fields you send in data are changed. Pass force: true only to DISCARD those edits and re-render the version from the master story template.

Path parameters

  • versionId string Required

    The ID of the version to update

application/json

Body Required

  • senderEmail string(email) Required

    Email of the sender (must exist in organization)

  • force boolean

    DESTRUCTIVE. Re-renders the version from the master story template and discards any manual edits made to it in the editor. Leave unset to update the version in place, preserving its content.

    Default value is false.

  • data object Required

    Additional properties are allowed.

    Hide data attributes Show data attributes object
    • title string Required

      Title of the version (required)

    • first_name string
    • last_name string
    • company string
    • email string(email)
    • phone string
    • date string

      Date in any format

    • products array[object]

      Array of product objects

      Hide products attributes Show products attributes object
      • name string
      • price number
    • gatedContent object

      Gated content configuration for access control

      Hide gatedContent attributes Show gatedContent attributes object
      • gatedContent boolean

        Enable/disable content gating

      • name boolean

        Show name field in the gate form

      • nameRequired boolean

        Make name field required

      • logoSRC string(uri)

        URL of the logo to display on the gate form

      • title string

        Custom message shown on the gate form

    • _optionalContent object

      Show or hide content the author marked optional in the editor, by entity id: false hides it, true shows it, ids left out show. Only entities listed with toggleable: true in optionalContent are accepted (400 otherwise): the story's (GET /v2/stories/{storyId}?include=optionalContent) when creating, the version's own (GET /v2/versions/{versionId}?include=optionalContent) when updating. On POST /v2/versions/{versionId} only the ids sent change, the version's other choices are kept, and ids sent back with their current value are not checked. Hidden content is not shown to viewers but is still in the page's source, so do not rely on it to keep confidential content from a recipient.

      Hide _optionalContent attribute Show _optionalContent attribute object
      • * boolean Additional properties
    • password string

      Password required to view the version

    • ogImage string(uri)

      Open Graph preview image URL for the version

Responses

  • 200 application/json

    Version updated successfully

    Hide response attributes Show response attributes object
    • url string(uri)

      Public URL for the version

    • shortUrl string(uri)

      Shortened URL for the version

    • editorUrl string(uri)

      URL to edit the version in Storydoc editor

    • versionUrl string(uri)

      URL to view version details in Storydoc platform

    • versionId string

      Unique identifier for the version (only in create response)

  • 400 application/json

    Invalid request

    Hide response attribute Show response attribute object
    • error string
  • 403 application/json

    Authentication failed or token outdated, or the story uses variables above the account's plan (code: VARIABLES_PLAN_REQUIRED)

    Hide response attributes Show response attributes 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.

      Values are pro or team.

    • variables array[object]

      With VARIABLES_PLAN_REQUIRED: the blocked variables and the plan each needs.

      Hide variables attributes Show variables attributes object
      • name string
      • requiredPlan string
  • 404 application/json

    Version not found

    Hide response attribute Show response attribute object
    • error string
  • 429 application/json

    Rate limit exceeded

    Hide headers attributes Show headers attributes
    • x-rate-limit-counter integer

      Current request count

    • x-rate-limit-maximum integer

      Maximum allowed requests

    Hide response attribute Show response attribute object
    • error string
  • 500 application/json

    Internal server error

    Hide response attributes Show response attributes object
    • error string
    • errorId string
POST /v2/versions/{versionId}
curl \
 --request POST 'https://api.storydoc.com/v2/versions/61b1f40a3a86b7a96d0d8ccc' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "senderEmail": "sender@company.com",
  "data": {
    "title": "Updated Sales Presentation",
    "company": "ACME Corporation",
    "first_name": "John",
    "last_name": "Doe"
  }
}'
Request example
{
  "senderEmail": "sender@company.com",
  "data": {
    "title": "Updated Sales Presentation",
    "company": "ACME Corporation",
    "first_name": "John",
    "last_name": "Doe"
  }
}
Response examples (200)
{
  "url": "https://www.storydoc.com/5d7d8922e00d9265/2e91b144-092f-456b-8f2e-0bae9f7f3355",
  "shortUrl": "https://view.storydoc.com/4GdDGt",
  "editorUrl": "https://app.storydoc.com/pages/editor/61b1e50223b713000a41ca74/61b1f40a3a86b7a96d0d8ccc",
  "versionUrl": "https://app.storydoc.com/pages/editor/61b1e50223b713000a41ca74/versions/61b1f40a3a86b7a96d0d8ccc",
  "versionId": "61b1f40a3a86b7a96d0d8ccc"
}
Response examples (400)
The required title field is missing from the data object
{
  "error": "Missing data.title in request body."
}
The sender email is not registered in the organization
{
  "error": "senderEmail email@domain.com not found in this organization"
}
The API key is limited to one story and the version belongs to another
{
  "error": "Token is scoped to storyId 61b1f40a3a86b7a96d0d8ccc, but version 61b1f40a3a86b7a96d0d8ddd belongs to storyId 61b1f40a3a86b7a96d0d8eee"
}
Response examples (403)
{
  "error": "Access denied",
  "code": "VARIABLES_PLAN_REQUIRED",
  "requiredPlan": "pro",
  "variables": [
    {
      "name": "deal_value",
      "requiredPlan": "pro"
    }
  ]
}
Response examples (404)
{
  "error": "Version not found"
}
Response examples (429)
# Headers
x-rate-limit-counter: 42
x-rate-limit-maximum: 42

# Payload
{
  "error": "Too many requests"
}
Response examples (500)
{
  "error": "Error occured",
  "errorId": "550e8400-e29b-41d4-a716-446655440000"
}