NextGen APIs

POST /documents/r1/files/{fileUuid}/versions

Http Verb

POST

Url

/documents/r1/files/{fileUuid}/versions

Permissions required


Personally Identifiable Information (PII)

No

Sensitive Information

No

Last Modified Version

r1

Released since

2026 W3 (FSM 24.0)

Deprecated since


Removed since


Tech Tags


Business Logic

This API creates a new version of an existing files-
When a new file version is created, the system performs several steps:

  1. Validation Phase:

    • Verifies all required fields are present

    • Validates the parent directory exists and is accessible

    • Checks that the referenced file is not deleted and has no pending (inactive) version, since only one pending version is allowed at a time to avoid accumulating dangling versions.

    • Checks validity date intervals

  2. Data Completion:

    • Preserve the identity of the file (uuid)

    • Calculate the next version number based on the highest existing version for this uuid. Using the highest version prevents repeated creations without activation from reusing the same number.

    • Completes the file data (type, etc.)

  3. Saving:

    • Saves the file data

    • Creates the necessary file system structure

    • Returns the newly generated file information (uuid + version)

HOW TO: steps to create a new complete file version

To create a new file version that contains the required information and is usable, follow these steps:

  1. Retrieve you current file using GET /documents/r1/files/{fileUuid}

  2. Create your version using this POST

  3. Use the GET /documents/r1/files/upload-urls API to retrieve the upload pre-signed URL. IMPORTANT: Specify the new version (created in the previous step) as a query parameter to obtain the upload URL for that version

  4. Use the retrieved URL to upload your ‘physical’ file

    • Note: Use PUT method and upload the file in the body

  5. Use POST /documents/r1/files/{fileUuid}/activations to activate the new version and make sure your uploaded ‘physical’ file is aligned with the file you created during step 1.

    • Note: The fileUuid is retrieved by this POST

Header Parameters

Default.

Request Body Parameters

Field

Validations

Note

name

Not Null

Max Length: 200


fileExtension

Not Null

Max Length: 10


startValidityDate



endValidityDate



Response documentation

Response payload fields

Field

Note

uuid


version


Response error codes

BASE_0001, BASE_0017, SHAREDRESOURCE_001, SHAREDRESOURCE_006, SHAREDRESOURCE_007