---
title: "Get an overlay template"
method: GET
path: "/templates/overlay/{id}"
tags: ["Overlay templates"]
---

# Get an overlay template

`GET /templates/overlay/{id}`

## Request

- Base URL: `https://api5.optimove.net/content/v1`
- URL: `https://api5.optimove.net/content/v1/templates/overlay/{id}`
- Auth: API key in header `X-API-KEY`

Returns an overlay template with its content.

## Response `200`

The template.

- OverlayTemplateResponse
  - `id` string, uuid, required
  - `campaignTemplateId` integer, required: Id of the template in Optimove campaigns.
  - `name` string, required
  - `folderId` string, uuid, nullable
  - `editorType` 'html' | 'visual', required: Editor the content is built with: - `html`: HTML code editor - `visual`: drag-and-drop editor
  - `payload` OverlayPayload, required
    - `html` string, required: HTML of the overlay. Can use Liquid and customer attributes.
    - `editorData` string, nullable: Editor state of the visual editor. Required when `editorType` is `visual`.
    - `ttlMinutes` integer, nullable: How long the message stays available after it is sent in a scheduled campaign, in minutes (1 hour to 14 days). Leave out to set no TTL, the same as a template saved in the Optimove UI without changing its delivery settings. Returned as `null` when the template was given a fixed expiry date, or no expiry, in the Optimove UI. Updating such a template through the API replaces that expiry with this value.
  - `brandSettings` OverlayBrandSettings[], required
    - `brandId` string, required: Id of a brand from `GET /templates/overlay/brand-lookups`.
  - `code` TemplateCode: Custom code of the block.
    - `header` string, nullable: Reusable Liquid assignments that the block's content can use. Shown as the Workbench in the Optimove UI.
  - `createdAt` string, date-time, required
  - `createdBy` string, required
  - `updatedAt` string, date-time, required
  - `updatedBy` string, required

## Other responses

- `401`: The `X-API-KEY` header is missing or the API key is not valid.
- `403`: The API key doesn't have the admin role, or the tenant isn't allowed to change this item.
- `404`: The template doesn't exist.
- `429`: The tenant's rate limit is reached. Retry after the time in `x-ratelimit-reset`.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/optimove/apis/content-api.md) - [All operations](https://skmtc.dev/optimove/apis/content-api/llms.txt) - [OpenAPI document](https://skmtc.dev/optimove/apis/content-api/revisions/2f4f55f36f0e?raw)
