Search Templates of a type (Read-Only)

GET/api/templates/{type}/search/{keyword}

Turns a template name into a template id. Email templates are matched on template_name and email_subject, ticket templates on title and description, contract and proposal templates on title. Bodies are not returned.

The default page size is 20 rows; send limit to ask for more, up to 500. The cap that was applied comes back in the X-Result-Limit response header, the ceiling in X-Result-Max-Limit, and X-Result-Truncated says whether the cap is what ended the list.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
type String Template type
keyword String Search keywords
limit Number optional Optional page size, 1 to 500. Defaults to 20
curl -X GET "https://yoursite.com/api/templates/lead/search/acme" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
[
  {
    "id": "1",
    "template_name": "login_info",
    "email_subject": "Login details",
    "template_type": "default",
    "language": ""
  }
]

No-Data:

HTTP/1.1 404 Not Found
{ "status": false, "messages": { "error": "No data were found" } }
MethodGET
Path/api/templates/{type}/search/{keyword}
GroupTemplates
Sincev1.0.0
Defined inRestApi/Controllers/TemplatesController.php