---
title: "Get Templates"
description: "How to call Get Templates (GET /api/templates) in the Klaviyo REST API: authentication, parameters, request and response bodies, and an example request."
url: "https://developers.klaviyo.com/en/reference/get_templates"
revision: "2026-10-15"
operationId: "get_templates"
method: "GET"
endpoint: "https://a.klaviyo.com/api/templates"
authentication: "privateKey"
scopes: ["templates:read"]
rateLimits: {"burst":"75/s","steady":"750/m"}
revisionHeader: {"name":"revision","required":true}
deprecated: false
openApi: "https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/get_templates.json"
jsonApi: {"fields":{"template":["amp","created","definition","definition.body","definition.body.id","definition.body.properties","definition.body.properties.css_class","definition.body.properties.id","definition.body.sections","definition.body.styles","definition.body.styles.background_color","definition.body.styles.width","definition.id","definition.styles","definition.template_id","editor_type","html","id","name","screenshot_url","text","updated"]},"additionalFields":{"template":["definition"]},"filter":{"id":{"operators":{"list":["any","equals"]},"type":"string"},"name":{"operators":{"list":["any","equals"],"single":["contains","equals"]},"type":"string"},"created":{"operators":{"single":["equals","greater-or-equal","greater-than","less-or-equal","less-than"]},"type":"string<date-time>"},"updated":{"operators":{"single":["equals","greater-or-equal","greater-than","less-or-equal","less-than"]},"type":"string<date-time>"}},"sort":["created","-created","id","-id","name","-name","updated","-updated"],"pagination":{"style":"cursor","defaultPageSize":"10"}}
related: ["https://developers.klaviyo.com/en/reference/templates/llms.txt","https://developers.klaviyo.com/en/reference/get_template.md","https://developers.klaviyo.com/en/reference/create_template.md","https://developers.klaviyo.com/en/reference/update_template.md","https://developers.klaviyo.com/en/reference/delete_template.md","https://developers.klaviyo.com/en/reference/get_template_conversion_jobs.md","https://developers.klaviyo.com/en/reference/get_template_conversion_job.md","https://developers.klaviyo.com/en/reference/create_template_conversion_job.md","https://developers.klaviyo.com/en/reference/render_template.md","https://developers.klaviyo.com/en/reference/clone_template.md","https://developers.klaviyo.com/en/reference/create_template_preview_send_job.md"]
---

# Get Templates

> This is the Markdown version of https://developers.klaviyo.com/en/reference/get_templates

```http
GET https://a.klaviyo.com/api/templates
```

Get all templates in an account.

Use `additional-fields[template]=definition` to include the full template definition for SYSTEM_DRAGGABLE templates.

- Revision header: `revision: 2026-10-15` (required)
- Scopes: `templates:read`
- Rate limits: Burst: `75/s`, Steady: `750/m`
- OpenAPI: [Download this endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/get_templates.json)

## Example request

### curl

```bash
curl --request GET \
     --url 'https://a.klaviyo.com/api/templates' \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'revision: 2026-10-15'
```

### CLI

```bash
klaviyo templates list
```

Sign in first with `klaviyo auth login`. [Install the Klaviyo CLI](https://developers.klaviyo.com/en/docs/klaviyo_cli.md)

### Python

```python
from klaviyo_api import KlaviyoAPI

klaviyo = KlaviyoAPI("your-private-api-key")

response = klaviyo.Templates.get_templates()
```

Install it with `pip install klaviyo-api`. [The Python SDK on GitHub](https://github.com/klaviyo/klaviyo-api-python)

### Node.js

```javascript
import { ApiKeySession, TemplatesApi } from 'klaviyo-api'

const session = new ApiKeySession('your-private-api-key')
const templatesApi = new TemplatesApi(session)

const response = await templatesApi.getTemplates()
```

Install it with `npm install klaviyo-api`. [The Node.js SDK on GitHub](https://github.com/klaviyo/klaviyo-api-node)

### Ruby

```ruby
require 'klaviyo-api-sdk'

KlaviyoAPI.configure do |config|
  config.api_key['Klaviyo-API-Key'] = 'Klaviyo-API-Key your-private-api-key'
end

response = KlaviyoAPI::Templates.get_templates()
```

Install it with `gem install klaviyo-api-sdk`. [The Ruby SDK on GitHub](https://github.com/klaviyo/klaviyo-api-ruby)

### PHP

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

use KlaviyoAPI\KlaviyoAPI;

$klaviyo = new KlaviyoAPI('your-private-api-key');

$response = $klaviyo->Templates->getTemplates();
```

Install it with `composer require klaviyo/api`. [The PHP SDK on GitHub](https://github.com/klaviyo/klaviyo-api-php)

## Query parameters

- `additional-fields[template]` (string[]): Request additional fields not included by default in the response. Supported values: 'definition' Allowed values: `definition`
- `fields[template]` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/reference.md) Allowed values: `amp`, `created`, `definition`, `definition.body`, `definition.body.id`, `definition.body.properties`, `definition.body.properties.css_class`, `definition.body.properties.id`, `definition.body.sections`, `definition.body.styles`, `definition.body.styles.background_color`, `definition.body.styles.width`, `definition.id`, `definition.styles`, `definition.template_id`, `editor_type`, `html`, `id`, `name`, `screenshot_url`, `text`, `updated`
- `filter` (string): For more information please visit [API overview](https://developers.klaviyo.com/en/reference.md)\
  Allowed field(s)/operator(s):\
  `id`: `any`, `equals` (string)\
  `name`: `any`, `contains`, `equals` (string)\
  `created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (date-time)\
  `updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (date-time) Example: `equals(id,['example'])`
- `page[cursor]` (string): For more information please visit [API overview](https://developers.klaviyo.com/en/reference.md)
- `page[size]` (integer): Default: 10. Min: 1. Max: 10.
- `sort` (string): For more information please visit [API overview](https://developers.klaviyo.com/en/reference.md) Allowed values: `created`, `-created`, `id`, `-id`, `name`, `-name`, `updated`, `-updated`

## Headers

- `revision` (string, required): API endpoint revision (format: YYYY-MM-DD[.suffix]) Default: `2026-10-15`

## Responses

### 200: Success

Content type: `application/vnd.api+json`

- `data` (object[], required)
  - `type` (string, required): Allowed values: `template`
  - `id` (string, required): The ID of template
  - `attributes` (object, required)
    - `definition` (object)
      - `id` (string, nullable)
      - `template_id` (string, nullable)
      - `body` (object, required): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/get_templates.json).
      - `styles` (oneOf[], required): When present, must contain exactly one of each style type. Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/get_templates.json).
  - `links` (object, required)
    - `self` (string<uri>, required)
- `links` (object)
  - `self` (string<uri>, required)
  - `prev` (string<uri>)
  - `next` (string<uri>)
- `meta` (object): Response-level metadata
  - `agent_hints` (object): Optional hints emitted by the API for agent callers
    - `next_steps` (string[]): Suggested follow-up actions for agents to take after this response

#### Example response body

```json
{
  "data": [
    {
      "type": "template",
      "id": "string",
      "attributes": {
        "definition": {
          "id": "string",
          "template_id": "string",
          "body": {
            "id": "string",
            "properties": {
              "id": "string",
              "css_class": "string"
            },
            "styles": {
              "background_color": "string",
              "width": 0
            },
            "sections": [
              {
                "id": "string",
                "data_id": "string",
                "universal_id": "string",
                "content_type": "section",
                "type": "section",
                "data": {
                  "properties": {
                    "is_ai_generated": true,
                    "is_prebuilt_content": true
                  },
                  "display_options": {
                    "show_on": "all",
                    "content_repeat": {
                      "repeat_for": "string",
                      "item_alias": "string"
                    },
                    "visibility": {
                      "check": "string",
                      "definition": "string",
                      "is_code_only": true
                    },
                    "layout_type": "string",
                    "layout_config": {}
                  },
                  "styles": {
                    "background_asset_id": "string",
                    "background_color": "string",
                    "background_format": "auto",
                    "background_image_full_width": true,
                    "background_position": "center-bottom",
                    "background_repeat": true,
                    "background_url": "string",
                    "border_color": "string",
                    "border_style": "dashed",
                    "border_width": 0,
                    "column_align": "baseline",
                    "column_direction": "ltr",
                    "content_color": "string",
                    "content_color_type": "none",
                    "inner_padding_bottom": 0,
                    "inner_padding_left": 0,
                    "inner_padding_right": 0,
                    "inner_padding_top": 0,
                    "stack_on_mobile": true
                  }
                },
                "rows": [
                  {
                    "id": "string",
                    "data_id": "string",
                    "data": {
                      "styles": {
                        "column_layout": "1-column-full-width"
                      }
                    },
                    "columns": [
                      {
                        "id": "string",
                        "data_id": "string",
                        "data": {},
                        "blocks": [
                          {
                            "id": "string",
                            "data_id": "string",
                            "universal_id": "string",
                            "content_type": "block",
                            "type": "button",
                            "data": {
                              "content": "string",
                              "properties": {
                                "href": "string"
                              },
                              "display_options": {
                                "show_on": "all",
                                "content_repeat": {
                                  "repeat_for": "string",
                                  "item_alias": "string"
                                },
                                "visibility": {
                                  "check": "string",
                                  "definition": "string",
                                  "is_code_only": true
                                },
                                "layout_type": "string",
                                "layout_config": {}
                              },
                              "styles": {
                                "background_color": "string",
                                "block_background_color": "string",
                                "block_padding_bottom": 0,
                                "block_padding_left": 0,
                                "block_padding_right": 0,
                                "block_padding_top": 0,
                                "border_color": "string",
                                "border_radius": 0,
                                "border_style": "dashed",
                                "border_width": 0,
                                "color": "string",
                                "drop_shadow_color": "string",
                                "font_family": "string",
                                "font_size": 0,
                                "font_style": "italic",
                                "font_weight": "string",
                                "inner_padding_bottom": 0,
                                "inner_padding_left": 0,
                                "inner_padding_right": 0,
                                "inner_padding_top": 0,
                                "letter_spacing": 0,
                                "mobile_stretch_content": true,
                                "stretch": true,
                                "text_align": "center",
                                "text_decoration": "string"
                              }
                            }
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          },
          "styles": [
            {
              "id": "string",
              "style_type": "base-styles",
              "properties": {
                "currency": "string",
                "currency_set_on_template": true,
                "disable_websafe_fonts": true,
                "is_user_draggable": true,
                "mobile_optimizations": true,
                "tip_tap_enabled": true
              },
              "styles": {
                "background_asset_id": "string",
                "background_format": "auto",
                "background_position": "center-bottom",
                "background_repeat": true,
                "background_url": "string",
                "border_color": "string",
                "border_radius": 0,
                "border_style": "dashed",
                "border_width": 0,
                "content_background_color": "string",
                "inner_padding_bottom": 0,
                "inner_padding_left": 0,
                "inner_padding_right": 0,
                "inner_padding_top": 0,
                "margin_top": 0
              }
            }
          ]
        }
      },
      "links": {
        "self": "https://www.example.com"
      }
    }
  ],
  "links": {
    "self": "https://www.example.com",
    "prev": "https://www.example.com",
    "next": "https://www.example.com"
  },
  "meta": {
    "agent_hints": {
      "next_steps": [
        "string"
      ]
    }
  }
}
```

### 4XX: Client Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```

### 5XX: Server Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```
