List templates
Returns template summaries, newest first, filterable by category, channel, status, project, and search.
GET
Returns template summaries, newest first, filterable by category, channel, status, project, and search. Pass nextCursor back as cursor for the next page; it is null on the last page. Read a template's compiled content, current publication, and input schema with GET /v1/templates/{id}.
apiKeyheader
x-api-key<token>limit?|nullcursor?stringcategory?stringValue in
"transactional""marketing""support""notification""verification""reminder""alert"channel?stringValue in
"sms""whatsapp""email"status?stringValue in
"draft""pending""approved""published""rejected""archived"search?stringprojectId?stringMatch
^tproj_[0-9a-hjkmnp-tv-z]{16,24}$namespaceId?Only the templates this namespace uses: its own and those shared with every namespace (add shared=false for its own only). A namespace-scoped key lists its own namespace's and shared templates.
TemplatePage
application/json- response
items*array<>nextCursor*string|nullimport { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.templates.list({});Example Response
{ "items": [ { "id": "string", "slug": "string", "name": "string", "channel": "sms", "projectId": "string", "namespaceId": "string", "shared": true, "entryPath": "string", "status": "draft", "isActive": true, "publishedAt": "string", "brand": { "slug": "string", "digest": "string", "stale": true }, "fromDefault": { "email": "string", "name": "string" }, "usageCount": 0, "lastUsedAt": "string", "createdAt": "string", "updatedAt": "string" } ], "nextCursor": "string"}