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.
Body
Required
-
Email of the sender (must exist in organization)
-
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. -
Who this version is for, e.g. "Jane Doe" (optional). Shown as the reader's name in Analytics. Trimmed; anything past 200 characters is cut.
Maximum length is
200. -
Additional properties are allowed.
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"
}
}'
{
"senderEmail": "sender@company.com",
"data": {
"title": "Updated Sales Presentation",
"company": "ACME Corporation",
"first_name": "John",
"last_name": "Doe"
}
}
{
"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"
}
{
"error": "Missing data.title in request body."
}
{
"error": "senderEmail email@domain.com not found in this organization"
}
{
"error": "Token is scoped to storyId 61b1f40a3a86b7a96d0d8ccc, but version 61b1f40a3a86b7a96d0d8ddd belongs to storyId 61b1f40a3a86b7a96d0d8eee"
}
{
"error": "Access denied",
"code": "VARIABLES_PLAN_REQUIRED",
"requiredPlan": "pro",
"variables": [
{
"name": "deal_value",
"requiredPlan": "pro"
}
]
}
{
"error": "Version not found"
}
# Headers
x-rate-limit-counter: 42
x-rate-limit-maximum: 42
# Payload
{
"error": "Too many requests"
}
{
"error": "Error occured",
"errorId": "550e8400-e29b-41d4-a716-446655440000"
}