Path Parameters
The ID or alias of the template to get.
Copy
Ask AI
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
await resend.templates.get('34a080c9-b17d-4187-ad80-5af20266e535');
Copy
Ask AI
{
"object": "template",
"id": "34a080c9-b17d-4187-ad80-5af20266e535",
"current_version_id": "b2693018-7abb-4b4b-b4cb-aadf72dc06bd",
"alias": "reset-password",
"name": "reset-password",
"created_at": "2023-10-06T23:47:56.678Z",
"updated_at": "2023-10-06T23:47:56.678Z",
"status": "published",
"published_at": "2023-10-06T23:47:56.678Z",
"from": "John Doe <john.doe@example.com>",
"subject": "Hello, world!",
"reply_to": null,
"html": "<h1>Hello, world!</h1>",
"text": "Hello, world!",
"variables": [
{
"id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
"key": "user_name",
"type": "string",
"fallback_value": "John Doe",
"created_at": "2023-10-06T23:47:56.678Z",
"updated_at": "2023-10-06T23:47:56.678Z"
}
],
"has_unpublished_versions": true
}