# Supported webhook events

> Request and response payload details for the Create Defect and Defect KPIs webhook events.

The following events are supported.

* [Create Defect](#create-defect-event): This event is triggered whenever a user invokes the "Create Defect" task from a test case result. It allows external defect management tools to receive defect reports with log information from test results.
* [Defect KPIs](#defect-kpis-event): This event is invoked when the defect key performance indicators (KPIs) on the Test Manager dashboard are refreshed. This lets you include statistics from external defect management systems to be displayed on the Test Manager dashboard.

In this section you can find the request and response payload details for each event.

## Create Defect event

Test Manager fires registered webhooks with the following payload:

```text
Request:
CreateDefectFromTestCaseLogRequest{
testExecutionId    string($uuid)
testCaseId    string($uuid)
variationId    string
nullable: true
linkToTestCaseLog    string
nullable: true
}
Response:
Returns a defect payload to allow Test Manager to add a link to the created defect in the test case log.
```

The [Test Manager REST API](https://docs.uipath.com/test-manager/automation-cloud/latest/user-guide/test-manager-api) lets you fetch details about the failed test to add information to the created defect.

## Defect KPIs event

Test Manager fires registered webhooks with the following payload:

```text
Request:
api/kpis/project/<projectid>/defectstatus
Response:
KPIConnectorDefectsDto{
totalDefects    integer($int32)
criticalDefects    integer($int32)
moderateDefects    integer($int32)
openDefects    integer($int32)
closedDefects    integer($int32)
status    ConnectorKPIStatusstring
Enum:
Array [ 3 ]
criticalDefectsLink    string
nullable: true
}
```
