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
Folder name. Maximum 255 characters. Cannot contain
/ or \.Parent folder ID. Omit or pass
null to create the folder at the root level.Response
The created folder.
Example request
Example response
curl example
GET /api/companydocs/folders
Returns all folders in your organization’s document hierarchy.Response
Array of folder objects.
curl example
GET /api/companydocs/folders/
Returns a specific folder by its ID.Path parameters
The folder’s unique identifier.
Response
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
The folder’s unique identifier.
Response
Returns204 No Content on success.
| Status | Description |
|---|---|
204 | Folder deleted successfully. |
400 | Folder is not empty. |
404 | Folder not found. |
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)
The file to upload.
Target folder ID. Omit to upload to the root level.
Response
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
Filter documents by folder ID. Omit to list all documents across all folders.
Response
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
The document’s unique identifier.
Response
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
The document’s unique identifier.
Response
Returns a binary file stream.| Header | Value |
|---|---|
Content-Type | Document MIME type (e.g. application/pdf) |
Content-Disposition | attachment; filename="document.pdf" |
Content-Length | File size in bytes |
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
The document’s unique identifier.
Request body
The ID of the destination folder, or
null to move to the root level.Response
Returns204 No Content on success.
| Status | Description |
|---|---|
204 | Document moved successfully. |
400 | Invalid operation. |
404 | Document or target folder not found. |
curl example
DELETE /api/companydocs/documents/
Permanently deletes a document and removes its file from cloud storage.Path parameters
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
Array of document IDs to delete. Maximum 100 IDs per request.
Response
Returns204 No Content on success.
| Status | Description |
|---|---|
204 | All specified documents deleted. |
400 | Validation error (e.g. more than 100 IDs supplied, or an empty array). |
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
Array of document IDs to move. Maximum 100 IDs per request.
The ID of the destination folder, or
null to move documents to the root level.Response
Returns204 No Content on success.
| Status | Description |
|---|---|
204 | All specified documents moved. |
400 | Validation error (e.g. more than 100 IDs, or target folder not found). |
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
The document’s unique identifier.
Response
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
Storage usage summary.
Example response
curl example
Error responses
All endpoints return standard error shapes:400 — Validation error
404 — Not found
500 — Server error