Create, Update, and Comment on a Work Item
A 3-step recipe with Azure DevOps. We can help you get access.
Recipe · 3 steps
Create, Update, and Comment on a Work Item
with Azure DevOps
Create a work item, move it to a new state, and add a comment.
- Create a new work item of the requested type by submitting a JSON Patch document that sets the title and description fields.
- Apply a JSON Patch that replaces the work item state and, when provided, its assignee, moving the item into an active working state.
- Append a comment to the work item describing the change. This endpoint uses application/json (not the JSON Patch media type).
What you'll need to have ready
- apiVersion: Azure DevOps REST API version (e.g. 7.1).
- type: Work item type to create (e.g. Bug, Task, User Story).
- title: Title for the new work item.
- description: Optional description (HTML) for the new work item.
- newState: State to transition the work item to (e.g. Active).
- assignedTo: Optional user to assign the work item to.
- commentText: Comment text to append to the work item (HTML supported).
- accessToken: Azure DevOps bearer (OAuth 2.0) access token.
For your developer
Arazzo workflow microsoft-azure-devops:create-update-comment-work-item, 3 operations: workItems_create → workItems_update → workItems_addComment. Specs on APIs.io.