NextSign API
Reference

Template Tags

The {tag} placeholder syntax used in .docx templates — values, conditions, lists, automatic tags and the company logo tag.

Template Tags

NextSign fills .docx templates with data when a document is produced. Anywhere you write a tag in the Word file, the rendered document gets a value instead.

In Word
This agreement is made between {company_name} and {kunde_navn}
on {today}.

Tags are what the tags field of Create a Case from a Document and Forms Submit fills. This page documents the syntax you write in the Word file; the endpoint pages document how to send the values.

Tag names are case-sensitive and must match exactly. A tag with no value renders as empty text — it is never left as {tag} in the output, and never fails the render.


Value tags

A plain tag inserts a value:

{kunde_navn}

Nested values use a dot:

{kunde.adresse}, {kunde.by}

Values submitted through the API are inserted as you send them. Fields filled through a form or the dashboard are formatted according to the field type set in the tag editor — number fields get . as thousands separator, date fields render as DD/MM/YYYY unless the field defines its own format.


Conditional sections

Wrap a block in {#tag}{/tag} to include it only when the value is true:

{#har_bilag}
Appendix A is attached to this agreement.
{/har_bilag}

{^tag}{/tag} is the inverse — included only when the value is false or missing:

{^har_bilag}
No appendices are attached.
{/har_bilag}

If you number your sections manually ("3. Payment", "3.1 Prices"), NextSign renumbers the surviving sections after a conditional section is dropped, so the numbering stays consecutive. Word's own automatic numbering needs no help. Ambiguous documents are left untouched.


Lists

A list value repeats the block between {#tag} and {/tag} once per item:

{#ydelser}
{navn} — {pris} kr.
{/ydelser}

To repeat a table row, put {#ydelser} in the first cell of the row and {/ydelser} in the last cell. The row itself is repeated, not the text inside it.


Automatic tags

These are filled on every render — you never send values for them, and they never appear as fields in the tag editor. Times are in Europe/Copenhagen.

TagValueExample
{today}Today's date31/07/2026
{date}Today's date, ISO2026-07-31
{datetime}Date and time31/07/2026 09:14:22
{time}Time09:14:22
{year}Year2026
{month}Month07
{day}Day of month31
{weekday}Weekday, in Danishfredag
{timestamp}Unix timestamp, seconds1785490126

{@company_logo} inserts the logo of the company the document is produced for — the one uploaded under Dashboard → Company → Details. The same template therefore carries each company's own logo, which is what makes it usable for shared standard documents such as partner agreements.

In Word
{@company_logo_w200_center}

PARTNER AGREEMENT

Note the @, which marks an image tag. Size and alignment are part of the tag name:

TagResult
{@company_logo}150 px wide, aspect ratio preserved
{@company_logo_w200}200 px wide
{@company_logo_h60}60 px high
{@company_logo_200x60}fitted inside a 200 × 60 px box
{@company_logo_w40mm}units: px (default), mm, cm, pt
{@company_logo_w200_center}alignment: left (default), center, right

Suffixes combine in any order: {@company_logo_h60_right}, {@company_logo_40x20mm_center}. The aspect ratio is always preserved — a width and a height together define a box the logo is fitted inside, never stretched to.

An image tag replaces the entire paragraph it sits in, so {@company_logo} must stand alone in its own paragraph (or its own table cell) — not inline in a sentence. For the same reason the paragraph's alignment in the template is not carried over: use the _center / _right suffix instead.

The tag works in the body, in table cells, and in headers and footers. When the company has no logo uploaded, the signature logo is used if one is configured; otherwise the paragraph is simply left empty. Logos uploaded in a format Word cannot embed (SVG, WebP) are converted automatically.


Where to see a template's tags

  • Dashboard — open the document and use its tag editor, or the API guide panel, which generates a pre-filled sample request.
  • APIForms Tags returns the tags a form expects.

Automatic tags and {@company_logo} are deliberately excluded from both — they are filled for you, so they are never fields you need to send.