NextSign API
Email Templates

Message Templates

E-mail, SMS and e-Boks templates through the API. What each setting does, the placeholders, SMS length and cost, and e-Boks letters.

A message template is what a case sends to its recipients: the e-mail, the SMS or the e-Boks message. It covers the invitation and the messages that follow it. These are the templates under Skabeloner in the dashboard, and a template made through the API opens and saves there like any other.

EndpointWhat it does
GET /v3/api/message-templatesList your templates
GET /v3/api/message-templates/{id}One template, with every setting
POST /v3/api/message-templatesCreate a template
PATCH /v3/api/message-templates/{id}Change a template
DELETE /v3/api/message-templates/{id}Delete a template
POST /v3/api/message-templates/previewSee the texts as sent, and an SMS's length and cost

The same operations are available on the v2 API and to AI assistants through MCP.

Using a template on a case

Pass the template's id when you create a case (POST /v3/api/cases):

  • E-mail: messageTemplateId on the case.
  • SMS or e-Boks: messageTemplateId on the recipient who is sent by SMS or e-Boks (recipients[].messageTemplateId).

For a one-off wording, write the template into the case request itself as messageTemplate, in the same places. It is saved for that case only and never listed: see A template for this case only. Get shows such a template with caseId, the case it belongs to.

A new template can be used straight away. Templates have no draft: a change is used from the next send of every case, preset, form and mass send that uses the template, including reminders on cases that were sent before.

The shape: type plus one block

A template has a type (email, sms or eboks), a name, a language and one settings block named after its type:

{
  "type": "sms",
  "name": "Signing by SMS",
  "language": "da",
  "sms": {
    "senderName": "LandPlan",
    "body": "Hej {recipient_name}, underskriv {case_name} her: {recipient_url}"
  }
}

Get a template returns the same block with every setting filled in. You can read it, change what you need and send it back with update.

PropertyMeaning
typeemail, sms or eboks. Set when the template is created; it cannot be changed
nameThe template's name in the dashboard, 1–120 characters
languageda, en, de, se or no. The template is written in this language, and texts you leave out use NextSign's standard text in it. Default da

Situations

A case sends more than the invitation. Each template has its own texts for these situations:

