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

# Webhook History

> Inspect webhook delivery logs for observability and troubleshooting.

# Webhook History

Use these endpoints to inspect webhook delivery attempts made by the platform.

## Authentication & scope

* Header: `X-API-Key: YOUR_API_KEY`
* Required scope: `webhooks:read`
* Use **API Reference** for interactive Try-it on both webhook history endpoints.

## `GET /v1/webhooks/history`

Lists paginated webhook delivery history.

<CodeGroup>
  ```bash Bash theme={null}
  curl -X GET "https://api.indigenius.ai/v1/webhooks/history?page=1&pageSize=10" \
    -H "X-API-Key: YOUR_API_KEY"
  ```

  ```javascript Node theme={null}
  const response = await fetch(
    'https://api.indigenius.ai/v1/webhooks/history?page=1&pageSize=10',
    { headers: { 'X-API-Key': process.env.INDIGENIUS_API_KEY } },
  );
  console.log(await response.json());
  ```

  ```python Python theme={null}
  import requests
  response = requests.get(
      "https://api.indigenius.ai/v1/webhooks/history",
      headers={"X-API-Key": "YOUR_API_KEY"},
      params={"page": 1, "pageSize": 10},
      timeout=30,
  )
  print(response.status_code)
  print(response.json())
  ```
</CodeGroup>

### `200 OK`

```json theme={null}
{
  "status": true,
  "message": "Webhook history fetched",
  "data": [
    {
      "id": "665e4a34c65bb95f2f2d72e1",
      "request_method": "POST",
      "response_code": 200,
      "request_duration": 421,
      "type": "developer_callback"
    }
  ]
}
```

### Common status codes

* `200` success
* `403` missing `webhooks:read`
* `500` server error

## `GET /v1/webhooks/history/{id}`

Fetches one webhook delivery log by id.

<CodeGroup>
  ```bash Bash theme={null}
  curl -X GET "https://api.indigenius.ai/v1/webhooks/history/665e4a34c65bb95f2f2d72e1" \
    -H "X-API-Key: YOUR_API_KEY"
  ```

  ```javascript Node theme={null}
  const historyId = '665e4a34c65bb95f2f2d72e1';
  const response = await fetch(
    `https://api.indigenius.ai/v1/webhooks/history/${historyId}`,
    {
      headers: { 'X-API-Key': process.env.INDIGENIUS_API_KEY },
    },
  );
  console.log(await response.json());
  ```

  ```python Python theme={null}
  import requests
  history_id = "665e4a34c65bb95f2f2d72e1"
  response = requests.get(
      f"https://api.indigenius.ai/v1/webhooks/history/{history_id}",
      headers={"X-API-Key": "YOUR_API_KEY"},
      timeout=30,
  )
  print(response.status_code)
  print(response.json())
  ```
</CodeGroup>

### Common status codes

* `200` success
* `403` missing `webhooks:read`
* `404` history item not found
* `500` server error

## Troubleshooting flow

1. Query `/v1/webhooks/history` for failed responses.
2. Open one record with `/v1/webhooks/history/{id}`.
3. Inspect `request_body`, `response_code`, and `response_body`.
4. Fix receiver and re-run your originating flow.
