# View list of hooks by type

List hooks by type with the TypeScript SDK.

Use `blnk.Hooks.list` to fetch registered [webhooks](/webhooks/overview), optionally filtered by type.

<Steps>
<Step title="Call the method">

```typescript blnk.Hooks.list
const response = await blnk.Hooks.list({
  type: 'PRE_TRANSACTION',
});
```

| Field | Type | Description |
| :-- | :-- | :-- |
| `options.type` | `string` | Optional filter: `PRE_TRANSACTION` or `POST_TRANSACTION`. Omit to list all hooks. |
</Step>

<Step title="Use the hook list">

Iterate over `response.data` to find hooks by type or active status. Save hook IDs you need for updates or deletion.

</Step>

<Step title="Response">

```json 200 OK
[
  {
    "id": "hk_890bdbc4-467f-4670-8424-5667e41daf29",
    "name": "Pre-transaction validation",
    "url": "https://api.example.com/validate",
    "type": "PRE_TRANSACTION",
    "active": true,
    "timeout": 30,
    "retry_count": 3,
    "created_at": "2024-11-26T08:36:36.238244338Z",
    "last_run": "2024-11-26T09:12:00.000000000Z",
    "last_success": true
  }
]
```

| Field | Type | Description |
| :-- | :-- | :-- |
| `response.data` | `object[]` | Array of hook objects returned by Core. |
| `response.data[].id` | `string` | Unique hook ID. |
| `response.data[].type` | `string` | Hook timing, such as `PRE_TRANSACTION` or `POST_TRANSACTION`. |
| `response.data[].active` | `boolean` | Whether the hook is enabled. |
</Step>
</Steps>