Creates a new defect record associated with a project.
Defects are used to track issues discovered during testing or execution.
The defect lifecycle begins in NEW status.
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_defect -H "Authorization: Bearer YOUR_API_TOKEN" -H "Content-Type: application/json" -d '{
"project_id": "proj_101",
"title": "Login fails with valid credentials",
"priority": "HIGH",
"severity": "CRITICAL"
}'
}| Parameter | Required | Description |
|---|---|---|
workspaceId | ✅ Yes | The ID of the workspace to create the defect for |
projectId | ✅ Yes | The ID of the project to create the defect for |
| Header | Required | Description |
|---|---|---|
Authorization | ✅ Yes | Bearer token in the format Bearer <API_TOKEN> |
This endpoint accepts the following request body:
| Parameter | Required | Description |
|---|---|---|
project_id | ✅ Yes | The ID of the project to create the defect for |
title | ✅ Yes | The title of the defect |
priority | ✅ Yes | The priority of the defect |
severity | ✅ Yes | The severity of the defect |
description | ❌ No | The description of the defect |
assignee_email | ❌ No | The email of the assignee |
due_date | ❌ No | The due date of the defect |
{
"data": {
"id": "def_3001",
"status": "NEW",
"project_id": "proj_101",
"title": "Login fails with valid credentials",
"priority": "HIGH",
"severity": "CRITICAL",
"description": "Users receive 500 error when submitting valid credentials.",
"assignee_email": "dev1@company.com",
"due_date": "2026-02-20",
"created_at": "2026-02-01T00:00:00Z",
"updated_at": "2026-02-11T15:00:00Z"
}
}