# Webhook

Within Settings > Notifications, you can manage your webhook notifications.

{% hint style="info" %}
Notifications fire once a run is complete and can be hooked into **passed, failed,** and **rejected** statuses
{% endhint %}

## Creating a new webhook notification

| Name        | Description                                                                   |
| ----------- | ----------------------------------------------------------------------------- |
| Name        | Used to identify the run event.                                               |
| Run Status  | You can pick when this event fires, on Passed, Failed, or Rejected test runs. |
| Webhook URL | The webhook URL that will receive the API POST request.                       |

## Schema

Below is the expected schema you will receive

```json
{
  "status": "passed" | "failed" | "rejected",
  "run": {
    "runId": string,
    "triggerName": string,
    "triggerLabel": string
  },
  "testCases": 
    {
      "attributes": {
        "title": string,
        "status": string,
        "completedAt": string (ISO),
        "startedAt": string (ISO),
        "flow": {
          "title": string,
          "video": boolean,
          "lighthouse": boolean
        },
        "steps": {
            "status": string,
            "startedAt": string (ISO),
            "endedAt": string (ISO),
            "url": string,
            "node": {
              "variantType": string,
              "comparisonType": string,
              "value": string,
              "elementType": string,
              "elementSelector": string,
              "elementTitle": string,
              "label": string
            }
          }[]
      }
    }[]
}
```

## Verifying request came from DoesQA

We add a `x-doesqa-signature` header to our POST, which will display the value shown when you set the event up. Use this header to validate that the request came from us.
