- API reference
- Application-level templates
- Return all templates
GET
https://api.us.nylas.com/v3/templatesReturn all templates
Returns a list of application-level templates.
Works with an API key or an IAM API key with the templates.read permission.
Query parameters
The maximum number of objects to return. See Pagination for more information.
Default:
50An identifier that specifies which page of data to return. You can get this value from the
next_cursor response field. See Pagination for more
information.
Example:
[{"id":"template_123","grant_id":"grant_456","app_id":null,"engine":"mustache","name":"Welcome Email","subject":"Welcome {{user.name}}!","body":"<p>Hello {{user.name}}, welcome to our service!</p><p>We're excited to have you on board.</p>","created_at":1640995200,"updated_at":1640995200,"object":"template"},{"id":"template_456","grant_id":"grant_456","app_id":null,"engine":"handlebars","name":"Password Reset","subject":"Reset your password - {{company.name}}","body":"<h1>Password Reset Request</h1><p>Hi {{user.name}},</p><p>Click <a href='{{reset_link}}'>here</a> to reset your password.</p><p>This link expires in {{expiry_hours}} hours.</p>","created_at":1640995300,"updated_at":1640995400,"object":"template"},{"id":"template_789","grant_id":"grant_456","app_id":null,"engine":"handlebars","name":"Order Confirmation","subject":"Order #{{order.number}} confirmed","body":"<h2>Thank you for your order!</h2><p>Order #{{order.number}} has been confirmed.</p><ul>{% for item in order.items %}<li>{{item.name}} - ${{item.price}}</li>{% endfor %}</ul><p>Total: ${{order.total}}</p>","created_at":1640995500,"updated_at":1640995500,"object":"template"}]Array items:
app_idstringnullableThe ID of the Nylas application associated with the template. Returned only if the template is configured at the application level.
Example:
"6c45fe5e-0bb6-41b9-9acc-ccb15bfc51eb"Example:
"<p>Hello {{user.name}}, your booking has been confirmed.</p>"Example:
1640995200