Update an existing version
Updates the data in an existing version. Use the force parameter to override versions that have been manually edited.
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 '{"data":{"title":"Updated Sales Presentation","company":"ACME Corporation","last_name":"Doe","first_name":"John"},"senderEmail":"sender@company.com"}'
Request example
{
"data": {
"title": "Updated Sales Presentation",
"company": "ACME Corporation",
"last_name": "Doe",
"first_name": "John"
},
"senderEmail": "sender@company.com"
}
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)
Missing data.title
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 version has been manually edited and cannot be updated without force flag
{
"error": "The version has been edited. Use force=true to override the changes."
}
Response examples (403)
{
"error": "Access denied"
}
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"
}