> ## Documentation Index
> Fetch the complete documentation index at: https://usegately.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Template

> Retrieve a single email template by ID.

## Headers

<ParamField header="Authorization" type="string" required>
  `Bearer YOUR_API_KEY`
</ParamField>

## Path Parameters

<ParamField path="id" type="string" required>
  The template ID returned when the template was created.
</ParamField>

## Response

<ResponseField name="id" type="string">Template ID.</ResponseField>
<ResponseField name="name" type="string">Template name.</ResponseField>
<ResponseField name="subject" type="string">Default subject line.</ResponseField>
<ResponseField name="html_content" type="string">HTML body.</ResponseField>
<ResponseField name="text_content" type="string">Plain text body.</ResponseField>
<ResponseField name="category" type="string">Template category.</ResponseField>
<ResponseField name="created_at" type="string">ISO 8601 creation timestamp.</ResponseField>
<ResponseField name="updated_at" type="string">ISO 8601 last-updated timestamp.</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.usegately.com/api/v1/email/templates/tmpl_abc123 \
    -H "Authorization: Bearer gately_YOUR_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    'https://api.usegately.com/api/v1/email/templates/tmpl_abc123',
    { headers: { 'Authorization': 'Bearer gately_YOUR_API_KEY' } }
  );

  const template = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.usegately.com/api/v1/email/templates/tmpl_abc123',
      headers={'Authorization': 'Bearer gately_YOUR_API_KEY'},
  )

  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "id": "tmpl_abc123",
    "name": "Welcome Email",
    "subject": "Welcome to {{project}}, {{name}}!",
    "html_content": "<h1>Hi {{name}},</h1><p>Welcome to <strong>{{project}}</strong>.</p>",
    "text_content": "Hi {{name}}, welcome to {{project}}.",
    "category": "welcome",
    "created_at": "2026-08-02T10:00:00Z",
    "updated_at": "2026-08-02T10:00:00Z"
  }
  ```

  ```json Not found (404) theme={null}
  {
    "error": "Template not found"
  }
  ```
</ResponseExample>
