NextGen APIs

POST /documents/r1/files

Http Verb

POST

Url

/documents/r1/files

Permissions required


Personally Identifiable Information (PII)

No

Sensitive Information

No

Last Modified Version

r1

Released since

2025 W2 (FSM 20.0)

Deprecated since


Removed since


Tech Tags


Business Logic

This API creates a new file.

When a new file 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 validity date intervals and permissions

  2. Data Completion:

    • Completes the file data (type, original name, creation date, etc.)

    • Generates and assigns a unique physical path based on the configured saving strategy

    • Inherits and extends the UUID path from the parent directory

  3. Saving:

    • Saves the file data

    • Creates the necessary file system structure

    • Returns the newly generated file ID

This process ensures that each file is properly stored, traceable, and maintains its relationship with the directory structure while preserving all necessary data.


HOW TO: steps to create a complete file

In order to create a file that contains all the completed information and can be correctly used, you need to follow these steps:

  1. Create your file using this POST

  2. Use the GET /documents/r1/files/upload-urls API to retrieve the upload pre-signed URL

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

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

Header Parameters

Default.

Request Body Parameters

Field

Validations

Note

name

Not Null

Max Length: 200


fileExtension

Not Null

Max Length: 10


startValidityDate



endValidityDate



originId

Not Null


directoryUuid

Not Null

Max Length: 80


draft


deprecated from 2025W3 (FSM 20.0)

Response documentation

Response payload fields

Field

Note

uuid


version


Response error codes

BASE_0001, BASE_0017, SHAREDRESOURCE_001