Skip to content

Get Template

GET /public/template

Retrieve a paginated list of automation templates.

This endpoint is used to fetch available templates that can be used to configure content automations. It is useful for browsing and selecting templates before creating or configuring an automation.

Endpoint Details

  • Authentication: Basic Auth (Authorization: Basic Base64(AccessKey:SecretKey))
  • Access Tier: Gold+

Parameters

ParameterTypeRequiredDescription
pagenumberYesPage number, starting from 1.
limitnumberYesMaximum items per page.
searchstringNoSearch templates by keyword or name.

Example Request

bash
curl -X GET "https://api.repliz.com/public/template?page=1&limit=20&search=Auto%20Comment" \
  -H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"
javascript
import axios from 'axios';

const response = await axios.get('https://api.repliz.com/public/template', {
  params: {
    page: 1,
    limit: 20,
    search: 'Auto Comment',
  },
  auth: {
    username: 'YOUR_ACCESS_KEY',
    password: 'YOUR_SECRET_KEY',
  },
});

console.log(response.data);
javascript
const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');

const response = await fetch(
  'https://api.repliz.com/public/template?page=1&limit=20&search=Auto%20Comment',
  {
    headers: {
      Authorization: `Basic ${credentials}`,
    },
  },
);

const data = await response.json();
console.log(data);

Response

json
{
  "docs": [
    {
      "_id": "6a912e6c8133bfb870b220d3",
      "name": "Hello",
      "config": {
        "delete": {
          "isActive": true,
          "type": "keyword",
          "keywords": ["Jobless"],
          "prompt": ""
        },
        "reply": {
          "isActive": true,
          "type": "text",
          "text": "Thanks for comment",
          "prompt": "",
          "isIncludeContentContext": false,
          "keyword": {
            "isExactMatch": false,
            "values": []
          },
          "condition": {
            "isActive": false,
            "isExactMatch": false,
            "keywords": []
          },
          "exception": {
            "isActive": false,
            "isExactMatch": false,
            "keywords": []
          },
          "delay": {
            "isActive": false,
            "value": 10,
            "type": "second"
          }
        },
        "like": {
          "isActive": true
        },
        "message": {
          "isActive": true,
          "type": "text",
          "text": "Thanks for comment, here we are",
          "prompt": "",
          "opening": {
            "postback": {
              "isActive": false,
              "text": "",
              "image": "",
              "file": null,
              "button": {
                "type": "postback",
                "title": "",
                "payload": ""
              }
            },
            "additional": {
              "isActive": false,
              "isPreventBeforeFollow": false,
              "text": "",
              "image": "",
              "file": null,
              "button": {
                "type": "postback",
                "title": "",
                "payload": ""
              }
            },
            "webUrl": {
              "text": "",
              "image": "",
              "file": null,
              "buttons": []
            }
          },
          "keyword": {
            "isExactMatch": false,
            "values": []
          },
          "condition": {
            "isActive": false,
            "isExactMatch": false,
            "keywords": []
          },
          "delay": {
            "isActive": false,
            "value": 10,
            "type": "second"
          }
        },
        "story": {
          "isActive": true,
          "type": "text",
          "text": "Like this story?",
          "prompt": "",
          "opening": {
            "postback": {
              "isActive": false,
              "text": "",
              "image": "",
              "file": null,
              "button": {
                "type": "postback",
                "title": "",
                "payload": ""
              }
            },
            "additional": {
              "isActive": false,
              "isPreventBeforeFollow": false,
              "text": "",
              "image": "",
              "file": null,
              "button": {
                "type": "postback",
                "title": "",
                "payload": ""
              }
            },
            "webUrl": {
              "text": "",
              "image": "",
              "file": null,
              "buttons": []
            }
          },
          "keyword": {
            "isExactMatch": false,
            "values": []
          },
          "condition": {
            "isActive": false,
            "isExactMatch": false,
            "keywords": []
          },
          "delay": {
            "isActive": false,
            "value": 10,
            "type": "second"
          }
        },
        "chat": {
          "isActive": true,
          "type": "text",
          "text": "For information, please call a book on website",
          "prompt": "",
          "keyword": {
            "isExactMatch": false,
            "values": []
          },
          "delay": {
            "isActive": false,
            "value": 10,
            "type": "second"
          }
        }
      },
      "userId": "6a55bba8622734cc66f2d7b3",
      "createdAt": "2026-08-28T06:45:00.514Z",
      "updatedAt": "2026-08-28T06:45:00.514Z",
      "__v": 0,
      "id": "6a912e6c8133bfb870b220d3"
    }
  ],
  "totalDocs": 1,
  "limit": 20,
  "totalPages": 1,
  "page": 1,
  "pagingCounter": 1,
  "hasPrevPage": false,
  "hasNextPage": false,
  "prevPage": null,
  "nextPage": null
}
json
{
  "code": 401,
  "message": "unauthorized"
}