> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.recnote.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom templates & metadata

> Shape the generated note to your own structure.

Alongside the audio (or transcript) you can pass metadata that controls how the
note is generated. This applies to every note-producing endpoint:
`/api/v1/notes` and `/api/v1/sessions/:id/notes`.

## Parameters

| Field               | Type          | Description                                                                                                             |
| ------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `language`          | string        | Output language. `sv`, `en`, `fi`, `nb`, `da`, `de`, `tr`, `ar`. Default `sv`.                                          |
| `templateSections`  | string (JSON) | A template structure that defines the sections the note must contain. When provided, the note is generated to match it. |
| `template`          | string        | Id of a template registered with Recnote (alternative to inline `templateSections`).                                    |
| `sideNote`          | string        | Free-text context appended to the transcript before generation (e.g. clinician notes).                                  |
| `primaryProfession` | string        | Profession context that tunes terminology (e.g. physician, dentist, physiotherapist).                                   |
| `customTemplate`    | string        | A free-form custom template body, if you don't use structured sections.                                                 |

## Inline template structure

`templateSections` is a JSON array describing the sections. Each section has a
name and AI rules controlling whether it is auto-filled. Pass it as a string:

```bash theme={null}
curl -X POST https://api.recnote.ai/api/v1/notes \
  -H "Authorization: Bearer $RECNOTE_API_KEY" \
  -F "file=@consultation.wav" \
  -F "language=sv" \
  -F 'templateSections=[
        {"sectionName":"Anamnes","aiRules":{"autoFill":true}},
        {"sectionName":"Status","aiRules":{"autoFill":true}},
        {"sectionName":"Bedömning","aiRules":{"autoFill":true}},
        {"sectionName":"Åtgärd","aiRules":{"autoFill":true}}
      ]'
```

The returned `note.sections` array mirrors your structure, each entry carrying
the generated `content` for that section, plus a `combined` field with the full
note rendered as text.

## When no template is given

If you omit `template` and `templateSections`, the note is generated with the
default SOAP structure (reason for visit, subjective, objective, assessment,
plan, diagnoses).

## JSON body alternative

When sending a transcript (no audio), pass the same fields as JSON:

```json theme={null}
{
  "transcript": "...",
  "language": "sv",
  "templateSections": "[{\"sectionName\":\"Anamnes\",\"aiRules\":{\"autoFill\":true}}]",
  "primaryProfession": "physician"
}
```
