Creates a new requirement associated with a project.
Optionally links existing testcases to the requirement at creation time.
This operation generates an audit record.
Use this endpoint when you need to:
curl -X POST https://api.hawzu.com/api/v1/workspace/{workspaceId}/project/{projectId}/create_requirement \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"project_id": "proj_101", "title": "User login functionality", "description": "System must allow registered users to log in securely.", "type": "FUNCTIONAL", "status": "ACTIVE", "labels": ["authentication", "core"], "testcase_codes": ["TC_LOGIN_001", "TC_LOGIN_002"]}'| Parameter | Required | Description |
|---|---|---|
workspaceId | ✅ Yes | The ID of the workspace to create the requirement for |
projectId | ✅ Yes | The ID of the project to create the requirement for |
This endpoint accepts the following request body:
| Parameter | Required | Description |
|---|---|---|
project_id | ✅ Yes | The ID of the project to create the requirement for |
title | ✅ Yes | The title of the requirement |
description | ❌ No | The description of the requirement |
type | ✅ Yes | The type of the requirement |
status | ✅ Yes | The status of the requirement |
labels | ❌ No | The labels of the requirement |
testcase_codes | ❌ No | The codes of the testcases to link to the requirement |
| Header | Required | Description |
|---|---|---|
Authorization | ✅ Yes | Bearer <API_TOKEN> |
Content-Type | ✅ Yes | application/json |
{
"data": {
"id": "req_101",
"project_id": "proj_101",
"title": "User login functionality",
"type": "FUNCTIONAL",
"status": "ACTIVE",
"labels": ["authentication", "core"],
"testcase_codes": ["TC_LOGIN_001", "TC_LOGIN_002"],
"created_at": "2026-02-01T00:00:00Z",
"updated_at": "2026-02-01T00:00:00Z"
}
}