Update organization invoice settings
Partially updates invoice and billing settings for an organization. Only the fields you provide will be updated; all other fields remain unchanged.
What are Invoice Settings? Invoice settings define organization-specific billing parameters that override workspace defaults, enabling customer-specific payment terms, reminder rules, and invoice texts.
Available settings:
- Payment terms:
- hourRate: Customer-specific hourly rate (number or null)
- invoiceDueDays: Days until payment is due, 1-120 (number or null)
- invoiceLanguage: Language code for invoices (string or null)
- Reminder fees:
- enableInvoiceReminderFee: Enable reminder fees (boolean or null)
- invoiceReminderFee: Reminder fee amount, 0-1000 (number or null)
- Interest on arrears:
- enableInvoiceInterest: Enable interest on overdue invoices (boolean or null)
- baseInvoiceInterest: Base interest rate percentage, 0-1000 (number or null)
- invoiceInterest: Interest rate percentage, 0-1000 (number or null)
- Custom text templates: Object with HTML or Markdown content (converted to IDoc internally):
- withBestRegards, invoiceGreeting, invoiceFooter
- invoiceReminderFeeWarning
- firstReminderGreeting, firstReminderFooter
- secondReminderGreeting, secondReminderFooter
- cancelationBody
Custom text templates:
- Can be provided as HTML or Markdown
- Will be automatically converted to internal IDoc format
- Support macros/variables (e.g., #dear, #clientCompanyName, #invoiceNumber)
- Set to null or empty string to clear a template
- Omit fields you do not want to change
Behavior:
- Omitted fields remain unchanged
- Provided fields replace existing values
- Set fields to null to reset to workspace defaults (where applicable)
- Custom texts are converted from HTML/Markdown to IDoc format for storage
What is returned: The complete updated invoice settings object, with custom texts returned as HTML.
Note: This endpoint requires the Organizations.edit permission. The organization must exist in your workspace and not be deleted. Custom texts are stored internally in IDoc format but can be provided as HTML or Markdown.
PATCH
/organizations/{id}/invoice-settingsAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstringrequiredQuery 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/jsonbaseInvoiceInterestobject | 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)
hourRateobject | nullHourly rate for the organization
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
200
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
hourRateobject | nullrequiredHourly rate
idstringrequiredOrganization ID
invoiceDueDaysobject | nullrequiredInvoice due days
invoiceInterestobject | nullrequiredInvoice interest
invoiceLanguageobject | nullrequiredInvoice language
invoiceReminderFeeobject | nullrequiredInvoice reminder fee
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X PATCH "https://leadtime.app/api/public/organizations/string/invoice-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,
"hourRate": 75,
"invoiceDueDays": 30,
"invoiceInterest": 8,
"invoiceLanguage": "en",
"invoiceReminderFee": 5.5
}'const response = await fetch("https://leadtime.app/api/public/organizations/string/invoice-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,
"hourRate": 75,
"invoiceDueDays": 30,
"invoiceInterest": 8,
"invoiceLanguage": "en",
"invoiceReminderFee": 5.5
})
});import requests
response = requests.patch(
"https://leadtime.app/api/public/organizations/string/invoice-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,
"hourRate": 75,
"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,
"hourRate": 75,
"id": "uuid-123",
"invoiceDueDays": 30,
"invoiceInterest": 8,
"invoiceLanguage": "en",
"invoiceReminderFee": 5.5
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions