Update document settings
Updates document settings for the workspace. All fields are optional - only provided fields will be updated.
What are Document Settings? Document settings control the appearance and formatting of all documents automatically generated by Leadtime, including letters, invoices, quotes, specifications, and project documents.
How to update document settings:
- For file uploads (logo, background images):
- Upload image files using POST /api/public/workspace/upload
- Get the file ID from the upload response
- Use the file ID in the corresponding field (
documentLogoId,specificationBackgroundId, etc.) - To remove a file, set the field to
null
- For font selection: Choose from available fonts (Inter, Degular, Roboto, Arimo, Open Sans, PT Sans, Oswald, EB Garamond, Permanent Marker, IBM Plex Mono)
- For project document options: Set boolean flags and heading style enum values
Available heading styles:
Normal: Headings without numberingSequential: Continuous numbering from level 1 (e.g., 1., 1.1., 1.1.1.)SequentialFromSecondLevel: Top heading unnumbered, subchapters numbered (e.g., 1. Heading 2, 1.1. Heading 3)SequentialWithParagraphs: Numbering with § prefix from level 2 (e.g., § 1., § 1.1.) - ideal for contracts
Background image recommendations:
- Recommended size: 820 × 600 pixels
- Formats: PNG, JPG, or SVG
- Used on cover pages of generated documents
Note: This endpoint requires the WsSettings.manageSettings permission. Changes affect all documents generated after the update. Use GET endpoint to preview current settings.
PATCH
/administration/document-settingsAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredRequest body
requiredapplication/jsoncustomEditorBackgroundIdobject | nullUUID of the custom editor background image file uploaded via POST /api/public/workspace/upload. Used on template-based document cover pages. Recommended size: 820 × 600 pixels. Set to `null` to remove. If not provided, current value is preserved.
documentFontstringFont family to use for all documents. Must be one of: Inter, Degular, Roboto, Arimo, Open Sans, PT Sans, Oswald, EB Garamond, Permanent Marker, IBM Plex Mono. If not provided, current value is preserved.
Allowed:
InterDegularRobotoArimoOpen SansPT SansOswaldEB GaramondPermanent MarkerIBM Plex MonodocumentLanguagestringDefault language code for project documents. Must be one of: en, de. If not provided, current value is preserved.
documentLogoIdobject | nullUUID of the logo image file uploaded via POST /api/public/workspace/upload. This logo appears on all generated documents. Set to `null` to remove the logo (defaults to Leadtime logo). If not provided, current value is preserved.
estimateBackgroundIdobject | nullUUID of the estimate/proposal background image file uploaded via POST /api/public/workspace/upload. Used on estimate document cover pages. Recommended size: 820 × 600 pixels. Set to `null` to remove. If not provided, current value is preserved.
offerTextsobject[]Array of language-specific offer texts. Each entry must include a language code and intro/outro texts (HTML or Markdown). If not provided, current values are preserved.
projectDocumentEnableTocbooleanWhether to automatically include a table of contents in project documents. When enabled, a TOC is generated based on document headings. If not provided, current value is preserved.
projectDocumentHeadingStylestringHeading numbering style for project documents. Options: `Normal` (no numbering), `Sequential` (1., 1.1., 1.1.1.), `SequentialFromSecondLevel` (top heading unnumbered), `SequentialWithParagraphs` (§ 1., § 1.1.). If not provided, current value is preserved.
Allowed:
NormalSequentialSequentialFromSecondLevelSequentialWithParagraphsprojectDocumentTitlePagebooleanWhether to automatically include a title page in project documents. When enabled, a cover page is added as the first page. If not provided, current value is preserved.
specificationBackgroundIdobject | nullUUID of the specification background image file uploaded via POST /api/public/workspace/upload. Used on specification document cover pages. Recommended size: 820 × 600 pixels. Set to `null` to remove. If not provided, current value is preserved.
Responses
200
successbooleanrequiredOperation success flag
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X PATCH "https://leadtime.app/api/public/administration/document-settings" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"customEditorBackgroundId": "123e4567-e89b-12d3-a456-426614174000",
"documentFont": "Inter",
"documentLanguage": "en",
"documentLogoId": "123e4567-e89b-12d3-a456-426614174000",
"estimateBackgroundId": "123e4567-e89b-12d3-a456-426614174000",
"offerTexts": [
{}
],
"projectDocumentEnableToc": true,
"projectDocumentHeadingStyle": "Sequential",
"projectDocumentTitlePage": true,
"specificationBackgroundId": "123e4567-e89b-12d3-a456-426614174000"
}'const response = await fetch("https://leadtime.app/api/public/administration/document-settings", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"customEditorBackgroundId": "123e4567-e89b-12d3-a456-426614174000",
"documentFont": "Inter",
"documentLanguage": "en",
"documentLogoId": "123e4567-e89b-12d3-a456-426614174000",
"estimateBackgroundId": "123e4567-e89b-12d3-a456-426614174000",
"offerTexts": [
{}
],
"projectDocumentEnableToc": true,
"projectDocumentHeadingStyle": "Sequential",
"projectDocumentTitlePage": true,
"specificationBackgroundId": "123e4567-e89b-12d3-a456-426614174000"
})
});import requests
response = requests.patch(
"https://leadtime.app/api/public/administration/document-settings",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"customEditorBackgroundId": "123e4567-e89b-12d3-a456-426614174000",
"documentFont": "Inter",
"documentLanguage": "en",
"documentLogoId": "123e4567-e89b-12d3-a456-426614174000",
"estimateBackgroundId": "123e4567-e89b-12d3-a456-426614174000",
"offerTexts": [
{}
],
"projectDocumentEnableToc": True,
"projectDocumentHeadingStyle": "Sequential",
"projectDocumentTitlePage": True,
"specificationBackgroundId": "123e4567-e89b-12d3-a456-426614174000"
},
)Response
{
"success": true
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions