Zum Inhalt springen
Leadtime
Deutsch
Esc
navigateopen⌘Jpreview

Update workspace helpdesk settings

Updates workspace-wide default helpdesk settings. These settings apply to all email accounts unless overridden at the account level.

What can be configured:

  • Default task priority: Priority level for all helpdesk tasks (Urgent, High, Normal, Low)
  • Default task type: Task type ID that will be assigned to helpdesk tasks
  • Default task status: Task status ID for newly created helpdesk tasks
  • Auto-assign user: Optional user ID to automatically assign tasks to
  • Default reply body: HTML template for automatic replies (supports variables like taskNumber)
  • Send default reply: Whether to automatically send replies to new email senders

How it works:

  • These settings become the base configuration for all helpdesk operations
  • Individual email accounts can override any of these defaults
  • When an email account has no specific settings, it uses these workspace defaults
  • The isHelpdeskEnabled flag is preserved from current settings (not updated via this endpoint)

Auto-reply system: When sendDefaultReply is enabled, the system automatically sends replies to initial emails from new senders:

  • Only triggers for first-time senders (not replies to existing conversations)
  • Uses the defaultReplyBody template with variable substitution
  • Variables like taskNumber are replaced with actual values
  • Replies are sent from the same email account that received the original email

Note: This endpoint requires the WsSettings.manageSettings permission. Changes affect all email accounts that don’t have account-specific overrides.

PUT/helpdesk/settings
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Query parameters
fieldsToReturnstring
Comma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestring
Advanced 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:compactfull
Header parameters
LT-Response-Shapestring
Advanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:full
Request body
requiredapplication/json
autoAssignUserIdstring
Optional user ID to automatically assign all helpdesk tasks to. If provided, all tasks created from emails will be assigned to this user. If omitted or null, tasks will be created without automatic assignment. Must be a valid user ID from your workspace.
defaultReplyBodystringrequired
HTML template for automatic replies sent to new email senders. This template is used when `sendDefaultReply` is enabled. Accepts 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> ``` ### 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 Helpdesk Variables You can use the following variables in your helpdesk templates. Variables are represented as HTML spans: **taskNumber**: The generated task number for the helpdesk ticket **Example HTML**: `<span data-type="variable" data-id="taskNumber">#12345</span>` **Note:** The template supports variables that are automatically replaced with actual values (e.g., `taskNumber` becomes the actual task number).
defaultTaskPrioritystringrequired
Default task priority for all helpdesk tasks. This priority will be assigned to tasks created from emails unless overridden at the email account or organization level. Valid values: Urgent, High, Normal, Low.
Allowed:LowNormalHigh
defaultTaskStatusIdstringrequired
Default task status ID for newly created helpdesk tasks. This determines the initial status of tasks created from emails. Must be a valid task status ID from your workspace.
defaultTaskTypeIdstringrequired
Default task type ID that will be assigned to all helpdesk tasks. This determines the category/type of tasks created from emails. Must be a valid task type ID from your workspace.
sendDefaultReplybooleanrequired
Whether to automatically send replies to new email senders. When enabled, the system will send the `defaultReplyBody` template as a reply to initial emails from senders who haven't contacted helpdesk before. Replies are only sent for first-time senders, not for replies to existing conversations.
Responses
200Workspace helpdesk settings updated successfully
emailAccountsobject[]required
List of all email accounts in the workspace with their helpdesk settings. Each account can have account-specific overrides that override workspace defaults. Accounts without specific settings will use workspace defaults.
workspaceobjectrequired
Workspace-wide helpdesk settings including the global enabled flag and default task creation settings. These settings serve as the base configuration for all helpdesk operations in the workspace.
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X PUT "https://leadtime.app/api/public/helpdesk/settings" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "autoAssignUserId": "user-uuid-789",
  "defaultReplyBody": "<p>Thank you for contacting us. Your ticket number is <span data-type=\"variable\" data-id=\"taskNumber\">#12345</span>.</p>",
  "defaultTaskPriority": "Normal",
  "defaultTaskStatusId": "status-uuid-456",
  "defaultTaskTypeId": "type-uuid-123",
  "sendDefaultReply": true
}'
Response
{
  "emailAccounts": [
    {
      "defaultReplyBody": null,
      "emailAccountId": "account-uuid-123",
      "emailAddress": "support@example.com",
      "emailDisplayName": "Support Team",
      "isEnabled": true,
      "sendDefaultReply": null,
      "taskAccountableId": null,
      "taskAssignedId": null,
      "taskPriority": null,
      "taskProjectId": null,
      "taskStatusId": null,
      "taskTagsIds": null,
      "taskTypeId": "type-uuid-456"
    }
  ],
  "workspace": {
    "defaultSettings": {
      "defaultReplyBody": "<p>Thank you for contacting us.</p>",
      "sendDefaultReply": true,
      "taskAssignedId": "user-uuid-101",
      "taskPriority": "Normal",
      "taskProjectId": "project-uuid-123",
      "taskStatusId": "status-uuid-789",
      "taskTypeId": "type-uuid-456"
    },
    "isHelpdeskEnabled": true
  }
}