v1

latestSwagger 2.02026-07-13107162315.5 KB
TaskDiscussion

Post a new comment / discussion message to a task. Supports plain comments, internal notes, replies to existing messages, and file attachments.

To attach files, first upload each file via POST /api/FileAttachment (without a LinkTo) — that returns a FileAttachmentID with AttachmentType='Draft'. Then pass those IDs in FileAttachmentIDs here. Each ID must be owned by the current user and not already linked to another entity. Maximum 8 attachments per message; ResponseBody is capped at 16,000 characters.

To @mention a user — which notifies them and adds them as a follower of the task — embed a mention span in ResponseBody. The span MUST carry a class attribute immediately before data-mentionid, e.g. <span class="mention" data-mentionid="12345">@Firstname Lastname</span>. The class attribute is required: a span with only data-mentionid (no class) is stored as plain text and is NOT parsed as a mention, so the user is neither notified nor followed. Resolve the numeric user id via GET /api/User. Repeat the span to mention multiple users.

post/api/TaskDiscussion

Request body

TaskIDinteger

The TaskID to post the discussion message to. Required.

ResponseBodystring

The message body. May contain a limited HTML subset (sanitised on save). Required unless FileAttachmentIDs is non-empty. To @mention a user (notifies them and adds them as a task follower), include a span that carries a class attribute immediately before data-mentionid, e.g. <span class="mention" data-mentionid="12345">@Firstname Lastname</span>. The class attribute is required — a span with data-mentionid but no class is stored as plain text and is NOT treated as a mention. Resolve the numeric user id via GET /api/User.

isInternalNoteboolean

True to post as an internal note (not visible to external/customer users). Only team members may post internal notes. Default: false.

ReplyToMessageIDinteger

Optional. The TaskResponseID of an existing message on the same task being replied to. Set null/0/omit for a top-level message.

FileAttachmentIDsinteger[]

Optional. List of FileAttachmentIDs returned from prior /api/FileAttachment uploads to attach to this message. Each must be owned by the current user and not already linked (AttachmentType='Draft'). Maximum 8 per message.

Response

The newly created discussion message in the same shape used inside the Get TaskDiscussion responses[] array.

TaskResponseIDinteger

Unique identifier for this discussion message.

CreatedByNamestring

Display name of the message author.

isActiveboolean

Whether this message is active (not deleted).

CreatedByUserIDFKinteger

User ID of the message author.

ResponseBodystring

The message content (may contain HTML).

DateCreatedStringstring

Formatted creation date string.

canDeleteboolean

Whether the current user can delete this message.

canEditboolean

Whether the current user can edit this message (author + not system + active membership).

isInternalNoteboolean

Whether this is an internal note (not visible to external contacts).

Unreadstring

Whether this message is unread by the current user.

isSystemboolean

Whether this is a system-generated message (e.g. status change notification).

isEditedboolean

True if the author has edited this message after posting; drives the (edited) UI indicator.

DateLastEditedUtcstring date-time

Timestamp (UTC) of the most recent user edit. Null if never edited. Distinct from DateUpdated.

ReplyToMessageIDinteger

The message ID this is a reply to, if any.

ReplyToDateCreatedstring date-time

Creation date of the message being replied to.

ReplyToCreatedByUserIDFKinteger

User ID of the author of the message being replied to.

ReplyToUserNamestring

Author name of the message being replied to.

ReplyToBodystring

Body of the message being replied to.

ReplyToFileID1integer
ReplyToFilePreview1string
ReplyToFileProvider1string
ReplyToFileName1string
ReplyToFileType1string