# List webhooks

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

`GET /webhook`

Resource: **Webhooks**

## Response body

- **`results`** _(array<object>)_
  - **`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.
- **`next_cursor`** _(string)_
- **`limit`** _(number)_

## Code examples

### curl

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

### JavaScript

```javascript
const response = await fetch('https://api.truto.one/webhook', {
  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"
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>',
});

for await (const item of truto.webhook.list()) {
  console.log(item);
}
```

### Truto Python SDK

```python
import asyncio
from truto_python_sdk import TrutoApi

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

async def main():
    async for item in truto_api.webhooks.list():
        print(item)

asyncio.run(main())
```
