> ## 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 events

List events with cursor or offset pagination, optional filters, and time range.

` GET /events `

List events

List events with cursor or offset pagination, optional filters, and time range.

## 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

### ` source_id ` (query, optional)

Filter by source ID

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

### ` org_id ` (query, optional)

Organization ID

- ` value `: type ` string ` — Organization ID

### ` status ` (query, optional)

Filter by event status

- ` value `: type ` string ` — Filter by event status

### ` verification_status ` (query, optional)

Filter by verification status

- ` value `: type ` string ` — Filter by verification status

### ` dedup_status ` (query, optional)

Filter by dedup status

- ` value `: type ` string ` — Filter by dedup status

### ` method ` (query, optional)

Filter by HTTP method

- ` value `: type ` string ` — Filter by HTTP method

### ` search ` (query, optional)

Search by event ID or payload content

- ` value `: type ` string ` — Search by event ID or payload content

### ` cursor ` (query, optional)

Cursor for pagination

- ` value `: type ` string ` — Cursor for pagination

### ` direction ` (query, optional)

Cursor direction

- ` value `: type ` string ` — Cursor direction

  - enum: ` ["before","after"] `

  - default: ` "before" `

### ` after ` (query, optional)

ISO datetime lower bound

- ` value `: type ` string ` — ISO datetime lower bound

### ` before ` (query, optional)

ISO datetime upper bound

- ` value `: type ` string ` — ISO datetime upper bound

### ` limit ` (query, optional)

Max results (default 50, max 100)

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

  - example: ` "50" `

Example:

```json
"50"
```

### ` offset ` (query, optional)

Offset for pagination

- ` value `: type ` string ` — Offset for pagination

  - example: ` "0" `

Example:

```json
"0"
```

## Responses

### ` 200 ` — Paginated list of events

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` events `, ` pagination `

  - ` events `: type ` array `

    - ` array item `: type ` object `

      - Required fields: ` id `, ` source_id `, ` org_id `, ` env_id `, ` method `, ` content_type `, ` source_ip `, ` payload_size `, ` verification_status `, ` dedup_status `, ` status `, ` received_at `, ` source_name `, ` source_slug `

      - ` id `: type ` string `

      - ` source_id `: type ` string `

      - ` org_id `: type ` string `

      - ` env_id `: type ` string `

      - ` method `: type ` string `

      - ` content_type `: type ` string `; nullable

      - ` source_ip `: type ` string `; nullable

      - ` payload_size `: type ` integer `

      - ` verification_status `: type ` string `

      - ` dedup_status `: type ` string `

      - ` status `: type ` string `

      - ` received_at `: type ` string `

      - ` source_name `: type ` string `; nullable

      - ` source_slug `: type ` string `; nullable

  - ` pagination `: type ` object `

    - Required fields: ` total `, ` limit `, ` offset `, ` has_more `

    - ` total `: type ` number `

    - ` limit `: type ` number `

    - ` offset `: type ` number `

    - ` has_more `: type ` boolean `

    - ` next_cursor `: type ` string `; nullable

    - ` prev_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/events' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://hookstream.io/v1/events', {
  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/events', headers=headers)
print(response.json())
```

### Go

```go
package main

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

func main() {
	req, _ := http.NewRequest("GET", "https://hookstream.io/v1/events", 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))
}
```