---
title: "Get a template"
method: GET
path: "/api/templates/{id}"
tags: ["Templates"]
---

# Get a template

`GET /api/templates/{id}`

## Request

- Base URL: `https://core-api.getaptly.com`
- URL: `https://core-api.getaptly.com/api/templates/{id}`
- Auth: one of:
  - API key in header `x-token`
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/getaptly/apis/aptly-api/docs/api/templates/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns a single template by its ID. The template must belong to the authenticated company.

## Path parameters

- `id` string, required

## Query parameters

- `companyId` string

## Response `200`

Template record.

- object
  - `data` Template
    - `_id` string: Template ID.
    - `companyId` string: Company the template belongs to.
    - `name` string: Template display name.
    - `templateType` 'sms' | 'email' | 'form' | 'eSignature' | 'pdf' | 'blockDocument': Template category.
    - `archived` boolean
    - `createdAt` string, date-time
    - `createdBy` string: User ID of the creator.
    - `updatedAt` string, date-time

## Other responses

- `401`: Invalid or missing credential.
- `404`: Template not found.

---

[API](https://skmtc.dev/getaptly/apis/aptly-api.md) - [All operations](https://skmtc.dev/getaptly/apis/aptly-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getaptly/apis/aptly-api/revisions/75c367e0b8e5?raw)