SituationSent when
signingThe invitation (the block's main texts)
readA recipient who does not sign (signing: false)
approveAn approver (signing method approve)
reminderA reminder
allSignedEveryone has signed

The texts for these go under situations in the block. A text left empty uses the standard text for that situation in the template's language. For read and approve, an SMS without its own text sends the invitation text.

Standard texts and clearing a text

  • On create, everything you leave out gets the same starting point as a template made in the dashboard. An e-mail template gets the standard e-mail texts in its language, and the company's default sender.
  • On update, only the fields you send change.
  • "" clears a text. A cleared text sends the standard text for it.

E-mail

FieldMeaning
senderNameThe sender name the recipient sees. Default: your company name
senderEmailThe address it comes from: noreply@nextsign.dk, an address on your company's own verified e-mail domain (Indstillinger → Eget domæne), or the address your partner lends you. Anything else is refused with invalid-sender-domain
subjectSubject, up to 300 characters
titleThe heading at the top of the e-mail
bodyThe text, up to 5,000 characters
buttonThe button text, up to 80 characters. The button opens the recipient's signing page
warning, showWarningThe warning under the button (do not share the link)
signingMessage, showSigningMessageWhat happens when everyone has signed
linkHelp, showLinkHelpThe text above the plain link, for when the button does not work
footerThe small print at the bottom of the invitation and the reminders. Empty: the standard text (the mail cannot be answered, the reference id). A reminder footer set in the dashboard wins for reminders. Sent from your own e-mail domain, the mail ends with your footer: NextSign's name and address are left out
allowCustomMessageLet the sender change the text per case in the dashboard, starting from body. A case created through the API sets its own text with settings.message either way
designaccentColor and textColor of the button (#rrggbb), buttonFullWidth, logoWidth in pixels
situationsread, approve, reminder, allSigned: each subject, title, body, button

Formatting. Line breaks are kept. <b>, <strong>, <i>, <em>, <u> and <br> are the only HTML. Any other tag, such as <p>, is shown as text, so the answer warns about it (html-not-kept). Use line breaks for paragraphs. The logo is uploaded in the dashboard.

SMS

FieldMeaning
senderNameThe sender shown on the phone: 1–11 letters or digits, no spaces. Stick to A–Z and 0–9
bodyThe invitation, up to 1,000 characters. Empty: the standard invitation
allowCustomMessageLet the sender change the text per case in the dashboard, starting from body
situationsread, approve, reminder, allSigned: each a body

What is actually sent

The text you write is not the whole SMS:

  1. {placeholders} are filled in. Any e-mail formatting is removed.
  2. The link. {recipient_url} is the recipient's personal short link, such as www.nextsign.dk/r/1a2b3c4d (26 characters; longer on your own signing domain). A text without {recipient_url} gets the link added at the end, after a blank line.
  3. The footer. Every SMS ends with a blank line and Denne besked kan ikke besvares. (33 characters).
  4. A reminder without its own text is Påmindelse on a line of its own, followed by the invitation.

Preview shows the SMS exactly as sent, with its length and cost.

Characters, parts and cost

Phones count an SMS in one of two encodings, and the encoding decides how many characters fit in one SMS:

EncodingOne SMSPer part, when split
GSM-7160 characters153 characters
UCS-270 characters67 characters
  • GSM-7 covers A–Z, digits, common punctuation, and also æ ø å Æ Ø Å ä ö ü é è à ñ ß.
  • € [ ] { } ^ ~ \ | are GSM-7 but count as two characters each.
  • One character outside GSM-7 makes the whole SMS UCS-2, which more than halves what fits in a part. Common ones are emoji, curly quotes (“ ” ‘ ’), the dashes – and —, …, •, and accented letters such as á, ó and ú. Use straight quotes " ' and a hyphen - instead.

Each part costs the SMS price: 0.1 credits per part, unless your agreement says otherwise. A 200-character GSM-7 SMS is 2 parts (0.2 credits). The same text with one emoji is UCS-2 and needs 3 parts.

The answers to create, update and preview report each SMS's encoding, characters, parts and credits, and nonGsmCharacters lists the characters that forced UCS-2.

e-Boks

FieldMeaning
solutionWhat the recipient gets: letter-with-link (your letter, with a button to the documents), letterhead-with-documents (your letter as a front page, followed by the documents) or documents-directly (the documents, no letter)
inboxTitleThe title in the recipient's e-Boks inbox, 4–50 characters. {placeholders} are filled. Required if your company has its own e-Boks integration
buttonThe text of the e-Boks button to the documents, 4–30 characters
hideButtonLeave the button out
buttonExpiry, buttonExpiryDaysHow long the button works in e-Boks: case (as long as the case), days (with buttonExpiryDays, 1–3650) or never
readReceiptnone, optional or required: an opening receipt on the first send. Costs 0.25 credits per send and needs your e-Boks integration set up for receipts
addressBlockdocuments-directly only: print the recipient's address in the envelope window of each document, needed for a paper letter
letterFallbackSend a paper letter when the recipient has no e-Boks
markCompleteOnSendletter-with-link only: mark the case completed when the letter is sent
allowCustomMessage, messageLet the sender write a message per case, starting from message. It fills {custom_message} in the letter
letterThe main letter: used for the invitation and every situation without its own letter. Needed unless documents-directly
situationsread, approve, reminder, allSigned: each enabled (use its own letter), inboxTitle and letter. allSigned also has source: signed (the signed documents), documents (the case's documents) or letter (only the letter)

Letters are Word (.docx) files. On create or update, send one as { "url": "https://…/letter.docx" } (a public http(s) URL) or { "base64": "…" }, with an optional name. null removes a letter. In the letter, write each field as {tag}, with one curly brace on each side and no spaces. A letter with {{ tag }} or { tag } is refused (letter-placeholder-issues), because those are never filled in. See Inbox title and letter for the fields a letter can use, and an e-Boks letter from a template. The letter you get back from a template can be sent back unchanged; it is not fetched again.

The inbox title may use {placeholders}. If one is left unfilled, or the filled title is shorter than 4 characters, the case title is used. A reminder without its own title gets Påmindelse: in front of it (Reminder: in English).

The same rules as the dashboard. A template that would not save in the dashboard is refused with template-invalid and issues. This happens when a letter is missing for the solution, the inbox title or button is missing or too short, or buttonExpiry is days without a number. Settings that do not belong to the chosen solution are dropped on save, as in the dashboard. Switching to documents-directly removes the main letter.

Placeholders

Texts can use these {placeholders}. They are filled in when the message is sent:

PlaceholderValue
{recipient_name}, {recipient_email}, {recipient_phone}The recipient's name, e-mail and phone
{recipient_address}, {recipient_zip}, {recipient_city}The recipient's address
{case_name}, {case_id}, {reference_id}The case title, id and your reference
{company_name}Your company name, or the case's own company name
{sender_name}, {sender_email}, {sender_phone}, {sender_role}The user who sent the case
{recipient_url}SMS only: the recipient's link

Also available are the global fields: your company's details ({company_cvr}, {company_address}, …), the date and time ({today}, {year}, …) and your own custom fields. Any field of the case's documents also works, by its key. A placeholder nothing fills is sent as written, so the answers warn about one that is not a standard placeholder (unknown): it is filled only when the case has a document field with that key. Preview lists every placeholder your company has.

Warnings

Create, update and preview answer with warnings. They are advice, and nothing is refused because of them:

codeMeaning
unknownNot a standard placeholder. Filled only from a document field with that key, otherwise sent as written
double-braces{{ key }} is not a placeholder; suggestion has the right form
spaced{ key } is not a placeholder; suggestion has the right form
link-in-email{recipient_url} is filled only in an SMS. An e-mail and e-Boks carry the link on their button
html-not-keptHTML other than <b> <strong> <i> <em> <u> <br> in an e-mail is shown as text

Each has field (where it is), found and a message.

Permissions

Any of your company's API keys can read and change its templates. A template belongs to the company, so a change is not tied to the user who made the key.