# GET /api/v1/credit/events

> Poll the credit event feed

- **Tag:** credit
- **Operation ID:** `list_credit_events_api_v1_credit_events_get`

## Description

Every credit event in order, from a cursor. Pass the returned `next_cursor` as `after` on the following call. This is the polling half of event delivery — the same events are pushed to any registered webhook endpoint, so a partner may use either or both, and replay through this feed after an outage.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Parameters

- `after` (query, integer, optional) — Return events after this sequence number.
- `event_types` (query, string, optional) — Comma-separated event types to include.
- `credit_line_id` (query, string, optional)
- `limit` (query, integer, optional)

## Responses

### 200 — Successful Response

Schema: `SuccessEnvelope_CreditEventFeedResponse_`

- `success` (boolean)
- `message` (string)
- `code` (string)
- `data` (CreditEventFeedResponse)

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X GET 'https://api.ondayzero.com/api/v1/credit/events' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/credit/events', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
  },
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

response = httpx.get("https://api.ondayzero.com/api/v1/credit/events", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/credit/list-credit-events
- OpenAPI slice: https://www.ondayzero.com/docs/reference/credit/list-credit-events/openapi.json
- Other endpoints in **credit**: https://www.ondayzero.com/docs/reference/credit
