# Update an existing version **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. ## Servers - Production API server: https://api.storydoc.com (Production API server) ## Authentication methods - Bearer auth ## Parameters ### Path parameters - **versionId** (string) The ID of the version to update ### Body: application/json (object) - **senderEmail** (string(email)) 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. - **data** (object) ## Responses ### 200 Version updated successfully #### Body: application/json (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 Invalid request #### Body: application/json (object) - **error** (string) ### 403 Authentication failed or token outdated, or the story uses variables above the account's plan (`code: VARIABLES_PLAN_REQUIRED`) #### 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 Version not found #### Body: application/json (object) - **error** (string) ### 429 Rate limit exceeded #### Headers - **x-rate-limit-counter** (integer) Current request count - **x-rate-limit-maximum** (integer) Maximum allowed requests #### 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)