---
title: "Get alert template"
method: GET
path: "/api/{org_id}/alerts/templates/{template_name}"
tags: ["Templates"]
---

# Get alert template

`GET /api/{org_id}/alerts/templates/{template_name}`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/alerts/templates/{template_name}`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/alerts/templates/:template_name/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves the configuration and content of a specific alert notification template. Returns the template structure including message format, variable definitions, styling options, and other formatting parameters. Used for reviewing existing templates and understanding notification formats before making modifications.

## Path parameters

- `org_id` string, required
- `template_name` string, required

## Response `200`

Success

- object: One template with where it is referenced.
  - `applies_to` string[], nullable: Kinds the template is meant for; [] is every kind. Absent on update keeps the stored list.
  - `body` string
  - `isDefault` boolean, nullable
  - `isPrebuilt` boolean: True for system-managed prebuilt templates (those whose name starts with `prebuilt_`). The public API refuses updates and deletes for these, so the UI should render them as read-only.
  - `kind` string, nullable: Template kind: "custom" (default) or "content". Absent on write means "unspecified" — create defaults to custom, update preserves the stored kind (sticky-kind rule, design §6.2).
  - `name` string
  - `title` string
  - `type` 'http' | 'email' | 'sns' | 'slack_app'
  - `used_by` UsedBy, required: Where a template is referenced (Data section 2, GET template).
    - `alerts` integer, required
    - `anomaly` integer, required
    - `composites` integer, required
    - `destinations` integer, required
    - `on_call` integer, required
    - `synthetics` integer, required

## Other responses

- `404`: NotFound

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
