---
title: "Get a case template by ID"
method: GET
path: "/api/cases/templates/{template_id}"
tags: ["cases"]
---

# Get a case template by ID

`GET /api/cases/templates/{template_id}`

**Spaces method and path for this operation:**

<div><span class="operation-verb get">get</span>&nbsp;<span class="operation-path">/s/{space_id}/api/cases/templates/{template_id}</span></div>

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Returns the details of a case template. Requires the Cases feature to be enabled in the space.

## Path parameters

- `template_id` string, required

## Query parameters

- `version` integer

## Response `200`

Indicates a successful call.

- CasesTemplateV2Response — A case template (v2).
  - `author` string — The username of the template author.
  - `definition` unknown, required
  - `definitionString` string, required — The raw YAML definition string.
  - `deletedAt` string, date-time, nullable, required — The date the template was soft-deleted, or null if active.
  - `description` string — A human-readable description of the template.
  - `fieldCount` integer — The number of fields defined in the template.
  - `fieldDefinitions` object[] — Metadata about each field defined in the template.
    - `control` string, required
    - `label` string, required
    - `name` string, required
    - `type` string, required
  - `isDefault` boolean — Whether this is the default template for its owner.
  - `isEnabled` boolean — Whether the template is enabled.
  - `isLatest` boolean, required — Whether this is the latest version of the template.
  - `lastUsedAt` string, date-time — The date the template was last used to create a case.
  - `latestVersion` integer, required — The latest version number of this template.
  - `name` string, required — The display name of the template.
  - `owner` string, required — The owning solution (e.g. cases, observability, securitySolution).
  - `tags` string[] — The words and phrases that help categorize templates. It can be an empty array.
  - `templateId` string, required — The unique identifier of the template, shared across all versions.
  - `templateVersion` integer, required — The version number of this template revision.
  - `usageCount` integer — The number of times this template has been used to create a case.

## Other responses

- `401` — Authorization information is missing or invalid.
- `404` — The template was not found.

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
