Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

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:

  1. 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
  2. For font selection: Choose from available fonts (Inter, Degular, Roboto, Arimo, Open Sans, PT Sans, Oswald, EB Garamond, Permanent Marker, IBM Plex Mono)
  3. For project document options: Set boolean flags and heading style enum values

Available heading styles:

  • Normal: Headings without numbering
  • Sequential: 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-settings
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Request body
requiredapplication/json
customEditorBackgroundIdobject | null
UUID 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.
documentFontstring
Font 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 Mono
documentLanguagestring
Default language code for project documents. Must be one of: en, de. If not provided, current value is preserved.
documentLogoIdobject | null
UUID 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 | null
UUID 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.
projectDocumentEnableTocboolean
Whether 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.
projectDocumentHeadingStylestring
Heading 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:NormalSequentialSequentialFromSecondLevelSequentialWithParagraphs
projectDocumentTitlePageboolean
Whether 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 | null
UUID 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
successbooleanrequired
Operation 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"
}'
Response
{
  "success": true
}