Add work-item comment
Adds one attributable comment. For Jira-backed work items, DigitalStack validates the request and passes the comment through to Jira before recording the local audit/result.
POST
/api/v1/work-items/:id/commentsAuthorization
work-items:commentapi key scoperequiredRequired scope when calling with an API key.
Path parameters
idstringrequiredCanonical work-item ID
Example: work_01k2...
Request body
bodystringrequiredComment body
expected_versionnumberoptionalOptimistic work-item version guard
mentionsarrayoptionalMentioned DigitalStack user IDs
confirmbooleanrequiredMust be true
Example request
{
"body": "Implementation started. I will attach the PR when ready.",
"expected_version": 7,
"mentions": [
"user_jordan"
],
"confirm": true
}Request
curl -X POST "https://www.digitalstack360.com/api/v1/work-items/work_01k2.../comments" \
-H "Authorization: Bearer $DS_API_KEY" \
-H "Idempotency-Key: work-42-comment-20260715" \
-H "Content-Type: application/json" \
-d '{"body":"Implementation started. I will attach the PR when ready.","expected_version":7,"mentions":["user_jordan"],"confirm":true}'Examples use a placeholder key from your environment. Store your key in $DS_API_KEY — never commit it.
Response
200 OK
{
"data": {
"work_item": {
"id": "work_01k2...",
"key": "DSN-42",
"version": 7
},
"comment": {
"id": "comment_01k7...",
"body_preview": "Implementation started...",
"created_at": "2026-07-15T18:22:04Z"
},
"source_writeback": {
"mode": "provider_passthrough",
"source_system": "jira",
"provider_operation": "jira.addComment",
"provider_result": "applied"
}
},
"meta": {
"idempotency_replayed": false
}
}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
400
comment_body_requiredbody is required
409
stale_work_item_versionexpected_version does not match the current work item version
409
provider_writeback_unavailableThe source provider cannot accept this command