v1

Swagger 2.02026-07-13107162315.5 KB
TaskDiscussion

Edit an existing task comment (body + attachments). Author-only. Internal-note flag, reply-to context, identity, and DateCreated are locked. Edits are silent (no new comment notification re-fires); only NEWLY-added @mentions trigger their mention notification.

FileAttachmentIDs is the FINAL canonical attachment set after edit — both previously linked IDs to keep and newly uploaded Draft IDs to add. Existing attachments not included are hard-deleted (S3 blob + DB row). Optimistic concurrency: pass ExpectedDateUpdated equal to the row's last-known DateUpdated to get a 409 on conflict.

put/api/TaskDiscussion

Request body

TaskResponseIDinteger

The TaskResponseID of the comment to edit. Must be authored by the current user.

ResponseBodystring

The new message body. Required (non-empty after sanitisation) if FileAttachmentIDs is empty. @mention markup is the same as on POST: <span class="mention" data-mentionid="12345">@Firstname Lastname</span> (the class attribute is required). On edit, only NEWLY-added mentions are notified/followed; mentions already present before the edit are not re-notified.

FileAttachmentIDsinteger[]

Final canonical attachment set after edit: existing IDs to KEEP plus new draft IDs to ADD. Existing IDs omitted from this list are hard-deleted. Maximum 8.

ExpectedDateUpdatedstring date-time

Optional optimistic-concurrency guard. If supplied and differs from the row's current DateUpdated, the edit is rejected with 409.

Response

OK

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