Edit or archive work-item comment
Edits or archives a comment. Jira-backed comment edits require the mapped Jira comment ID in source_comment_id.
PATCH
/api/v1/work-items/:id/comments/:commentIdAuthorization
work-items:commentapi key scoperequiredRequired scope when calling with an API key.
Path parameters
idstringrequiredCanonical work-item ID
Example: work_01k2...
commentIdstringrequiredDigitalStack comment ID
Example: comment_01k7...
Request body
bodystringoptionalReplacement body
archivebooleanoptionalArchive instead of editing body
source_comment_idstringoptionalProvider-native comment ID required for Jira edit writeback
confirmbooleanrequiredMust be true
Example request
{
"body": "Implementation started; PR will be attached shortly.",
"source_comment_id": "10041",
"confirm": true
}Request
curl -X PATCH "https://www.digitalstack360.com/api/v1/work-items/work_01k2.../comments/comment_01k7..." \
-H "Authorization: Bearer $DS_API_KEY" \
-H "Idempotency-Key: work-42-comment-edit-1" \
-H "Content-Type: application/json" \
-d '{"body":"Implementation started; PR will be attached shortly.","source_comment_id":"10041","confirm":true}'Examples use a placeholder key from your environment. Store your key in $DS_API_KEY — never commit it.
Response
200 OK
{
"data": {
"comment": {
"id": "comment_01k7...",
"body_preview": "Implementation started; PR...",
"archived_at": null
},
"changed_fields": [
"body"
],
"source_writeback": {
"mode": "provider_passthrough",
"source_system": "jira",
"provider_operation": "jira.editComment",
"provider_result": "applied"
}
}
}Errors
401
missing_authNo credentials provided
401
invalid_api_keyAPI key is invalid or revoked
400
bad_requestMissing or invalid request fields
403
scope_insufficientKey lacks the required write scope
403
scope_insufficientKey lacks work-items:comment scope
404
comment_not_foundComment does not exist or is outside the resolved workspace
400
provider_comment_mapping_requiredsource_comment_id is required to edit a Jira comment