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/:commentId

Authorization

work-items:commentapi key scoperequired
Required scope when calling with an API key.

Path parameters

idstringrequired
Canonical work-item ID

Example: work_01k2...

commentIdstringrequired
DigitalStack comment ID

Example: comment_01k7...

Request body

bodystringoptional
Replacement body
archivebooleanoptional
Archive instead of editing body
source_comment_idstringoptional
Provider-native comment ID required for Jira edit writeback
confirmbooleanrequired
Must 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_auth

No credentials provided

401
invalid_api_key

API key is invalid or revoked

400
bad_request

Missing or invalid request fields

403
scope_insufficient

Key lacks the required write scope

403
scope_insufficient

Key lacks work-items:comment scope

404
comment_not_found

Comment does not exist or is outside the resolved workspace

400
provider_comment_mapping_required

source_comment_id is required to edit a Jira comment