List Documents

GET

Retrieve a paginated list of documents with optional filtering, search, and status parameters.

List Documents

Click Send to get a response

1. Endpoint Details

Endpoint Details

HTTP Method

GET

Endpoint URL

/api/v1/apiwarehouse/documents/all-documents

2. Required Headers

acceptapplication/json
x-api-keyYour API authentication key

3. 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)

Bash
curl --location 'https://api.swellsign.com/api/v1/apiwarehouse/documents/all-documents'
--header 'accept: application/json'
--header 'x-api-key: xWuCfym7ad5f674t3ry7aDpZ3gDJwtE34Ib9raiPEM5xk6IMLBz6gA'

With Custom Pagination

Bash
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

Bash
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

Bash
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)

Bash
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)

Bash
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)

Bash
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

Bash
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

Json
{
"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

successboolean

Indicates if the request was successful

totalItemsinteger

Total number of documents matching the criteria

totalPagesinteger

Total number of pages available

currentPageinteger

Current page number

itemsOnPageinteger

Number of items returned on this page

itemsarray

Array of document objects

7. Document Object Fields

_idstring

Unique document identifier

namestring

Document name/title

file_urlstring

URL to access the document file

created_bystring

ID of the user who created the document

organizationstring

Organization/company ID that owns the document

is_disabledboolean

Whether the document is disabled (true) or active (false)

favoriteboolean

Whether the document is marked as favorite

updated_bystring

ID of the user who last updated the document (optional)

is_restoreboolean

Whether the document has been restored from archive

createdAtstring

Timestamp when the document was created

updatedAtstring

Timestamp when last updated

__vinteger

Version key (MongoDB versioning field)

latest_versionstring

ID of the latest version of this document (optional)