Browse the gallery

GET /api/v1/template-gallery Models come in gallery order — position, then name.
json
{
  "success": true,
  "data": [
    {
      "id": "…",
      "name": "Plain letter",
      "description": "A one-column letter",
      "defaultSubject": "News of the month",
      "content": "<html>…</html>",
      "previewImageUrl": "https://…/plain-letter.png",
      "colorScheme": "fixed",
      "position": 3,
      "createdAt": "…",
      "updatedAt": "…"
    }
  ],
  "pagination": {"total": 1, "page": 1, "limit": 20, "totalPages": 1}
}
colorScheme is read from the HTML on every request, never stored: adaptive means the model carries its own dark mode rules, fixed means it looks the same everywhere. If you edit your copy later, that answer is about the model you started from — not about what you made of it.

Authorization

Role in the organizationThis endpoint
OWNERAllowed
ADMINAllowed
MEMBERAllowed
A key carries the role its creator holds in this organization — never a role on AgentsMail itself. See API keys.

Query parameters

ParameterTypeDescription
pagenumberDefaults to 1
limitnumberDefaults to 20, capped at 100

Example

bash
curl -H "x-api-key: $AGENTMAIL_API_KEY" \
  "https://www.agentsmail.io/api/v1/template-gallery"

Response

  • 200 OK — the call succeeded.
  • 401 Unauthorized — missing or invalid key, or its owner left the organization.
  • 429 Too Many Requests — over 120 requests in a minute for this key.

Response fields

FieldTypeDescription
successbooleanIndicates if the operation was successful
data[].idstringUnique identifier for the design
data[].namestringIts name
data[].defaultSubjectstringSubject it ships with
data[].thumbnailUrlstringnull
paginationobject{total, page, limit, totalPages}

Example response

json
{
  "success": true,
  "data": [
    {
      "id": "4d19c0a2",
      "name": "Newsletter",
      "defaultSubject": "August news",
      "thumbnailUrl": "value"
    }
  ],
  "pagination": {
    "total": 1,
    "page": 1,
    "limit": 20,
    "totalPages": 1
  }
}