Folders
GET https://leads.qreq.com/api/document-folders
curl --request GET \
--url 'https://leads.qreq.com/api/document-folders' \
--header 'Authorization: Bearer {api_key}'
--url 'https://leads.qreq.com/api/document-folders' \
--header 'Authorization: Bearer {api_key}'
{
"status": "success",
"message": "Document folders retrieved successfully.",
"data": [
{
"id": 1,
"name": "Contracts",
"parent_id": null,
"description": "Client contracts and agreements",
"documents_count": 12,
"created_by": 33,
"created_at": "2025-11-03T08:00:00.000000Z",
"updated_at": "2025-11-03T08:00:00.000000Z"
},
{
"id": 2,
"name": "Invoices",
"parent_id": 1,
"description": null,
"documents_count": 5,
"created_by": 33,
"created_at": "2025-11-03T08:10:00.000000Z",
"updated_at": "2025-11-03T08:10:00.000000Z"
}
]
}
GET https://leads.qreq.com/api/document-folders/{folder_id}
curl --request GET \
--url 'https://leads.qreq.com/api/document-folders/{folder_id}' \
--header 'Authorization: Bearer {api_key}'
--url 'https://leads.qreq.com/api/document-folders/{folder_id}' \
--header 'Authorization: Bearer {api_key}'
{
"status": "success",
"message": "Document folder retrieved successfully.",
"data": {
"id": 1,
"name": "Contracts",
"parent_id": null,
"description": "Client contracts and agreements",
"documents_count": 12,
"documents": [
{
"id": 101,
"name": "Contract - Company A.pdf",
"file_url": "https://cdn.example.com/files/contract_company_a.pdf",
"size": 245760,
"uploaded_by": 33,
"uploaded_at": "2025-11-03T08:05:00.000000Z"
}
],
"created_by": 33,
"created_at": "2025-11-03T08:00:00.000000Z",
"updated_at": "2025-11-03T08:00:00.000000Z"
}
}
POST https://leads.qreq.com/api/document-folders
| Parameter | Einzelheiten | Beschreibung |
|---|---|---|
| name | ErforderlichZeichenfolge | Folder name |
| parent_id | OptionalGanzzahl | Parent folder ID (for nested folders) |
| description | OptionalZeichenfolge | Folder description |
| permissions | OptionalArray | Array of permission rules (e.g. [{"user_id":5,"access":"read"}]) |
curl --request POST \
--url 'https://leads.qreq.com/api/document-folders' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "New Folder", "parent_id": null, "description": "Folder for Q4 proposals", "permissions": [ {"user_id": 5, "access": "read"}, {"user_id": 6, "access": "write"} ] }'
--url 'https://leads.qreq.com/api/document-folders' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "New Folder", "parent_id": null, "description": "Folder for Q4 proposals", "permissions": [ {"user_id": 5, "access": "read"}, {"user_id": 6, "access": "write"} ] }'
{
"status": "success",
"message": "Document folder created successfully.",
"data": {
"id": 10,
"name": "New Folder",
"parent_id": null,
"description": "Folder for Q4 proposals",
"documents_count": 0,
"created_by": 33,
"created_at": "2025-11-03T09:00:00.000000Z",
"updated_at": "2025-11-03T09:00:00.000000Z"
}
}
PUT https://leads.qreq.com/api/document-folders/{folder_id}
curl --request PUT \
--url 'https://leads.qreq.com/api/document-folders/{folder_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Renamed Folder", "description": "Updated description" }'
--url 'https://leads.qreq.com/api/document-folders/{folder_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Renamed Folder", "description": "Updated description" }'
{
"status": "success",
"message": "Document folder updated successfully.",
"data": {
"id": 10,
"name": "Renamed Folder",
"description": "Updated description",
"updated_at": "2025-11-03T09:10:00.000000Z"
}
}
DELETE https://leads.qreq.com/api/document-folders/{folder_id}
curl --request DELETE \
--url 'https://leads.qreq.com/api/document-folders/{folder_id}' \
--header 'Authorization: Bearer {api_key}'
--url 'https://leads.qreq.com/api/document-folders/{folder_id}' \
--header 'Authorization: Bearer {api_key}'
{
"status": "success",
"message": "Document folder deleted successfully."
}