> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hookstream.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List audit log entries

List audit log entries for the organization with optional filters and cursor pagination.

` GET /audit-log `

List audit log entries

List audit log entries for the organization with optional filters and cursor pagination.

## Servers

- ` https://hookstream.io/v1 ` — Production

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` apiKey `: ` apiKey `

  - Credential: ` X-API-Key ` in ` header `

  - API key (format: hs_live_<64hex> or hs_test_<64hex>)

### Alternative 2

- ` cookieAuth `: ` apiKey `

  - Credential: ` better-auth.session_token ` in ` cookie `

  - Session cookie (browser auth)

## Parameters

### ` resource_type ` (query, optional)

Filter by resource type (e.g. source, destination)

- ` value `: type ` string ` — Filter by resource type (e.g. source, destination)

### ` resource_id ` (query, optional)

Filter by resource ID

- ` value `: type ` string ` — Filter by resource ID

### ` action ` (query, optional)

Filter by action (e.g. create, delete)

- ` value `: type ` string ` — Filter by action (e.g. create, delete)

### ` limit ` (query, optional)

Max results (default 50, max 200)

- ` value `: type ` string ` — Max results (default 50, max 200)

  - example: ` "50" `

Example:

```json
"50"
```

### ` cursor ` (query, optional)

Pagination cursor (created_at|id)

- ` value `: type ` string ` — Pagination cursor (created_at|id)

## Responses

### ` 200 ` — Audit log entries

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` audit_log `, ` has_more `, ` next_cursor `

  - ` audit_log `: type ` array `

    - ` array item `: type ` object `

      - Required fields: ` id `, ` org_id `, ` user_id `, ` action `, ` resource_type `, ` resource_id `, ` details `, ` ip_address `, ` created_at `

      - ` id `: type ` string `

      - ` org_id `: type ` string `

      - ` user_id `: type ` string `; nullable

      - ` action `: type ` string `

      - ` resource_type `: type ` string `

      - ` resource_id `: type ` string `; nullable

      - ` details `: type ` string `; nullable

      - ` ip_address `: type ` string `; nullable

      - ` created_at `: type ` string `

  - ` has_more `: type ` boolean `

  - ` next_cursor `: type ` string `; nullable

### ` 401 ` — Unauthorized

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` string ` — Error message

## Request examples

### cURL

```curl
curl -X GET 'https://hookstream.io/v1/audit-log' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://hookstream.io/v1/audit-log', {
  method: 'GET',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN"
  }
});

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

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.get('https://hookstream.io/v1/audit-log', headers=headers)
print(response.json())
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://hookstream.io/v1/audit-log", nil)
	req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")

	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
	result, _ := io.ReadAll(resp.Body)
	fmt.Println(string(result))
}
```