Update invoice settings
Partially updates invoice-specific settings including language, reminder fees, interest rates, and custom text templates. Only provided fields are updated; omitted fields remain unchanged.
What can be updated:
- Invoice language
- Reminder fee settings (enable/disable, amount)
- Interest settings (enable/disable, base rate, rate)
- Custom text templates (accepts HTML or Markdown)
Settings behavior:
- Setting a value to
nullwill use the parent setting (organization or workspace default) - Custom texts can be provided as HTML or Markdown and will be converted to internal format
- Empty custom texts are treated as null (uses defaults)
Custom text templates:
All custom text fields support invoice variables (e.g., #invoiceNumber, #projectName, #clientCompanyName). See the invoice text variables documentation for a complete list of available variables.
What is returned: Updated invoice settings with custom texts returned as HTML.
PATCH
/billing/invoices/{id}/settingsAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstring<uuid>requiredInvoice ID (UUID)
Query parameters
fieldsToReturnstringComma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestringAdvanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
compactfullHeader parameters
LT-Response-ShapestringAdvanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
fullRequest body
requiredapplication/jsonInvoice settings to update (all fields optional)
baseInvoiceInterestobject | nullBase invoice interest rate percentage (0-1000)
customTextsobjectCustom invoice text templates. Content can be provided as HTML or Markdown and will be converted to internal format.
Show propertiesHide properties
cancelationBodyobject | nullAccepts Markdown or HTML for complex formatting. This content is rendered by the Leadtime rich editor, not by a plain Markdown viewer.
For quick/simple text, Markdown is acceptable. For polished user-facing content from an agent or integration, prefer structured HTML because it preserves editor blocks, links, and layout more predictably.
Use only the nodes and marks documented below for this field. Supported editor features differ by endpoint and field. Choose formatting for readability, not decoration: use headings for real sections, paragraphs for narrative text, lists or tables for structured facts, blockquotes for quoted context, callouts for important outcomes/risks/notes when supported, and explicit anchors for links. Do not rely on bare URLs or Markdown links when the link must be clickable; use explicit anchors such as <a href="https://example.com" target="_blank" rel="noopener noreferrer nofollow">link text</a>.
In HTML you can use:
## Node Types and Marks
### Nodes
**paragraph**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Default paragraph. extraPlaceholder is an internal structure for the editor to show a ghost placeholder in empty “template” lines (ProseMirror JSON fragment or null). For normal agent output leave extraPlaceholder as null. Only set it if you are intentionally mirroring a field placeholder the user already has in the open editor; do not set random placeholder data for free-form answers.
Atts:
- extraPlaceholder: null
```html
<p class="paragraph-base" extraplaceholder="null/some-value"></p>
```
**heading**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Atts:
- level: 1
```html
<h1 class="heading-base"></h1>
```
**bulletList**
Type: block list
Content: listItem+
Atts: none
```html
<ul class="list-base"><li></li></ul>
```
**hardBreak**
Type: inline
Atts: none
```html
<br>
```
**horizontalRule**
Type: block
Atts: none
```html
<hr class="hr-base">
```
**orderedList**
Type: block list
Content: listItem+
Atts:
- start: 1
- type: null
```html
<ol class="order-list-base" type="null/some-value"><li></li></ol>
```
**listItem**
Content: (paragraph|list)* (paragraphs and/or lists, in any order)
Atts: none
```html
<li></li>
```
**blockquote**
Type: block
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Atts: none
```html
<blockquote class="blockquote-base"><p class="paragraph-base"></p></blockquote>
```
**variable**
Type: inline
Document/template variable token (span with data-type="variable" and data-id).
- id: Variable key, often scoped (e.g. currentUser.firstName, project.name). Only use keys that exist for the document type you are in; product docs list the allowed variable ids. Do not invent new variable names in HTML for production templates.
Atts:
- id: null
```html
<span data-type="variable" data-id="null/some-value" id="null/some-value"></span>
```
### Marks
**link**
Atts:
- href: null
- target: _blank
- rel: noopener noreferrer nofollow
- class: null
- title: null
```html
<a target="_blank" rel="noopener noreferrer nofollow" href="">link text example</a>
```
**bold**
Atts: none
```html
<strong>bold text example</strong>
```
**code**
Atts: none
```html
<code>code text example</code>
```
**italic**
Atts: none
```html
<em>italic text example</em>
```
**strike**
Atts: none
```html
<s>strike text example</s>
```
**underline**
Atts: none
```html
<u>underline text example</u>
```
## Available Template Variables
You can use the following variables in your invoice text templates. Variables are represented as HTML spans:
`invoiceNumber`, `projectName`, `projectShortName`, `clientCompanyName`, `contactPerson`, `invoiceNetto`, `invoiceTotal`, `fullTotal`, `accountNumber`, `dueDate`, `invoiceDate`, `reminderPenalty`, `interestPercent`, `senderNameAndPosition`, `senderName`, `senderPosition`, `overdueInterestPercent`, `overdueInterestDays`, `todayDate`, `dearCustomer`, `signature`
**Example HTML**: `<span data-type="variable" data-id="invoiceNumber">INV-2024-001</span>`, `<span data-type="variable" data-id="clientCompanyName">ACME Corp</span>`
firstReminderFooterobject | nullAccepts Markdown or HTML for complex formatting. This content is rendered by the Leadtime rich editor, not by a plain Markdown viewer.
For quick/simple text, Markdown is acceptable. For polished user-facing content from an agent or integration, prefer structured HTML because it preserves editor blocks, links, and layout more predictably.
Use only the nodes and marks documented below for this field. Supported editor features differ by endpoint and field. Choose formatting for readability, not decoration: use headings for real sections, paragraphs for narrative text, lists or tables for structured facts, blockquotes for quoted context, callouts for important outcomes/risks/notes when supported, and explicit anchors for links. Do not rely on bare URLs or Markdown links when the link must be clickable; use explicit anchors such as <a href="https://example.com" target="_blank" rel="noopener noreferrer nofollow">link text</a>.
In HTML you can use:
## Node Types and Marks
### Nodes
**paragraph**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Default paragraph. extraPlaceholder is an internal structure for the editor to show a ghost placeholder in empty “template” lines (ProseMirror JSON fragment or null). For normal agent output leave extraPlaceholder as null. Only set it if you are intentionally mirroring a field placeholder the user already has in the open editor; do not set random placeholder data for free-form answers.
Atts:
- extraPlaceholder: null
```html
<p class="paragraph-base" extraplaceholder="null/some-value"></p>
```
**heading**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Atts:
- level: 1
```html
<h1 class="heading-base"></h1>
```
**bulletList**
Type: block list
Content: listItem+
Atts: none
```html
<ul class="list-base"><li></li></ul>
```
**hardBreak**
Type: inline
Atts: none
```html
<br>
```
**horizontalRule**
Type: block
Atts: none
```html
<hr class="hr-base">
```
**orderedList**
Type: block list
Content: listItem+
Atts:
- start: 1
- type: null
```html
<ol class="order-list-base" type="null/some-value"><li></li></ol>
```
**listItem**
Content: (paragraph|list)* (paragraphs and/or lists, in any order)
Atts: none
```html
<li></li>
```
**blockquote**
Type: block
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Atts: none
```html
<blockquote class="blockquote-base"><p class="paragraph-base"></p></blockquote>
```
**variable**
Type: inline
Document/template variable token (span with data-type="variable" and data-id).
- id: Variable key, often scoped (e.g. currentUser.firstName, project.name). Only use keys that exist for the document type you are in; product docs list the allowed variable ids. Do not invent new variable names in HTML for production templates.
Atts:
- id: null
```html
<span data-type="variable" data-id="null/some-value" id="null/some-value"></span>
```
### Marks
**link**
Atts:
- href: null
- target: _blank
- rel: noopener noreferrer nofollow
- class: null
- title: null
```html
<a target="_blank" rel="noopener noreferrer nofollow" href="">link text example</a>
```
**bold**
Atts: none
```html
<strong>bold text example</strong>
```
**code**
Atts: none
```html
<code>code text example</code>
```
**italic**
Atts: none
```html
<em>italic text example</em>
```
**strike**
Atts: none
```html
<s>strike text example</s>
```
**underline**
Atts: none
```html
<u>underline text example</u>
```
## Available Template Variables
You can use the following variables in your invoice text templates. Variables are represented as HTML spans:
`invoiceNumber`, `projectName`, `projectShortName`, `clientCompanyName`, `contactPerson`, `invoiceNetto`, `invoiceTotal`, `fullTotal`, `accountNumber`, `dueDate`, `invoiceDate`, `reminderPenalty`, `interestPercent`, `senderNameAndPosition`, `senderName`, `senderPosition`, `overdueInterestPercent`, `overdueInterestDays`, `todayDate`, `dearCustomer`, `signature`
**Example HTML**: `<span data-type="variable" data-id="invoiceNumber">INV-2024-001</span>`, `<span data-type="variable" data-id="clientCompanyName">ACME Corp</span>`
firstReminderGreetingobject | nullAccepts Markdown or HTML for complex formatting. This content is rendered by the Leadtime rich editor, not by a plain Markdown viewer.
For quick/simple text, Markdown is acceptable. For polished user-facing content from an agent or integration, prefer structured HTML because it preserves editor blocks, links, and layout more predictably.
Use only the nodes and marks documented below for this field. Supported editor features differ by endpoint and field. Choose formatting for readability, not decoration: use headings for real sections, paragraphs for narrative text, lists or tables for structured facts, blockquotes for quoted context, callouts for important outcomes/risks/notes when supported, and explicit anchors for links. Do not rely on bare URLs or Markdown links when the link must be clickable; use explicit anchors such as <a href="https://example.com" target="_blank" rel="noopener noreferrer nofollow">link text</a>.
In HTML you can use:
## Node Types and Marks
### Nodes
**paragraph**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Default paragraph. extraPlaceholder is an internal structure for the editor to show a ghost placeholder in empty “template” lines (ProseMirror JSON fragment or null). For normal agent output leave extraPlaceholder as null. Only set it if you are intentionally mirroring a field placeholder the user already has in the open editor; do not set random placeholder data for free-form answers.
Atts:
- extraPlaceholder: null
```html
<p class="paragraph-base" extraplaceholder="null/some-value"></p>
```
**heading**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Atts:
- level: 1
```html
<h1 class="heading-base"></h1>
```
**bulletList**
Type: block list
Content: listItem+
Atts: none
```html
<ul class="list-base"><li></li></ul>
```
**hardBreak**
Type: inline
Atts: none
```html
<br>
```
**horizontalRule**
Type: block
Atts: none
```html
<hr class="hr-base">
```
**orderedList**
Type: block list
Content: listItem+
Atts:
- start: 1
- type: null
```html
<ol class="order-list-base" type="null/some-value"><li></li></ol>
```
**listItem**
Content: (paragraph|list)* (paragraphs and/or lists, in any order)
Atts: none
```html
<li></li>
```
**blockquote**
Type: block
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Atts: none
```html
<blockquote class="blockquote-base"><p class="paragraph-base"></p></blockquote>
```
**variable**
Type: inline
Document/template variable token (span with data-type="variable" and data-id).
- id: Variable key, often scoped (e.g. currentUser.firstName, project.name). Only use keys that exist for the document type you are in; product docs list the allowed variable ids. Do not invent new variable names in HTML for production templates.
Atts:
- id: null
```html
<span data-type="variable" data-id="null/some-value" id="null/some-value"></span>
```
### Marks
**link**
Atts:
- href: null
- target: _blank
- rel: noopener noreferrer nofollow
- class: null
- title: null
```html
<a target="_blank" rel="noopener noreferrer nofollow" href="">link text example</a>
```
**bold**
Atts: none
```html
<strong>bold text example</strong>
```
**code**
Atts: none
```html
<code>code text example</code>
```
**italic**
Atts: none
```html
<em>italic text example</em>
```
**strike**
Atts: none
```html
<s>strike text example</s>
```
**underline**
Atts: none
```html
<u>underline text example</u>
```
## Available Template Variables
You can use the following variables in your invoice text templates. Variables are represented as HTML spans:
`invoiceNumber`, `projectName`, `projectShortName`, `clientCompanyName`, `contactPerson`, `invoiceNetto`, `invoiceTotal`, `fullTotal`, `accountNumber`, `dueDate`, `invoiceDate`, `reminderPenalty`, `interestPercent`, `senderNameAndPosition`, `senderName`, `senderPosition`, `overdueInterestPercent`, `overdueInterestDays`, `todayDate`, `dearCustomer`, `signature`
**Example HTML**: `<span data-type="variable" data-id="invoiceNumber">INV-2024-001</span>`, `<span data-type="variable" data-id="clientCompanyName">ACME Corp</span>`
invoiceFooterobject | nullAccepts Markdown or HTML for complex formatting. This content is rendered by the Leadtime rich editor, not by a plain Markdown viewer.
For quick/simple text, Markdown is acceptable. For polished user-facing content from an agent or integration, prefer structured HTML because it preserves editor blocks, links, and layout more predictably.
Use only the nodes and marks documented below for this field. Supported editor features differ by endpoint and field. Choose formatting for readability, not decoration: use headings for real sections, paragraphs for narrative text, lists or tables for structured facts, blockquotes for quoted context, callouts for important outcomes/risks/notes when supported, and explicit anchors for links. Do not rely on bare URLs or Markdown links when the link must be clickable; use explicit anchors such as <a href="https://example.com" target="_blank" rel="noopener noreferrer nofollow">link text</a>.
In HTML you can use:
## Node Types and Marks
### Nodes
**paragraph**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Default paragraph. extraPlaceholder is an internal structure for the editor to show a ghost placeholder in empty “template” lines (ProseMirror JSON fragment or null). For normal agent output leave extraPlaceholder as null. Only set it if you are intentionally mirroring a field placeholder the user already has in the open editor; do not set random placeholder data for free-form answers.
Atts:
- extraPlaceholder: null
```html
<p class="paragraph-base" extraplaceholder="null/some-value"></p>
```
**heading**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Atts:
- level: 1
```html
<h1 class="heading-base"></h1>
```
**bulletList**
Type: block list
Content: listItem+
Atts: none
```html
<ul class="list-base"><li></li></ul>
```
**hardBreak**
Type: inline
Atts: none
```html
<br>
```
**horizontalRule**
Type: block
Atts: none
```html
<hr class="hr-base">
```
**orderedList**
Type: block list
Content: listItem+
Atts:
- start: 1
- type: null
```html
<ol class="order-list-base" type="null/some-value"><li></li></ol>
```
**listItem**
Content: (paragraph|list)* (paragraphs and/or lists, in any order)
Atts: none
```html
<li></li>
```
**blockquote**
Type: block
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Atts: none
```html
<blockquote class="blockquote-base"><p class="paragraph-base"></p></blockquote>
```
**variable**
Type: inline
Document/template variable token (span with data-type="variable" and data-id).
- id: Variable key, often scoped (e.g. currentUser.firstName, project.name). Only use keys that exist for the document type you are in; product docs list the allowed variable ids. Do not invent new variable names in HTML for production templates.
Atts:
- id: null
```html
<span data-type="variable" data-id="null/some-value" id="null/some-value"></span>
```
### Marks
**link**
Atts:
- href: null
- target: _blank
- rel: noopener noreferrer nofollow
- class: null
- title: null
```html
<a target="_blank" rel="noopener noreferrer nofollow" href="">link text example</a>
```
**bold**
Atts: none
```html
<strong>bold text example</strong>
```
**code**
Atts: none
```html
<code>code text example</code>
```
**italic**
Atts: none
```html
<em>italic text example</em>
```
**strike**
Atts: none
```html
<s>strike text example</s>
```
**underline**
Atts: none
```html
<u>underline text example</u>
```
## Available Template Variables
You can use the following variables in your invoice text templates. Variables are represented as HTML spans:
`invoiceNumber`, `projectName`, `projectShortName`, `clientCompanyName`, `contactPerson`, `invoiceNetto`, `invoiceTotal`, `fullTotal`, `accountNumber`, `dueDate`, `invoiceDate`, `reminderPenalty`, `interestPercent`, `senderNameAndPosition`, `senderName`, `senderPosition`, `overdueInterestPercent`, `overdueInterestDays`, `todayDate`, `dearCustomer`, `signature`
**Example HTML**: `<span data-type="variable" data-id="invoiceNumber">INV-2024-001</span>`, `<span data-type="variable" data-id="clientCompanyName">ACME Corp</span>`
invoiceGreetingobject | nullAccepts Markdown or HTML for complex formatting. This content is rendered by the Leadtime rich editor, not by a plain Markdown viewer.
For quick/simple text, Markdown is acceptable. For polished user-facing content from an agent or integration, prefer structured HTML because it preserves editor blocks, links, and layout more predictably.
Use only the nodes and marks documented below for this field. Supported editor features differ by endpoint and field. Choose formatting for readability, not decoration: use headings for real sections, paragraphs for narrative text, lists or tables for structured facts, blockquotes for quoted context, callouts for important outcomes/risks/notes when supported, and explicit anchors for links. Do not rely on bare URLs or Markdown links when the link must be clickable; use explicit anchors such as <a href="https://example.com" target="_blank" rel="noopener noreferrer nofollow">link text</a>.
In HTML you can use:
## Node Types and Marks
### Nodes
**paragraph**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Default paragraph. extraPlaceholder is an internal structure for the editor to show a ghost placeholder in empty “template” lines (ProseMirror JSON fragment or null). For normal agent output leave extraPlaceholder as null. Only set it if you are intentionally mirroring a field placeholder the user already has in the open editor; do not set random placeholder data for free-form answers.
Atts:
- extraPlaceholder: null
```html
<p class="paragraph-base" extraplaceholder="null/some-value"></p>
```
**heading**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Atts:
- level: 1
```html
<h1 class="heading-base"></h1>
```
**bulletList**
Type: block list
Content: listItem+
Atts: none
```html
<ul class="list-base"><li></li></ul>
```
**hardBreak**
Type: inline
Atts: none
```html
<br>
```
**horizontalRule**
Type: block
Atts: none
```html
<hr class="hr-base">
```
**orderedList**
Type: block list
Content: listItem+
Atts:
- start: 1
- type: null
```html
<ol class="order-list-base" type="null/some-value"><li></li></ol>
```
**listItem**
Content: (paragraph|list)* (paragraphs and/or lists, in any order)
Atts: none
```html
<li></li>
```
**blockquote**
Type: block
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Atts: none
```html
<blockquote class="blockquote-base"><p class="paragraph-base"></p></blockquote>
```
**variable**
Type: inline
Document/template variable token (span with data-type="variable" and data-id).
- id: Variable key, often scoped (e.g. currentUser.firstName, project.name). Only use keys that exist for the document type you are in; product docs list the allowed variable ids. Do not invent new variable names in HTML for production templates.
Atts:
- id: null
```html
<span data-type="variable" data-id="null/some-value" id="null/some-value"></span>
```
### Marks
**link**
Atts:
- href: null
- target: _blank
- rel: noopener noreferrer nofollow
- class: null
- title: null
```html
<a target="_blank" rel="noopener noreferrer nofollow" href="">link text example</a>
```
**bold**
Atts: none
```html
<strong>bold text example</strong>
```
**code**
Atts: none
```html
<code>code text example</code>
```
**italic**
Atts: none
```html
<em>italic text example</em>
```
**strike**
Atts: none
```html
<s>strike text example</s>
```
**underline**
Atts: none
```html
<u>underline text example</u>
```
## Available Template Variables
You can use the following variables in your invoice text templates. Variables are represented as HTML spans:
`invoiceNumber`, `projectName`, `projectShortName`, `clientCompanyName`, `contactPerson`, `invoiceNetto`, `invoiceTotal`, `fullTotal`, `accountNumber`, `dueDate`, `invoiceDate`, `reminderPenalty`, `interestPercent`, `senderNameAndPosition`, `senderName`, `senderPosition`, `overdueInterestPercent`, `overdueInterestDays`, `todayDate`, `dearCustomer`, `signature`
**Example HTML**: `<span data-type="variable" data-id="invoiceNumber">INV-2024-001</span>`, `<span data-type="variable" data-id="clientCompanyName">ACME Corp</span>`
invoiceReminderFeeWarningobject | nullAccepts Markdown or HTML for complex formatting. This content is rendered by the Leadtime rich editor, not by a plain Markdown viewer.
For quick/simple text, Markdown is acceptable. For polished user-facing content from an agent or integration, prefer structured HTML because it preserves editor blocks, links, and layout more predictably.
Use only the nodes and marks documented below for this field. Supported editor features differ by endpoint and field. Choose formatting for readability, not decoration: use headings for real sections, paragraphs for narrative text, lists or tables for structured facts, blockquotes for quoted context, callouts for important outcomes/risks/notes when supported, and explicit anchors for links. Do not rely on bare URLs or Markdown links when the link must be clickable; use explicit anchors such as <a href="https://example.com" target="_blank" rel="noopener noreferrer nofollow">link text</a>.
In HTML you can use:
## Node Types and Marks
### Nodes
**paragraph**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Default paragraph. extraPlaceholder is an internal structure for the editor to show a ghost placeholder in empty “template” lines (ProseMirror JSON fragment or null). For normal agent output leave extraPlaceholder as null. Only set it if you are intentionally mirroring a field placeholder the user already has in the open editor; do not set random placeholder data for free-form answers.
Atts:
- extraPlaceholder: null
```html
<p class="paragraph-base" extraplaceholder="null/some-value"></p>
```
**heading**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Atts:
- level: 1
```html
<h1 class="heading-base"></h1>
```
**bulletList**
Type: block list
Content: listItem+
Atts: none
```html
<ul class="list-base"><li></li></ul>
```
**hardBreak**
Type: inline
Atts: none
```html
<br>
```
**horizontalRule**
Type: block
Atts: none
```html
<hr class="hr-base">
```
**orderedList**
Type: block list
Content: listItem+
Atts:
- start: 1
- type: null
```html
<ol class="order-list-base" type="null/some-value"><li></li></ol>
```
**listItem**
Content: (paragraph|list)* (paragraphs and/or lists, in any order)
Atts: none
```html
<li></li>
```
**blockquote**
Type: block
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Atts: none
```html
<blockquote class="blockquote-base"><p class="paragraph-base"></p></blockquote>
```
**variable**
Type: inline
Document/template variable token (span with data-type="variable" and data-id).
- id: Variable key, often scoped (e.g. currentUser.firstName, project.name). Only use keys that exist for the document type you are in; product docs list the allowed variable ids. Do not invent new variable names in HTML for production templates.
Atts:
- id: null
```html
<span data-type="variable" data-id="null/some-value" id="null/some-value"></span>
```
### Marks
**link**
Atts:
- href: null
- target: _blank
- rel: noopener noreferrer nofollow
- class: null
- title: null
```html
<a target="_blank" rel="noopener noreferrer nofollow" href="">link text example</a>
```
**bold**
Atts: none
```html
<strong>bold text example</strong>
```
**code**
Atts: none
```html
<code>code text example</code>
```
**italic**
Atts: none
```html
<em>italic text example</em>
```
**strike**
Atts: none
```html
<s>strike text example</s>
```
**underline**
Atts: none
```html
<u>underline text example</u>
```
## Available Template Variables
You can use the following variables in your invoice text templates. Variables are represented as HTML spans:
`invoiceNumber`, `projectName`, `projectShortName`, `clientCompanyName`, `contactPerson`, `invoiceNetto`, `invoiceTotal`, `fullTotal`, `accountNumber`, `dueDate`, `invoiceDate`, `reminderPenalty`, `interestPercent`, `senderNameAndPosition`, `senderName`, `senderPosition`, `overdueInterestPercent`, `overdueInterestDays`, `todayDate`, `dearCustomer`, `signature`
**Example HTML**: `<span data-type="variable" data-id="invoiceNumber">INV-2024-001</span>`, `<span data-type="variable" data-id="clientCompanyName">ACME Corp</span>`
secondReminderFooterobject | nullAccepts Markdown or HTML for complex formatting. This content is rendered by the Leadtime rich editor, not by a plain Markdown viewer.
For quick/simple text, Markdown is acceptable. For polished user-facing content from an agent or integration, prefer structured HTML because it preserves editor blocks, links, and layout more predictably.
Use only the nodes and marks documented below for this field. Supported editor features differ by endpoint and field. Choose formatting for readability, not decoration: use headings for real sections, paragraphs for narrative text, lists or tables for structured facts, blockquotes for quoted context, callouts for important outcomes/risks/notes when supported, and explicit anchors for links. Do not rely on bare URLs or Markdown links when the link must be clickable; use explicit anchors such as <a href="https://example.com" target="_blank" rel="noopener noreferrer nofollow">link text</a>.
In HTML you can use:
## Node Types and Marks
### Nodes
**paragraph**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Default paragraph. extraPlaceholder is an internal structure for the editor to show a ghost placeholder in empty “template” lines (ProseMirror JSON fragment or null). For normal agent output leave extraPlaceholder as null. Only set it if you are intentionally mirroring a field placeholder the user already has in the open editor; do not set random placeholder data for free-form answers.
Atts:
- extraPlaceholder: null
```html
<p class="paragraph-base" extraplaceholder="null/some-value"></p>
```
**heading**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Atts:
- level: 1
```html
<h1 class="heading-base"></h1>
```
**bulletList**
Type: block list
Content: listItem+
Atts: none
```html
<ul class="list-base"><li></li></ul>
```
**hardBreak**
Type: inline
Atts: none
```html
<br>
```
**horizontalRule**
Type: block
Atts: none
```html
<hr class="hr-base">
```
**orderedList**
Type: block list
Content: listItem+
Atts:
- start: 1
- type: null
```html
<ol class="order-list-base" type="null/some-value"><li></li></ol>
```
**listItem**
Content: (paragraph|list)* (paragraphs and/or lists, in any order)
Atts: none
```html
<li></li>
```
**blockquote**
Type: block
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Atts: none
```html
<blockquote class="blockquote-base"><p class="paragraph-base"></p></blockquote>
```
**variable**
Type: inline
Document/template variable token (span with data-type="variable" and data-id).
- id: Variable key, often scoped (e.g. currentUser.firstName, project.name). Only use keys that exist for the document type you are in; product docs list the allowed variable ids. Do not invent new variable names in HTML for production templates.
Atts:
- id: null
```html
<span data-type="variable" data-id="null/some-value" id="null/some-value"></span>
```
### Marks
**link**
Atts:
- href: null
- target: _blank
- rel: noopener noreferrer nofollow
- class: null
- title: null
```html
<a target="_blank" rel="noopener noreferrer nofollow" href="">link text example</a>
```
**bold**
Atts: none
```html
<strong>bold text example</strong>
```
**code**
Atts: none
```html
<code>code text example</code>
```
**italic**
Atts: none
```html
<em>italic text example</em>
```
**strike**
Atts: none
```html
<s>strike text example</s>
```
**underline**
Atts: none
```html
<u>underline text example</u>
```
## Available Template Variables
You can use the following variables in your invoice text templates. Variables are represented as HTML spans:
`invoiceNumber`, `projectName`, `projectShortName`, `clientCompanyName`, `contactPerson`, `invoiceNetto`, `invoiceTotal`, `fullTotal`, `accountNumber`, `dueDate`, `invoiceDate`, `reminderPenalty`, `interestPercent`, `senderNameAndPosition`, `senderName`, `senderPosition`, `overdueInterestPercent`, `overdueInterestDays`, `todayDate`, `dearCustomer`, `signature`
**Example HTML**: `<span data-type="variable" data-id="invoiceNumber">INV-2024-001</span>`, `<span data-type="variable" data-id="clientCompanyName">ACME Corp</span>`
secondReminderGreetingobject | nullAccepts Markdown or HTML for complex formatting. This content is rendered by the Leadtime rich editor, not by a plain Markdown viewer.
For quick/simple text, Markdown is acceptable. For polished user-facing content from an agent or integration, prefer structured HTML because it preserves editor blocks, links, and layout more predictably.
Use only the nodes and marks documented below for this field. Supported editor features differ by endpoint and field. Choose formatting for readability, not decoration: use headings for real sections, paragraphs for narrative text, lists or tables for structured facts, blockquotes for quoted context, callouts for important outcomes/risks/notes when supported, and explicit anchors for links. Do not rely on bare URLs or Markdown links when the link must be clickable; use explicit anchors such as <a href="https://example.com" target="_blank" rel="noopener noreferrer nofollow">link text</a>.
In HTML you can use:
## Node Types and Marks
### Nodes
**paragraph**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Default paragraph. extraPlaceholder is an internal structure for the editor to show a ghost placeholder in empty “template” lines (ProseMirror JSON fragment or null). For normal agent output leave extraPlaceholder as null. Only set it if you are intentionally mirroring a field placeholder the user already has in the open editor; do not set random placeholder data for free-form answers.
Atts:
- extraPlaceholder: null
```html
<p class="paragraph-base" extraplaceholder="null/some-value"></p>
```
**heading**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Atts:
- level: 1
```html
<h1 class="heading-base"></h1>
```
**bulletList**
Type: block list
Content: listItem+
Atts: none
```html
<ul class="list-base"><li></li></ul>
```
**hardBreak**
Type: inline
Atts: none
```html
<br>
```
**horizontalRule**
Type: block
Atts: none
```html
<hr class="hr-base">
```
**orderedList**
Type: block list
Content: listItem+
Atts:
- start: 1
- type: null
```html
<ol class="order-list-base" type="null/some-value"><li></li></ol>
```
**listItem**
Content: (paragraph|list)* (paragraphs and/or lists, in any order)
Atts: none
```html
<li></li>
```
**blockquote**
Type: block
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Atts: none
```html
<blockquote class="blockquote-base"><p class="paragraph-base"></p></blockquote>
```
**variable**
Type: inline
Document/template variable token (span with data-type="variable" and data-id).
- id: Variable key, often scoped (e.g. currentUser.firstName, project.name). Only use keys that exist for the document type you are in; product docs list the allowed variable ids. Do not invent new variable names in HTML for production templates.
Atts:
- id: null
```html
<span data-type="variable" data-id="null/some-value" id="null/some-value"></span>
```
### Marks
**link**
Atts:
- href: null
- target: _blank
- rel: noopener noreferrer nofollow
- class: null
- title: null
```html
<a target="_blank" rel="noopener noreferrer nofollow" href="">link text example</a>
```
**bold**
Atts: none
```html
<strong>bold text example</strong>
```
**code**
Atts: none
```html
<code>code text example</code>
```
**italic**
Atts: none
```html
<em>italic text example</em>
```
**strike**
Atts: none
```html
<s>strike text example</s>
```
**underline**
Atts: none
```html
<u>underline text example</u>
```
## Available Template Variables
You can use the following variables in your invoice text templates. Variables are represented as HTML spans:
`invoiceNumber`, `projectName`, `projectShortName`, `clientCompanyName`, `contactPerson`, `invoiceNetto`, `invoiceTotal`, `fullTotal`, `accountNumber`, `dueDate`, `invoiceDate`, `reminderPenalty`, `interestPercent`, `senderNameAndPosition`, `senderName`, `senderPosition`, `overdueInterestPercent`, `overdueInterestDays`, `todayDate`, `dearCustomer`, `signature`
**Example HTML**: `<span data-type="variable" data-id="invoiceNumber">INV-2024-001</span>`, `<span data-type="variable" data-id="clientCompanyName">ACME Corp</span>`
withBestRegardsobject | nullAccepts Markdown or HTML for complex formatting. This content is rendered by the Leadtime rich editor, not by a plain Markdown viewer.
For quick/simple text, Markdown is acceptable. For polished user-facing content from an agent or integration, prefer structured HTML because it preserves editor blocks, links, and layout more predictably.
Use only the nodes and marks documented below for this field. Supported editor features differ by endpoint and field. Choose formatting for readability, not decoration: use headings for real sections, paragraphs for narrative text, lists or tables for structured facts, blockquotes for quoted context, callouts for important outcomes/risks/notes when supported, and explicit anchors for links. Do not rely on bare URLs or Markdown links when the link must be clickable; use explicit anchors such as <a href="https://example.com" target="_blank" rel="noopener noreferrer nofollow">link text</a>.
In HTML you can use:
## Node Types and Marks
### Nodes
**paragraph**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Default paragraph. extraPlaceholder is an internal structure for the editor to show a ghost placeholder in empty “template” lines (ProseMirror JSON fragment or null). For normal agent output leave extraPlaceholder as null. Only set it if you are intentionally mirroring a field placeholder the user already has in the open editor; do not set random placeholder data for free-form answers.
Atts:
- extraPlaceholder: null
```html
<p class="paragraph-base" extraplaceholder="null/some-value"></p>
```
**heading**
Type: block
Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…)
Atts:
- level: 1
```html
<h1 class="heading-base"></h1>
```
**bulletList**
Type: block list
Content: listItem+
Atts: none
```html
<ul class="list-base"><li></li></ul>
```
**hardBreak**
Type: inline
Atts: none
```html
<br>
```
**horizontalRule**
Type: block
Atts: none
```html
<hr class="hr-base">
```
**orderedList**
Type: block list
Content: listItem+
Atts:
- start: 1
- type: null
```html
<ol class="order-list-base" type="null/some-value"><li></li></ol>
```
**listItem**
Content: (paragraph|list)* (paragraphs and/or lists, in any order)
Atts: none
```html
<li></li>
```
**blockquote**
Type: block
Content: block+ (one or more block child nodes (e.g. paragraph, list, …))
Atts: none
```html
<blockquote class="blockquote-base"><p class="paragraph-base"></p></blockquote>
```
**variable**
Type: inline
Document/template variable token (span with data-type="variable" and data-id).
- id: Variable key, often scoped (e.g. currentUser.firstName, project.name). Only use keys that exist for the document type you are in; product docs list the allowed variable ids. Do not invent new variable names in HTML for production templates.
Atts:
- id: null
```html
<span data-type="variable" data-id="null/some-value" id="null/some-value"></span>
```
### Marks
**link**
Atts:
- href: null
- target: _blank
- rel: noopener noreferrer nofollow
- class: null
- title: null
```html
<a target="_blank" rel="noopener noreferrer nofollow" href="">link text example</a>
```
**bold**
Atts: none
```html
<strong>bold text example</strong>
```
**code**
Atts: none
```html
<code>code text example</code>
```
**italic**
Atts: none
```html
<em>italic text example</em>
```
**strike**
Atts: none
```html
<s>strike text example</s>
```
**underline**
Atts: none
```html
<u>underline text example</u>
```
## Available Template Variables
You can use the following variables in your invoice text templates. Variables are represented as HTML spans:
`invoiceNumber`, `projectName`, `projectShortName`, `clientCompanyName`, `contactPerson`, `invoiceNetto`, `invoiceTotal`, `fullTotal`, `accountNumber`, `dueDate`, `invoiceDate`, `reminderPenalty`, `interestPercent`, `senderNameAndPosition`, `senderName`, `senderPosition`, `overdueInterestPercent`, `overdueInterestDays`, `todayDate`, `dearCustomer`, `signature`
**Example HTML**: `<span data-type="variable" data-id="invoiceNumber">INV-2024-001</span>`, `<span data-type="variable" data-id="clientCompanyName">ACME Corp</span>`
enableInvoiceInterestobject | nullEnable invoice interest (null = use default)
enableInvoiceReminderFeeobject | nullEnable invoice reminder fee (null = use default)
invoiceDueDaysobject | nullNumber of days until invoice is due (1-120)
invoiceInterestobject | nullInvoice interest rate percentage (0-1000)
invoiceLanguageobject | nullInvoice language code
invoiceReminderFeeobject | nullInvoice reminder fee amount (0-1000)
Responses
200Invoice settings updated successfully
baseInvoiceInterestobject | nullrequiredBase invoice interest
customTextsobjectrequiredCustom invoice text templates (returned as HTML)
Show propertiesHide properties
cancelationBodystring | nullfirstReminderFooterstring | nullfirstReminderGreetingstring | nullinvoiceFooterstring | nullinvoiceGreetingstring | nullinvoiceReminderFeeWarningstring | nullsecondReminderFooterstring | nullsecondReminderGreetingstring | nullwithBestRegardsstring | nullenableInvoiceInterestobject | nullrequiredEnable invoice interest
enableInvoiceReminderFeeobject | nullrequiredEnable invoice reminder fee
idstringrequiredInvoice ID
invoiceInterestobject | nullrequiredInvoice interest
invoiceLanguageobject | nullrequiredInvoice language
invoiceReminderFeeobject | nullrequiredInvoice reminder fee
parentSettingsobjectrequiredParent settings (from organization or workspace)
400Invalid request data or validation errors
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404Invoice not found
Request
curl -X PATCH "https://leadtime.app/api/public/billing/invoices/%3Cuuid%3E/settings" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"baseInvoiceInterest": 2.5,
"customTexts": {
"cancelationBody": "<p>This invoice has been cancelled</p>",
"firstReminderFooter": "<p>Please pay within 14 days</p>",
"firstReminderGreeting": "<p>First reminder for invoice payment</p>",
"invoiceFooter": "<p>Thank you for your business</p>",
"invoiceGreeting": "<p>Dear Customer</p>",
"invoiceReminderFeeWarning": "<p>A reminder fee will be applied if payment is not received</p>",
"secondReminderFooter": "<p>Final notice before legal action</p>",
"secondReminderGreeting": "<p>Second reminder for invoice payment</p>",
"withBestRegards": "<p>Best regards,<br>Your Team</p>"
},
"enableInvoiceInterest": true,
"enableInvoiceReminderFee": true,
"invoiceDueDays": 30,
"invoiceInterest": 8,
"invoiceLanguage": "en",
"invoiceReminderFee": 5.5
}'const response = await fetch("https://leadtime.app/api/public/billing/invoices/%3Cuuid%3E/settings", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"baseInvoiceInterest": 2.5,
"customTexts": {
"cancelationBody": "<p>This invoice has been cancelled</p>",
"firstReminderFooter": "<p>Please pay within 14 days</p>",
"firstReminderGreeting": "<p>First reminder for invoice payment</p>",
"invoiceFooter": "<p>Thank you for your business</p>",
"invoiceGreeting": "<p>Dear Customer</p>",
"invoiceReminderFeeWarning": "<p>A reminder fee will be applied if payment is not received</p>",
"secondReminderFooter": "<p>Final notice before legal action</p>",
"secondReminderGreeting": "<p>Second reminder for invoice payment</p>",
"withBestRegards": "<p>Best regards,<br>Your Team</p>"
},
"enableInvoiceInterest": true,
"enableInvoiceReminderFee": true,
"invoiceDueDays": 30,
"invoiceInterest": 8,
"invoiceLanguage": "en",
"invoiceReminderFee": 5.5
})
});import requests
response = requests.patch(
"https://leadtime.app/api/public/billing/invoices/%3Cuuid%3E/settings",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"baseInvoiceInterest": 2.5,
"customTexts": {
"cancelationBody": "<p>This invoice has been cancelled</p>",
"firstReminderFooter": "<p>Please pay within 14 days</p>",
"firstReminderGreeting": "<p>First reminder for invoice payment</p>",
"invoiceFooter": "<p>Thank you for your business</p>",
"invoiceGreeting": "<p>Dear Customer</p>",
"invoiceReminderFeeWarning": "<p>A reminder fee will be applied if payment is not received</p>",
"secondReminderFooter": "<p>Final notice before legal action</p>",
"secondReminderGreeting": "<p>Second reminder for invoice payment</p>",
"withBestRegards": "<p>Best regards,<br>Your Team</p>"
},
"enableInvoiceInterest": True,
"enableInvoiceReminderFee": True,
"invoiceDueDays": 30,
"invoiceInterest": 8,
"invoiceLanguage": "en",
"invoiceReminderFee": 5.5
},
)Response
{
"baseInvoiceInterest": 2.5,
"customTexts": {
"cancelationBody": "string",
"firstReminderFooter": "string",
"firstReminderGreeting": "string",
"invoiceFooter": "string",
"invoiceGreeting": "string",
"invoiceReminderFeeWarning": "string",
"secondReminderFooter": "string",
"secondReminderGreeting": "string",
"withBestRegards": "string"
},
"enableInvoiceInterest": true,
"enableInvoiceReminderFee": true,
"id": "uuid-123",
"invoiceInterest": 8,
"invoiceLanguage": "en",
"invoiceReminderFee": 5.5,
"parentSettings": {
"baseInvoiceInterest": 2.5,
"enableInvoiceInterest": true,
"enableInvoiceReminderFee": true,
"invoiceInterest": 8,
"invoiceLanguage": "en",
"invoiceReminderFee": 5.5
}
}Invalid request data or validation errors
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions
Invoice not found