List Templates

GET

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

List Templates

Click Send to get a response

1. Endpoint Details

Endpoint Details

HTTP Method

GET

Endpoint URL

/api/v1/apiwarehouse/templates/all-templates

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 templates per page (default: 12)

searchstring (optional)

Search by comma-separated template IDs or by template name. When searching by name, the search is case-insensitive and uses regex pattern matching.

favoriteboolean (optional)

Filter templates by favorite status (true/false)

4. Example Requests

Basic Request (Default Pagination)

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

With Custom Pagination

Bash
curl --location 'https://api.swellsign.com/api/v1/apiwarehouse/templates/all-templates?page=1&limit=10'
--header 'accept: application/json'
--header 'x-api-key: xWuCfym7ad5f674t3ry7aDpZ3gDJwtE34Ib9raiPEM5xk6IMLBz6gA'

Search by Comma-Separated Template IDs

Bash
curl --location 'https://api.swellsign.com/api/v1/apiwarehouse/templates/all-templates?search=507f1f77bcf86cd799439011,507f191e810c19729de860ea,507f191e810c19729de860eb'
--header 'accept: application/json'
--header 'x-api-key: xWuCfym7ad5f674t3ry7aDpZ3gDJwtE34Ib9raiPEM5xk6IMLBz6gA'

Search by Single Template ID

Bash
curl --location 'https://api.swellsign.com/api/v1/apiwarehouse/templates/all-templates?search=507f1f77bcf86cd799439011'
--header 'accept: application/json'
--header 'x-api-key: xWuCfym7ad5f674t3ry7aDpZ3gDJwtE34Ib9raiPEM5xk6IMLBz6gA'

Search by Template Name (Case-Insensitive)

Bash
curl --location 'https://api.swellsign.com/api/v1/apiwarehouse/templates/all-templates?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 Favorite (true)

Bash
curl --location 'https://api.swellsign.com/api/v1/apiwarehouse/templates/all-templates?favorite=true'
--header 'accept: application/json'
--header 'x-api-key: xWuCfym7ad5f674t3ry7aDpZ3gDJwtE34Ib9raiPEM5xk6IMLBz6gA'

Filter by Favorite (false)

Bash
curl --location 'https://api.swellsign.com/api/v1/apiwarehouse/templates/all-templates?favorite=false'
--header 'accept: application/json'
--header 'x-api-key: xWuCfym7ad5f674t3ry7aDpZ3gDJwtE34Ib9raiPEM5xk6IMLBz6gA'

Combined Filters

Bash
curl --location 'https://api.swellsign.com/api/v1/apiwarehouse/templates/all-templates?search=contract&favorite=true&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:58:37.705Z",
    "__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 templates matching the criteria

totalPagesinteger

Total number of pages available

currentPageinteger

Current page number

itemsOnPageinteger

Number of items returned on this page

itemsarray

Array of template objects

7. Template Object Fields

_idstring

Unique template identifier

namestring

Template name/title

file_urlstring

URL to access the template file

created_bystring

ID of the user who created the template

organizationstring

Organization/company ID that owns the template

is_disabledboolean

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

favoriteboolean

Whether the template is marked as favorite

updated_bystring

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

is_restoreboolean

Whether the template has been restored from archive

createdAtstring

Timestamp when the template was created

updatedAtstring

Timestamp when the template was last updated

__vinteger

Version key (MongoDB versioning field)

latest_versionstring

ID of the latest version of this template (optional)