List Documents
1. Endpoint Details
Endpoint Details
HTTP Method
GET
Endpoint URL
/api/v1/apiwarehouse/documents/all-documents
2. Required Headers
acceptapplication/jsonx-api-keyYour API authentication key3. Query Parameters
pageinteger (optional)Page number for pagination (default: 1)
limitinteger (optional)Number of documents per page (default: 12)
searchstring (optional)Search by comma-separated document IDs or by document name. When searching by name, the search is case-insensitive and uses regex pattern matching.
statusstring or integer (optional)Filter by status. String format: draft, complete, never, sent, pending, expired. Numeric format: 0=draft, 1=complete, 2=never, 3=sent, 4=pending, 5=expired
4. Example Requests
Basic Request (Default Pagination)
curl --location 'https://api.swellsign.com/api/v1/apiwarehouse/documents/all-documents'
--header 'accept: application/json'
--header 'x-api-key: xWuCfym7ad5f674t3ry7aDpZ3gDJwtE34Ib9raiPEM5xk6IMLBz6gA'With Custom Pagination
curl --location 'https://api.swellsign.com/api/v1/apiwarehouse/documents/all-documents?page=1&limit=10'
--header 'accept: application/json'
--header 'x-api-key: xWuCfym7ad5f674t3ry7aDpZ3gDJwtE34Ib9raiPEM5xk6IMLBz6gA'Search by Comma-Separated Document IDs
curl --location 'https://api.swellsign.com/api/v1/apiwarehouse/documents/all-documents?search=507f1f77bcf86cd799439011,507f191e810c19729de860ea,507f191e810c19729de860eb'
--header 'accept: application/json'
--header 'x-api-key: xWuCfym7ad5f674t3ry7aDpZ3gDJwtE34Ib9raiPEM5xk6IMLBz6gA'Search by Single Document ID
curl --location 'https://api.swellsign.com/api/v1/apiwarehouse/documents/all-documents?search=507f1f77bcf86cd799439011'
--header 'accept: application/json'
--header 'x-api-key: xWuCfym7ad5f674t3ry7aDpZ3gDJwtE34Ib9raiPEM5xk6IMLBz6gA'Search by Document Name (Case-Insensitive)
curl --location 'https://api.swellsign.com/api/v1/apiwarehouse/documents/all-documents?search=contract'
--header 'accept: application/json'
--header 'x-api-key: xWuCfym7ad5f674t3ry7aDpZ3gDJwtE34Ib9raiPEM5xk6IMLBz6gA'Note: Name search is case-insensitive. Searching for "contract", "Contract", or "CONTRACT" will all return the same results.
Filter by Status (String Format)
curl --location 'https://api.swellsign.com/api/v1/apiwarehouse/documents/all-documents?status=complete'
--header 'accept: application/json'
--header 'x-api-key: xWuCfym7ad5f674t3ry7aDpZ3gDJwtE34Ib9raiPEM5xk6IMLBz6gA'Filter by Status (Numeric Format)
curl --location 'https://api.swellsign.com/api/v1/apiwarehouse/documents/all-documents?status=1'
--header 'accept: application/json'
--header 'x-api-key: xWuCfym7ad5f674t3ry7aDpZ3gDJwtE34Ib9raiPEM5xk6IMLBz6gA'Combined Filters
curl --location 'https://api.swellsign.com/api/v1/apiwarehouse/documents/all-documents?search=contract&status=complete&page=1&limit=20'
--header 'accept: application/json'
--header 'x-api-key: xWuCfym7ad5f674t3ry7aDpZ3gDJwtE34Ib9raiPEM5xk6IMLBz6gA'5. Example Response
{
"success": true,
"totalItems": 2,
"totalPages": 1,
"currentPage": 1,
"itemsOnPage": 2,
"items": [
{
"_id": "68a9a9e08c9fefbc50e3348f",
"name": "DOH 4359 Template - Clark Salesforce.pdf",
"file_url": "https://ihl-resources.s3.amazonaws.com/686d7644b179e714014d9025/templates/DOH_4359_Template_-_Clark_Salesforce.pdf",
"created_by": "686e00764347ec9cdcd9d8fe",
"organization": "686d7644b179e714014d9025",
"is_disabled": false,
"favorite": true,
"updated_by": "686e00764347ec9cdcd9d8fe",
"is_restore": false,
"createdAt": "2025-08-23T11:45:36.174Z",
"updatedAt": "2025-08-25T07:31:28.873Z",
"__v": 0,
"latest_version": "68a9aae08c9fefbc50e334e1"
},
{
"is_restore": false,
"_id": "68a31c7a463075893466b4cc",
"name": "Example",
"file_url": "https://ihl-resources.s3.amazonaws.com/686d7644b179e714014d9025/templates/aditya_ocr_output.pdf",
"created_by": "686e00764347ec9cdcd9d8fe",
"organization": "686d7644b179e714014d9025",
"is_disabled": true,
"favorite": true,
"createdAt": "2025-08-18T12:28:42.587Z",
"updatedAt": "2025-08-18T12:53:06.603Z",
"__v": 0
}
]
}6. Response Fields
successbooleanIndicates if the request was successful
totalItemsintegerTotal number of documents matching the criteria
totalPagesintegerTotal number of pages available
currentPageintegerCurrent page number
itemsOnPageintegerNumber of items returned on this page
itemsarrayArray of document objects
7. Document Object Fields
_idstringUnique document identifier
namestringDocument name/title
file_urlstringURL to access the document file
created_bystringID of the user who created the document
organizationstringOrganization/company ID that owns the document
is_disabledbooleanWhether the document is disabled (true) or active (false)
favoritebooleanWhether the document is marked as favorite
updated_bystringID of the user who last updated the document (optional)
is_restorebooleanWhether the document has been restored from archive
createdAtstringTimestamp when the document was created
updatedAtstringTimestamp when last updated
__vintegerVersion key (MongoDB versioning field)
latest_versionstringID of the latest version of this document (optional)
