Documents
Document management operations
Returns all documents accessible to the authenticated user within their organization
Session-based authentication via HTTP-only cookie
List of documents
Unique document identifier
1Document name
Q1 Financial Report.pdfDocument description
Quarterly financial summaryDocument type/format
application/pdfURL to access the document
/uploads/documents/q1-report.pdfUser ID who uploaded the document
5Associated organization ID
Upload timestamp
Not authenticated
Access denied
Server error
GET /api/documents HTTP/1.1
Accept: */*
[
{
"id": 1,
"name": "Q1 Financial Report.pdf",
"description": "Quarterly financial summary",
"type": "application/pdf",
"url": "/uploads/documents/q1-report.pdf",
"uploaderId": 5,
"organizationId": 1,
"createdAt": "2026-01-01T00:00:00.000Z",
"uploader": {
"id": 1,
"username": "text",
"fullName": "text"
},
"projects": [
{
"documentId": 1,
"projectId": 1,
"project": {
"id": 1,
"title": "text"
}
}
]
}
]Creates a new document record
Session-based authentication via HTTP-only cookie
Document name
Contract Draft.docxDocument description
Document type/format
application/vnd.openxmlformats-officedocument.wordprocessingml.documentURL to the document
Organization to associate with
Project to link document to
Document created successfully
Unique document identifier
1Document name
Q1 Financial Report.pdfDocument description
Quarterly financial summaryDocument type/format
application/pdfURL to access the document
/uploads/documents/q1-report.pdfUser ID who uploaded the document
5Associated organization ID
Upload timestamp
Validation error
Not authenticated
Permission denied
Server error
POST /api/documents HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 178
{
"name": "Contract Draft.docx",
"description": "text",
"type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"url": "text",
"organizationId": 1,
"projectId": 1
}{
"id": 1,
"name": "Q1 Financial Report.pdf",
"description": "Quarterly financial summary",
"type": "application/pdf",
"url": "/uploads/documents/q1-report.pdf",
"uploaderId": 5,
"organizationId": 1,
"createdAt": "2026-01-01T00:00:00.000Z"
}Updates an existing document's metadata
Session-based authentication via HTTP-only cookie
Document ID
Document updated successfully
Unique document identifier
1Document name
Q1 Financial Report.pdfDocument description
Quarterly financial summaryDocument type/format
application/pdfURL to access the document
/uploads/documents/q1-report.pdfUser ID who uploaded the document
5Associated organization ID
Upload timestamp
Not authenticated
Permission denied
Document not found
Server error
PATCH /api/documents/{id} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 63
{
"name": "text",
"description": "text",
"type": "text",
"url": "text"
}{
"id": 1,
"name": "Q1 Financial Report.pdf",
"description": "Quarterly financial summary",
"type": "application/pdf",
"url": "/uploads/documents/q1-report.pdf",
"uploaderId": 5,
"organizationId": 1,
"createdAt": "2026-01-01T00:00:00.000Z"
}Returns all documents associated with a specific project
Session-based authentication via HTTP-only cookie
Project ID
List of project documents
Unique document identifier
1Document name
Q1 Financial Report.pdfDocument description
Quarterly financial summaryDocument type/format
application/pdfURL to access the document
/uploads/documents/q1-report.pdfUser ID who uploaded the document
5Associated organization ID
Upload timestamp
Not authenticated
Access denied
Server error
GET /api/documents/{projectId} HTTP/1.1
Accept: */*
[
{
"id": 1,
"name": "Q1 Financial Report.pdf",
"description": "Quarterly financial summary",
"type": "application/pdf",
"url": "/uploads/documents/q1-report.pdf",
"uploaderId": 5,
"organizationId": 1,
"createdAt": "2026-01-01T00:00:00.000Z",
"uploader": {
"id": 1,
"username": "text",
"fullName": "text"
},
"projects": [
{
"documentId": 1,
"projectId": 1,
"project": {
"id": 1,
"title": "text"
}
}
]
}
]Associates a document with a project
Session-based authentication via HTTP-only cookie
Document ID
Project ID
Document linked to project successfully
No content
Not authenticated
Permission denied
Document or project not found
Server error
POST /api/documents/{documentId}/projects/{projectId} HTTP/1.1
Accept: */*
No content
Removes the association between a document and a project
Session-based authentication via HTTP-only cookie
Document ID
Project ID
Document unlinked from project successfully
No content
Not authenticated
Permission denied
Association not found
Server error
DELETE /api/documents/{documentId}/projects/{projectId} HTTP/1.1
Accept: */*
No content
Uploads a file and returns the file URL
Session-based authentication via HTTP-only cookie
The file to upload
File uploaded successfully
URL of the uploaded file
No file uploaded
Not authenticated
Server error
POST /api/upload HTTP/1.1
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17
{
"file": "binary"
}{
"url": "text"
}Last updated
Was this helpful?