# Get webhook

> Source: https://truto.one/docs/api-reference/admin/webhooks/get/

`GET /webhook/{id}`

Resource: **Webhooks**

## Path parameters

- **`id`** _(string, required)_
  The ID of the webhook to get.

## Response body

- **`id`** _(string)_
  The ID of the webhook.
- **`target_url`** _(string)_
  The URL where the webhook should send the data.
- **`is_active`** _(boolean)_
  Whether the webhook is active or not. Inactive webhooks will not receive any data.
- **`environment_id`** _(string)_
  The ID of the environment that this webhook belongs to.
- **`event_types`** _(array<string>)_
  The list of event types that the webhook is subscribed to.
- **`created_at`** _(string)_
  The date and time when the webhook was created.
- **`updated_at`** _(string)_
  The date and time when the webhook was last updated.

## Code examples

### curl

```bash
curl -X GET 'https://api.truto.one/webhook/{id}' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.truto.one/webhook/{id}', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/webhook/{id}"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}

response = requests.get(url, headers=headers, params=params)
print(response.json())
```

### Truto TS SDK

```typescript
import Truto from '@truto/truto-ts-sdk';

const truto = new Truto({
  token: '<your_api_token>',
});

const result = await truto.webhook.get('<id>');

console.log(result);
```

### Truto Python SDK

```python
import asyncio
from truto_python_sdk import TrutoApi

truto_api = TrutoApi(token="<your_api_token>")

async def main():
    result = await truto_api.webhooks.get("<id>")
    print(result)

asyncio.run(main())
```
