---
title: "Get detected merge fields for a DOCX template"
method: GET
path: "/api/v1/templates/{id}/merge-fields"
tags: ["Templates"]
---

# Get detected merge fields for a DOCX template

`GET /api/v1/templates/{id}/merge-fields`

## Request

- Base URL: `https://api.korala.ai`
- URL: `https://api.korala.ai/api/v1/templates/{id}/merge-fields`
- Auth: one of:
  - API key in header `X-API-Key`
  - `bearer` (a scheme the document does not define)

Returns the auto-detected {{placeholder}} merge fields from the DOCX template body. Only available for DOCX templates.

## Path parameters

- `id` string, required

## Response `200`

- DetectedMergeFieldDto[]
  - `name` string, required
  - `occurrences` number, required

## Other responses

- `400`: Malformed UUID in path parameter (`id`).

---

[API](https://skmtc.dev/korala/apis/korala-public-api.md) · [All operations](https://skmtc.dev/korala/apis/korala-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/korala/apis/korala-public-api/revisions/5c4d7810c507?raw)
