Hi @Chang, Linda ,
Thanks for reaching out to Microsoft Q&A.
Below is a sample REST API request (JSON-patch style) to create a new work item of type “Release” that includes all the usual required fields (title, area path, iteration path) plus a couple of common built-in fields.
You can tweak it to include any custom fields or relations your process enforces.
Sample HTTP request
POST https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/$Release?api-version=7.1-preview.3
Headers:
- Content-Type: application/json-patch+json
- Authorization: Basic BASE64_PAT
- Request body (JSON-patch array):
[
{
"op": "add",
"path": "/fields/System.Title",
"value": "Release v1.2.0"
},
{
"op": "add",
"path": "/fields/System.Description",
"value": "Deploying version 1.2.0 to production"
},
{
"op": "add",
"path": "/fields/System.AreaPath",
"value": "ContosoProject\\Releases"
},
{
"op": "add",
"path": "/fields/System.IterationPath",
"value": "ContosoProject\\Releases\\Sprint 23"
},
{
"op": "add",
"path": "/fields/Microsoft.VSTS.Common.Priority",
"value": 2
},
{
"op": "add",
"path": "/fields/Custom.ReleaseDate",
"value": "2024-07-15T10:00:00Z"
},
{
"op": "add",
"path": "/relations/-",
"value": {
"rel": "System.LinkTypes.Hierarchy-Reverse",
"url": "https://dev.azure.com/{organization}/_apis/wit/workItems/123",
"attributes": {
"comment": "Parent release work item"
}
}
}
]
Notes:
- Replace
{organization},{project}and the PAT placeholder with your values. - Change or remove the custom field (
Custom.ReleaseDate) to match your process rules. - If your “Release” work‐item type has additional required fields, add them as more
"add"/fields/...operations.
Alternatively, using the Azure CLI:
az boards work-item create \
--title "Release v1.2.0" \
--type Release \
--area "ContosoProject\Releases" \
--iteration "ContosoProject\Releases\Sprint 23" \
--fields "System.Description=Deploying version 1.2.0 to production" \
"Microsoft.VSTS.Common.Priority=2" \
"Custom.ReleaseDate=2024-07-15T10:00:00Z" \
--org https://dev.azure.com/{organization} \
--project ContosoProject
Hope this helps!
If the resolution was helpful, kindly take a moment to click on and click on Yes for was this answer helpful. And, if you have any further query do let us know.