Create a new task
Creates a new task (ticket) in the specified project. Tasks are the core work units in Leadtime and represent actionable items that need to be completed. Each task belongs to a project, has a type (e.g., Feature, Bug), a status (e.g., New, In Progress), and can include assignments, deadlines, time estimates, custom fields, tags, and subtasks. The description field accepts HTML or Markdown format and will be automatically converted to the internal editor format. Project access is validated before task creation. Requires Tasks.create permission.
Some fields are dynamically required by workspace and task-type configuration. The global OpenAPI schema shows the universal request shape, but it cannot mark every conditionally required field as required for every workspace. Before creating tasks, read task type metadata from GET /tasks/types or GET /administration/task-settings/types, find the selected typeId, and include every field listed in that type requiredFields. Standard fields such as summary and estimatedTime can be listed there, as well as task custom fields. The API still validates the final request and returns field-level 400 errors when configured requirements are missing.
Assignment fields are project-scoped. assignedToId and accountableId must reference a Leadtime User.id that is assignable in the selected project: either a project user/member with access to that project, or the workspace Leadtime agent user. Read GET /projects/{id} and use its users array before assigning; if a workspace user is missing from the project, add them with PATCH /projects/{id} first.
/tasksAuthorizationOAuth2 access token · headerrequiredapi:writeAuthorizationBearer token (JWT) · headerrequiredfieldsToReturnstringComma-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.
compactfullLT-Response-ShapestringAdvanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
fullapplication/jsonaccountableIdobject | nullUUID of the Leadtime user who is accountable for this task. Use the User.id UUID, not the Employee.id UUID. The user must be assignable in the selected project: either a project member/user with access to that project, or the workspace Leadtime agent user. Use GET /projects/{id} to inspect the project users array, and PATCH /projects/{id} to add users before making them accountable. GET /workspace/users lists workspace users, but not every workspace user is assignable to every project. Leave null if no one is accountable yet.
assignedToIdobject | nullUUID of the Leadtime user assigned to work on this task. Use the User.id UUID, not the Employee.id UUID. The user must be assignable in the selected project: either a project member/user with access to that project, or the workspace Leadtime agent user. Use GET /projects/{id} to inspect the project users array, and PATCH /projects/{id} to add users before assigning them. GET /workspace/users lists workspace users, but not every workspace user is assignable to every project. Leave null if no one is assigned yet.
blockedByIdsstring[]Array of existing task UUIDs that block this task. Blocking links can point at any task in the workspace. A cycle is rejected with TASK_BLOCKING_CYCLE. Use GET /tasks/grid to find accessible tasks.
componentItemEntityUniqueIdobjectComponent item entity unique ID if this task is related to a project component item. Used for linking tasks to specific components in project structures.
customFieldsTaskCustomFieldValueDto[]Array of custom field values. Each value must correspond to a custom field associated with the selected task type. Use GET /tasks/types and/or GET /tasks/custom-fields. The field value format depends on the field type.
Show propertiesHide properties
TaskCustomFieldValueDtofieldIdstringrequiredUUID of the custom field. Must be a custom field associated with the task type being used. Use GET /tasks/types and/or GET /tasks/custom-fields.
valuestringrequiredValue for the custom field. The format depends on the field type: Text/TextArea (string), Number (numeric string), Date (ISO 8601 date string), Checkbox (true/false string), Select (one of the predefined option values). Validation is performed based on the field type configuration.
deadlinestringTask deadline or due date in ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ). Used for tracking deadlines and generating deadline warnings.
descriptionstringrequiredAccepts 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
<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
<h1 class="heading-base"></h1>
bulletList Type: block list Content: listItem+ Atts: none
<ul class="list-base"><li></li></ul>
hardBreak Type: inline Atts: none
<br>
horizontalRule Type: block Atts: none
<hr class="hr-base">
orderedList Type: block list Content: listItem+ Atts:
- start: 1
- type: null
<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
<li></li>
blockquote Type: block Content: block+ (one or more block child nodes (e.g. paragraph, list, …)) Atts: none
<blockquote class="blockquote-base"><p class="paragraph-base"></p></blockquote>
codeBlock Type: block Content: text* (text only (plus marks if applicable), no block wrappers) Atts:
- language: null
<pre><code class="language-null/some-value"></code></pre>
table Type: block Content: tableRow+ Atts: none
<table style="width: 0px;"><colgroup></colgroup><tbody><tr></tr></tbody></table>
tableRow Content: (tableCell | tableHeader)* Atts: none
<tr></tr>
tableHeader Content: block+ (one or more block child nodes (e.g. paragraph, list, …)) Atts:
- colspan: 1
- rowspan: 1
- colwidth: null
- align: null
<th colspan="1" rowspan="1" colwidth="null/some-value" style="text-align: null/some-value;"><p class="paragraph-base"></p></th>
tableCell Content: block+ (one or more block child nodes (e.g. paragraph, list, …)) Atts:
- colspan: 1
- rowspan: 1
- colwidth: null
- align: null
<td colspan="1" rowspan="1" colwidth="null/some-value" style="text-align: null/some-value;"><p class="paragraph-base"></p></td>
callout Type: block Content: block+ (one or more block child nodes (e.g. paragraph, list, …)) Callout / info box. The icon attr is an emoji shortcode (e.g. :information_source:, :warning:); it appears on the callout. Body is block content (paragraphs, lists, etc.) — use normal block HTML such as <p class="paragraph-base"> inside the callout <div>. data-type is "callout". Atts:
- icon: :information_source:
<div data-type="callout" icon=":information_source:"><p class="paragraph-base"></p></div>
condition Type: block Content: conditionBody (a single condition body block) This node conditionally renders its content based on a set of rules. The rules are defined in the 'conditions' attribute. 'conditions' is an object like: { type: 'and' | 'or', expressions: Array<Expression | ConditionGroup> }. An 'Expression' is { field: string, operator: string, value: any }. A 'ConditionGroup' is a nested { type: 'and' | 'or', expressions: [...] }. Example for an expression: { field: 'invoice.total', operator: 'gt', value: 100 } means 'if invoice total is greater than 100'. Supported operators typically include: eq (equals), neq (not equals), gt (greater than), gte (greater than or equal to), lt (less than), lte (less than or equal to), contains, in, is_true, is_false, etc. Check editor UI for available fields and operators. ALL FIELDS CAN ONLY BE EXISTING VARIABLES. DO NOT INVENT NEW FIELDS. Atts:
- conditions: { "type": "and", "expressions": [] }
<condition conditions="{"type":"and","expressions":[]}"><condition-body><p class="paragraph-base"></p></condition-body></condition>
conditionBody Content: block+ (one or more block child nodes (e.g. paragraph, list, …)) Atts: none
<condition-body><p class="paragraph-base"></p></condition-body>
emoji Type: inline Inline emoji. icon is a colon shortcode (e.g. :thumbsup:, :white_check_mark:) stored in data-icon; body is often empty. Use names your emoji set supports; avoid inventing invalid shortcodes in final HTML if you need them to render. Atts:
- icon: :smile:
<span data-type="emoji" data-icon=":smile:"></span>
entity Type: inline Inline link chip to a Leadtime entity (task, project, etc.), usually from the !-picker or by pasting a leadtime link. Display text is #title; data-type is "entity".
- entityId: Stable id of the target entity (e.g. task or project id). Use ids from the Public API or the user’s context; do not fabricate ids.
- type: What kind of entity is linked (e.g. task, project) — must be consistent with entityId in your workspace.
- title: Shown as the visible #label after the chip; should match the real entity title.
- data: Optional extra JSON the client provides (may be empty). Do not put secrets in HTML. If the user has not given a real entity, use the API to search or create—do not guess UUIDs or labels. Atts:
- entityId: null
- type: null
- title: null
- data: {}
<span data-type="entity" entityid="null/some-value" type="null/some-value" title="null/some-value" data="[object Object]">#null/some-value</span>
appFile Type: block Block for a file attachment that already exists in the workspace.
- fileId: Id from Leadtime file storage. Must be real; do not make up.
- filename and size: Should match the stored file. Use the app upload or API to get a file id; do not embed arbitrary ids. Atts:
- fileId:
- filename:
- size: 0
<div data-type="appFile" fileid="" filename="" size="0"></div>
appImage Type: block Block for an image file already uploaded in Leadtime.
- fileId: Id of the stored image. Must be a real uploaded file; do not invent.
- filename: Display name; should match the file.
- width, align, size: Layout as in the editor. If no file id is available, obtain one via upload/API before outputting this node with a fake id. Atts:
- fileId:
- filename:
- width: 500
- align: left
- size: 0
<div data-type="appImage" fileid="" filename="" width="500" align="left" size="0"></div>
mention Type: inline Mentions a workspace member (inserted in the app via the @-picker). The visible label is @name.
- id: Leadtime user/employee id for the mentioned person. Must match a real user in the workspace; do not invent ids—resolve people from context or the Public API.
- name: Display name for the @mention label. Should match the user shown for id. HTML must keep data-type="mention" with data-id and data-name in sync; plain text in the node is the visible @name. Atts:
- id: null
- name: null
<span data-type="mention" data-name="null/some-value" data-id="null/some-value" id="null/some-value" name="null/some-value">@null/some-value</span>
pageBreak Type: block Page break for PDF/print output (void <page-break> element). Inserts a hard page break when exporting. Use sparingly where the user asked for a new printed page, not for normal on-screen line breaks (use hardBreak/paragraphs instead). Atts: none
<page-break></page-break>
editorPlaceholder Type: block Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…) Used in task-type / template fields as a single editable “field” slot. Renders as a <placeholder> block with inline* content (label/instructions) inside. Prefer normal paragraph nodes for free-form user content; use this when reproducing a structured template the user is editing, not for generic text. Atts: none
<placeholder></placeholder>
appVideo Type: block Block for a workspace video file already uploaded in Leadtime (not a generic external embed).
- fileId: Id of the stored file. Must be a file that actually exists in the workspace after upload; do not fabricate.
- filename: Display name; should match the file.
- width, align, size: Layout hints as in the editor; keep realistic values. If you do not have a file id, use the file upload or Public API first—do not guess ids. Atts:
- fileId:
- filename:
- width: 500
- align: left
- size: 0
<div data-type="appVideo" fileid="" filename="" width="500" align="left" size="0"></div>
collapse Type: block Content: collapseTitle collapseBody (a collapse title node, then a collapse body) Expandable/collapsible section. Required structure: one collapseTitle (summary, inline) then one collapseBody (blocks) as direct children, matching data-type= collapseTitle / collapseBody tags under <collapse>. Do not use title/body nodes outside of a collapse. Atts: none
<collapse><collapse-title></collapse-title><collapse-body><p class="paragraph-base"></p></collapse-body></collapse>
collapseBody Content: block+ (one or more block child nodes (e.g. paragraph, list, …)) Expandable body of a collapse. Only use as sibling of collapseTitle inside a collapse; holds the block content that shows when expanded. Atts: none
<collapse-body><p class="paragraph-base"></p></collapse-body>
collapseTitle Content: inline* (inline only — do not use block tags such as <p> inside; use e.g. <br>, <strong>, <em>, <span>…) Clickable title row of a collapse block. Only use inside a collapse that also has collapseBody; content is the summary line shown when collapsed. Atts: none
<collapse-title></collapse-title>
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
<span data-type="variable" data-id="null/some-value" id="null/some-value"></span>
embedVideo Type: block Embeds a third-party video in an iframe. The div carries data-video-embed with data-embed-url (iframe src) and data-original-url (canonical page URL).
- embedUrl: Must be a real embed/iframe URL (e.g. YouTube embed) that matches originalUrl.
- originalUrl: Human-facing link to the video page; keep it in sync with embedUrl. Do not leave placeholder URLs in final HTML if you claim a real video.
- Public API HTML may instead use <div data-type="embedVideo" src="supported provider URL" width="640" align="center"></div>. The server derives embedUrl. width is an optional positive integer; align is optionally left, center, or right. Atts:
- originalUrl:
- embedUrl:
- width: null
- align: null
<div originalurl="" embedurl="" width="null/some-value" align="null/some-value" data-video-embed="" data-original-url="" data-embed-url=""><iframe src=""></iframe></div>
Marks
link Atts:
- href: null
- target: _blank
- rel: noopener noreferrer nofollow
- class: null
- title: null
<a target="_blank" rel="noopener noreferrer nofollow" href="">link text example</a>
bold Atts: none
<strong>bold text example</strong>
code Atts: none
<code>code text example</code>
italic Atts: none
<em>italic text example</em>
strike Atts: none
<s>strike text example</s>
underline Atts: none
<u>underline text example</u>
enableSupportContingentbooleanEnable support contingent for this task. This flag marks a task as eligible for support contingent billing. Only available for Support projects.
estimatedTimenumberEstimated time to complete the task in hours (decimal allowed). Used for planning and capacity management. Example: 8 for 8 hours, 2.5 for 2.5 hours. The global OpenAPI schema marks this optional because requiredness is configured per task type. It is required when the selected task type lists estimatedTime in requiredFields. Use GET /tasks/types or GET /administration/task-settings/types to inspect requiredFields before POST /tasks.
guestAccessobject | nullWhether organization members (guest users) can access this task. When true, guest users can view and interact with the task. When false, only workspace members can access it. Leave null to use the project default.
iconobjectTask icon identifier. Must be in the format :icon_name: (e.g., :rocket:, :bug:, :memo:, :white_check_mark:). Used for visual identification in task lists and views. Leave null to use the default icon from the task type.
isChangeRequestbooleanWhether this task is a change request. Change requests are typically billed separately and tracked differently in Single projects. Used for scope change management.
linkedObjectIdsstring[]Object instance UUIDs to link to the new task via ObjectsOnTask. Use GET /objects to find object IDs. Requires the same permission as linking objects on an existing task (objects.canEdit). Invalid or inaccessible object IDs result in an error and the task is not created.
prioritystringrequiredTask priority level indicating urgency. Options: Low, Normal, High. Used for prioritization and filtering.
LowNormalHighproductsTaskProductSettingsDto[]Array of product settings to associate products with this task. Use GET /workspace/product-list for product IDs and GET /administration/product-catalog/{id} for variants/options. Each product setting includes the product ID, quantity, variant, and options.
Show propertiesHide properties
TaskProductSettingsDtoactiveFromFixedDatestring<date> | nullFixed start date when activeFromType is FixedDate. Format: ISO 8601 date (YYYY-MM-DD). Required when activeFromType is FixedDate.
activeFromTypestringType of activation start for the product. Immediately means it starts right away, ProjectBilling means it starts with project billing, FixedDate means it starts on a specific date.
ImmediatelyProjectBillingFixedDateactiveVariantIdobject | nullUUID of the variant that should be active. Use this to switch between variants (e.g., from Standard to Pro). Set to null if the product has no variants or to deactivate variant selection.
customPricesobjectrequiredCustom price overrides for base product, variants, and options. Keys can be "base", "variant_<variantId>", or "option_<optionValueId>". Each value contains priceFixed, priceSubscription, and pricePerUnit overrides. These prices are applied to the product when saving. Note: Tasks only support priceFixed, so priceSubscription and pricePerUnit are ignored.
optionsProductSettingOptionDto[]requiredArray of option selections. Each entry specifies which option is being configured and which values are selected. You must provide selections for all options defined on the product, even if no values are selected (use empty array for value). This updates the product configuration without changing product details like name or prices.
Show propertiesHide properties
ProductSettingOptionDtoidstringrequiredUUID of the product option. This identifies which option (e.g., "Color", "Size", "Support Level") is being configured.
valuestring[]requiredArray of UUIDs representing the selected option values. For example, if the option is "Color", this array might contain IDs for "Blue" and "Red" if multiple selections are allowed. Each value ID must be a valid UUID.
quantitynumberrequiredNumber of units of this product. Must be at least 1. This affects the total price calculation when using per-unit pricing.
projectIdstringrequiredUUID of the project this task belongs to. The project must exist and the user must have access to it.
statusIdstringrequiredUUID of the initial task status. The status must be valid for the selected task type. Common statuses include New, In Progress, Feedback, Resolved, Closed, and Backlog. Use GET /tasks/types or GET /administration/task-settings/types and choose a status id from the selected task type statuses array.
subTasksIdsstring[]Array of existing task UUIDs to add as subtasks. Subtasks allow breaking down complex tasks into smaller units. Each subtask must exist and be accessible. The parent-child relationship is established immediately.
summarystringBrief summary or short description of the task. This is a concise overview that appears in task cards and lists. The global OpenAPI schema marks this optional because requiredness is configured per task type. It is required when the selected task type lists summary in requiredFields. Use GET /tasks/types or GET /administration/task-settings/types to inspect requiredFields before POST /tasks.
tagsstring[]Array of tag UUIDs to categorize this task. Use GET /tags/task/list. Tags enable cross-project organization and filtering and can be automatically inherited from project components.
titlestringrequiredTask title or name. This is the main identifier shown in task lists and views.
typeIdstringrequiredUUID of the task type. The type defines the workflow, available statuses, custom fields, and dynamically required fields. Must be one of the task types allowed for this project (configured in the project settings). Use GET /projects/{id} to see which task types are available for the project, then use GET /tasks/types or GET /administration/task-settings/types to inspect the selected type requiredFields before creating the task.
Task created successfully
accountableobjectAccountable user details
accountableIdstringAccountable user ID
assignedToobjectAssigned user details
assignedToIdstringAssigned user ID
billedbooleanrequiredWhether task is billed
blockedByIdsstring[]requiredTask IDs that currently block this task
blockingIdsstring[]requiredTask IDs that this task currently blocks
childSpentTimenumberrequiredChild tasks spent time in minutes
commentsobject[]requiredTask comments; each body is HTML and may contain the same embedded appImage / appFile / appVideo divs with fileId as the task description. Fetch binaries via authenticated /api/public/workspace/files/{fileId} with the same Public API Bearer token when needed.
componentItemIdobjectComponent item ID
createdAtstring<date-time>requiredTask creation timestamp
customFieldsobjectrequiredCustom fields values
deadlinestring<date-time>Task deadline
descriptionstringrequiredTask description in HTML. May include embedded assets as elements such as <div data-type="appImage" fileId="…" filename="…"> (images), appFile, or appVideo—binary content is not embedded; use authenticated GET {appOrigin}/api/public/workspace/files/{fileId} with the same Public API Bearer token to retrieve it.
emailDetailsobjectEmail details
emailSendErrorstringEmail send error message
emailSendErrorCodestringEmail send error code
emailSendFailedAtstring<date-time>Email send failed timestamp
emailSendFailedTostring[]Email send failed recipients
enableSupportContingentbooleanrequiredEnable support contingent
estimatedTimenumberEstimated time in hours
guestAccessbooleanrequiredGuest access enabled for organization members
historyobject[]requiredTask history entries
iconobjectTask icon identifier in the format :icon_name: (e.g., :rocket:, :bug:, :memo:). Can be null if no custom icon is set.
iconIsGeneratingbooleanrequiredWhether icon is being generated by AI
idstringrequiredTask ID (UUID)
isBlockedbooleanrequiredTrue when at least one blocker is still New, In progress, Feedback, or Backlog
isChangeRequestbooleanrequiredWhether task is a change request
isParticipantbooleanrequiredWhether current user is a participant
notificationSettingsobjectrequiredNotification settings
parentTaskIdobjectParent task ID for subtasks
participantsCountnumberrequiredNumber of participants
participantsListstring[]requiredList of participant user IDs
priorityobjectrequiredTask priority (TaskPriority enum)
productsobject[]requiredTask products
projectobjectrequiredProject information
projectIdstringrequiredProject ID
quotationsobject[]requiredExpress quotations
shortNumbernumberrequiredTask short number (workspace-scoped)
skipFromBillingbooleanSkip from billing
spentTimenumberrequiredTotal spent time in minutes
statusIdstringrequiredTask status ID
subTasksIdsstring[]requiredChild task IDs
summarystringTask summary
summaryIsGeneratingbooleanrequiredWhether summary is being generated by AI
tagsstring[]requiredTask tags
titlestringrequiredTask title
titleIsGeneratingbooleanrequiredWhether title is being generated by AI
typeIdstringrequiredTask type ID
userIdstringrequiredCreator user ID
Validation errors or invalid data
errorsobjectmessagestringstatusCodenumberUnauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions