Search Templates
Search templates by subject, title, or owner. Supports pagination.
GET
/v2/template/search
Query Parameters
search_term string
Term to search for (e.g., 'New Proposal', 'Ryan').
search_by string
Field to search by (e.g., 'subject', 'title', 'owner').
query_amount number
Max results per page (alias for per_page).
page number
Zero-based page index (default 0).
cURl example
curl -X GET 'https://lunarsend.com/api/v2/template/search?search_term=New%20Proposal&search_by=subject&query_amount=20&page=0' \
-H 'x-api-key: $LUNARSEND_API_KEY' \
-H 'Accept: application/json'Response
{
"data": [
{
"owner": "Ryan",
"subject": "A-B Logistics",
"title": "New Proposal",
"last_activity": "2025-07-28T19:29:11.701+00:00",
"id": "579dc4d5-d22f-49bb-b6ba-ef26ef71a85b"
},
{
"owner": "Ryan",
"subject": "AC Repairs",
"title": "New Proposal",
"last_activity": "2025-07-28T19:37:01.745+00:00",
"id": "2eebb1de-5fe8-4c9c-b95f-75147525ba41"
},
{
"owner": "Joshua",
"subject": "Green LLC",
"title": "New Proposal",
"last_activity": "2025-06-27T15:19:00.02874+00:00",
"id": "5fefac58-b163-5c51-a617-85fac5b13fcb"
},
],
"total_count": 3,
"page": 0,
"per_page": 20
}Response Fields
| Field | Type | Status | Format | Notes |
|---|---|---|---|---|
| total_count | int | read-only optional | - | Total templates matching the search; used for pagination. |
| page | int | read-only optional | - | Zero-based page index. |
| per_page | int | read-only optional | - | Results per page. |
| data | object | required | - | - |
| data.id | string (uuid) | read-only optional | uuid | Template ID (UUID). |
| data.owner | string | read-only optional nullable | - | Display name of the template owner. |
| data.subject | string | read-only optional nullable | - | Email subject of the template |
| data.title | string | read-only optional nullable | - | The internal name of the template |
| data.last_activity | ISO 8601 datetime | read-only optional nullable | date-time | Most recent activity timestamp for the template. |