Zum Inhalt springen
Leadtime
Deutsch
Esc
navigateopen⌘Jpreview

Update organization helpdesk settings

Updates organization-specific helpdesk settings. These settings override workspace defaults for the specified organization.

What can be configured:

  • Organization mode: How settings apply (onlyMembers or all)
    • onlyMembers: Settings apply only when sender is a member of this organization
    • all: Settings apply to ALL emails sent to the account, regardless of sender
  • Default task priority: Priority level for organization helpdesk tasks
  • Default task type: Task type ID for organization helpdesk tasks
  • Default task status: Task status ID for organization 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:

  1. Organization settings override workspace defaults when emails are processed
  2. Settings apply based on the organization mode:
    • onlyMembers: Only when sender is an organization member
    • all: For all emails to the account (highest priority)
  3. Null fields inherit from workspace email account settings or workspace defaults
  4. Multiple organizations can have settings for the same email account

Settings resolution example: If an email is sent to support@company.com:

  • First check: Any org with mode=‘all’? → Use that org’s settings
  • Second check: Is sender a member? → Use their org’s settings (if mode=‘onlyMembers’)
  • Third check: Workspace email account settings
  • Final fallback: Workspace defaults

Error handling: Returns 404 if the organization is not found or doesn’t belong to the workspace.

Note: This endpoint requires the Organizations.edit permission. Organization settings provide fine-grained control over helpdesk behavior per organization.

PUT/helpdesk/organizations/{organizationId}/settings
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
organizationIdstringrequired
Organization ID
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 helpdesk tasks to when organization settings apply. If provided, tasks created from emails that match this organization's settings will be assigned to this user. If omitted or null, tasks will use workspace default assignment or no assignment. Must be a valid user ID from your workspace.
defaultReplyBodystringrequired
HTML template for automatic replies sent to email senders when organization settings apply. This overrides workspace defaults when organization settings are used. 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:** Supports the same variables as workspace templates (e.g., `taskNumber`).
defaultTaskPrioritystringrequired
Default task priority for helpdesk tasks created from emails that match this organization's settings. This overrides workspace defaults when organization settings apply. Valid values: Urgent, High, Normal, Low.
Allowed:LowNormalHigh
defaultTaskStatusIdstringrequired
Default task status ID for helpdesk tasks created from emails that match this organization's settings. This overrides workspace defaults when organization settings apply. Must be a valid task status ID from your workspace.
defaultTaskTypeIdstringrequired
Default task type ID for helpdesk tasks created from emails that match this organization's settings. This overrides workspace defaults when organization settings apply. Must be a valid task type ID from your workspace.
modestringrequired
Organization mode determines when these settings apply. `onlyMembers`: Settings apply only when the email sender is a member of this organization. `all`: Settings apply to ALL emails sent to the account, regardless of sender (highest priority). When set to `all`, these settings override everything including workspace defaults and other organization settings.
Allowed:onlyMembersall
sendDefaultReplybooleanrequired
Whether to automatically send replies to new email senders when organization settings apply. When enabled, the system will send the `defaultReplyBody` template as a reply to initial emails from senders who match this organization's settings.
Responses
200Organization helpdesk settings updated successfully
emailAccountsobject[]required
List of email accounts with organization-specific helpdesk settings. Each account shows organization-level overrides and includes `effectiveDefaults` which shows the final merged settings (organization + workspace defaults). Organization settings override workspace defaults when emails are processed from organization members (or all senders if mode='all').
settingsobjectrequired
Organization-level helpdesk settings. These settings allow organizations to override workspace defaults for their email routing. Organization settings have higher priority than workspace defaults and can apply to all emails or only emails from organization members.
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404Organization not found
Request
curl -X PUT "https://leadtime.app/api/public/helpdesk/organizations/org-uuid-123/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",
  "mode": "onlyMembers",
  "sendDefaultReply": true
}'
Response
{
  "emailAccounts": [
    {
      "addressContains": "acme.com",
      "defaultReplyBody": null,
      "effectiveDefaults": {
        "addressContains": "acme.com",
        "defaultReplyBody": "<p>Default reply</p>",
        "sendDefaultReply": true,
        "taskPriority": "Normal",
        "taskProjectId": "project-uuid-123",
        "taskStatusId": "status-uuid-789",
        "taskTypeId": "type-uuid-456"
      },
      "emailAccountId": "account-uuid-123",
      "emailAddress": "support@example.com",
      "emailDisplayName": "Support Team",
      "isEnabled": true,
      "organizationMode": "onlyMembers",
      "sendDefaultReply": null,
      "taskAccountableId": null,
      "taskAssignedId": null,
      "taskPriority": null,
      "taskProjectId": null,
      "taskStatusId": null,
      "taskTagsIds": null,
      "taskTypeId": null
    }
  ],
  "settings": {
    "emailAccountSettings": [],
    "organizationId": "org-uuid-123",
    "organizationName": "Acme Corp"
  }
}