# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.does.qa/configuration/notifications/webhook.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
