OrganizationId claim; your data is always isolated to your own organization.
Base URL: https://api.achievemomentum.com/api/companydocs
Document CDN URLs expire after 1 hour. If a URL was generated more than an hour ago, call refresh-url before presenting the link to your users.
Authentication
All endpoints require a valid JWT in theAuthorization header:
Folders
POST /api/companydocs/folders
Creates a new folder in your organization’s document hierarchy. Folders can be nested by supplying aparentId.
Request body
string
required
Folder name. Maximum 255 characters. Cannot contain
/ or \.string
Parent folder ID. Omit or pass
null to create the folder at the root level.Response
object
The created folder.
Example request
Example response
curl example
GET /api/companydocs/folders
Returns all folders in your organization’s document hierarchy.Response
array
Array of folder objects.
curl example
GET /api/companydocs/folders/
Returns a specific folder by its ID.Path parameters
string
required
The folder’s unique identifier.
Response
object
The requested folder object. Shape is identical to the create folder response.
curl example
DELETE /api/companydocs/folders/
Permanently deletes a folder. The folder must be empty — it cannot contain any documents or subfolders.Path parameters
string
required
The folder’s unique identifier.
Response
Returns204 No Content on success.
curl example
Documents
POST /api/companydocs/documents/upload
Uploads a document to your organization’s storage. Send the request asmultipart/form-data. The response includes a signed CDN URL valid for 1 hour.
Request (multipart/form-data)
file
required
The file to upload.
string
Target folder ID. Omit to upload to the root level.
Response
object
The uploaded document record.
curl example
Example response
GET /api/companydocs/documents
Returns all documents in your organization, optionally filtered to a specific folder.Query parameters
string
Filter documents by folder ID. Omit to list all documents across all folders.
Response
array
Array of document objects. Shape is identical to the upload response document object.
curl example — all documents
curl example — documents in a folder
GET /api/companydocs/documents/
Returns metadata for a specific document by its ID. Includes a signed CDN URL valid for 1 hour.Path parameters
string
required
The document’s unique identifier.
Response
object
The document metadata object. Shape is identical to the upload response document object.
curl example
GET /api/companydocs/documents//download
Downloads the raw file content for a specific document. Returns a binary stream with appropriateContent-Type and Content-Disposition headers.
Path parameters
string
required
The document’s unique identifier.
Response
Returns a binary file stream.curl example
PUT /api/companydocs/documents//move
Moves a document to a different folder. Passnull as targetFolderId to move the document to the root level.
Path parameters
string
required
The document’s unique identifier.
Request body
string | null
required
The ID of the destination folder, or
null to move to the root level.Response
Returns204 No Content on success.
curl example
DELETE /api/companydocs/documents/
Permanently deletes a document and removes its file from cloud storage.Path parameters
string
required
The document’s unique identifier.
Response
Returns204 No Content on success.
curl example
POST /api/companydocs/documents/bulk-delete
Deletes up to 100 documents in a single request.Request body
string[]
required
Array of document IDs to delete. Maximum 100 IDs per request.
Response
Returns204 No Content on success.
curl example
POST /api/companydocs/documents/bulk-move
Moves up to 100 documents to a target folder in a single request. Passnull as targetFolderId to move documents to the root level.
Request body
string[]
required
Array of document IDs to move. Maximum 100 IDs per request.
string | null
required
The ID of the destination folder, or
null to move documents to the root level.Response
Returns204 No Content on success.
curl example
POST /api/companydocs/documents//refresh-url
Generates a new signed CDN URL for a document. Use this endpoint when an existing URL has expired (CDN URLs expire after 1 hour) or is about to expire.Path parameters
string
required
The document’s unique identifier.
Response
string
A new signed CDN URL, valid for 1 hour from the time of this request.
Example response
curl example
Statistics
GET /api/companydocs/stats/storage
Returns storage usage statistics for your organization.Response
object
Storage usage summary.
Example response
curl example
Error responses
All endpoints return standard error shapes:400 — Validation error
404 — Not found
500 — Server error