# Read a webhook endpoint.

> The full `url` needs `config` (or the session); otherwise it is cut to its origin and path and `urlShortened` is true when that removed something.
> https://koi.dog/docs/api/webhooks/get-webhook/

`GET /api/v1/webhooks/{id}` · Scope: `read`

No query parameters.

## Path parameters.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | The webhook endpoint's id. |

## Response.

200 OK: a `Webhook`. The example has placeholder values.

## Request.

```sh
curl "https://app.koi.dog/api/v1/webhooks/$ID" \
    -H "Authorization: Bearer $KOIDOG_API_KEY"
```

```js
const res = await fetch(`https://app.koi.dog/api/v1/webhooks/${process.env.ID}`, {
  headers: {
    Authorization: `Bearer ${process.env.KOIDOG_API_KEY}`,
  },
});
console.log(await res.json());
```

```python
import os

import requests

r = requests.get(
    f"https://app.koi.dog/api/v1/webhooks/{os.environ['ID']}",
    headers={
        "Authorization": f"Bearer {os.environ['KOIDOG_API_KEY']}",
    },
)
r.raise_for_status()
print(r.json())
```

## Response example.

```json
{
  "id": "string",
  "url": "string",
  "urlShortened": false,
  "description": "string",
  "events": [],
  "projectId": "string",
  "enabled": false,
  "disabledReason": "string",
  "disabledAt": "string",
  "secretPrefix": "string",
  "consecutiveFailures": 0,
  "lastSuccessAt": "string",
  "lastFailureAt": "string",
  "createdAt": "string"
}
```
