Docs
API · templates

List templates

Return the saved templates in a project, newest first. Cursor-paginated like every list endpoint.

GET/v1/templates

Results are scoped to the project resolved from your key (or the X-Drin-Product header for account-wide keys).

01 Query parameters

limitintegerOptional
Page size, 1100. Defaults server-side.
cursorstringOptional
The nextCursor from a previous response. Omit for the first page; when nextCursor is null you've reached the end. See Pagination.

02 Request

curl "https://api.drin.run/v1/templates?limit=20" \
  -H "Authorization: Bearer $DRIN_API_KEY"

03 Response

A cursor page of template objects.

200 OK
{
  "data": [
    {
      "id": "tmpl_8XQ2k9",
      "slug": "order-receipt",
      "name": "Order Receipt",
      "subject": "Receipt {{orderId}}",
      "html": "<p>Hi {{firstName}}, thanks for your order.</p>",
      "text": null,
      "variables": ["firstName", "orderId"],
      "createdAt": "2026-06-02T10:00:00.000Z",
      "updatedAt": "2026-06-02T10:00:00.000Z"
    }
  ],
  "nextCursor": null
}