post Comment
suspend fun postComment(featureRequestId: String, draft: CommentDraft, userToken: String): FeatureRequestComment(source)
Posts a new comment or threaded @reply on a feature request via POST /api/v1/feature-requests/{id}/comments.
Return
The created FeatureRequestComment with server-assigned ID and timestamp.
Parameters
feature Request Id
ID of the feature request being commented on.
draft
Comment text and optional author/reply metadata (CommentDraft).
user Token
Stable anonymous token from UserTokenStore, sent as the X-User-Token header.
Throws
if commenting requires sign-in (HTTP 401).
on HTTP errors.
on network or parsing errors.
Example:
val draft = CommentDraft(
body = "Great idea! I can help test this if you need beta feedback.",
authorName = "Jordan",
parentId = parentComment?.id,
replyToAuthorName = parentComment?.authorName
)
val comment = client.postComment("req_123", draft, userToken = userToken)
println("Posted comment: ${comment.id}")Content copied to clipboard