# List events in a window

Returns events in a window, one page at a time.

```http
GET https://api.pozy.ai/v1/calendar/events
```

- Area: Email, calendar & files / Calendar
- Auth: Authorization: Bearer pz_live_...

## Query parameters

- `accountId` (string, required)
- `calendarId` (string)
- `from` (string (date-time), required)
- `to` (string (date-time), required)
- `title` (string)
- `location` (string)
- `showCancelled` (boolean)
- `expandRecurring` (boolean)
- `icalUid` (string)
- `sortOrder` (string): one of asc, desc
- `cursor` (string)
- `limit` (integer)
- `timezone` (string)

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/calendar/events?accountId=696e0b682d0a31188e7a2ba9&from=2026-10-02T09%3A00%3A00.000Z&to=2026-10-02T09%3A00%3A00.000Z&limit=50" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/calendar/events?accountId=696e0b682d0a31188e7a2ba9&from=2026-10-02T09%3A00%3A00.000Z&to=2026-10-02T09%3A00%3A00.000Z&limit=50", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/calendar/events",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    params={
        "accountId": "696e0b682d0a31188e7a2ba9",
        "from": "2026-10-02T09:00:00.000Z",
        "to": "2026-10-02T09:00:00.000Z",
        "limit": 50,
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `data`, array of object
  - `id`, string
  - `accountId`, string
  - `provider`, string: One of `google`, `microsoft`
  - `calendarId`, string
  - `title`, string
  - `description`, string: Can be null
  - `location`, string: Can be null
  - `start`, string
  - `end`, string
  - `allDay`, boolean
  - `timezone`, string: Can be null
  - `participants`, array of object
    - `email`, string (email), required
    - `name`, string: Can be null
    - `status`, string: One of `accepted`, `declined`, `tentative`, `pending`
    - `comment`, string: Can be null
  - `organizer`, object
    - one of: Email Address
      - `email`, string (email), required
      - `name`, string: Can be null
  - `recurrence`, array of string: Can be null
  - `reminders`, object
    - `useDefault`, boolean
    - `overrides`, array of object
      - `minutes`, integer
  - `conferencing`, object: Can be null
    - `provider`, string: One of `google_meet`, `teams`, `other`
    - `url`, string (URL)
  - `busy`, boolean
  - `visibility`, string: One of `default`, `public`, `private`
  - `status`, string: One of `confirmed`, `tentative`, `cancelled`
  - `icalUid`, string: Can be null
  - `masterEventId`, string: Can be null
  - `htmlLink`, string: Can be null
  - `readOnly`, boolean
  - `metadata`, map of string
  - `createdAt`, string (date-time): Can be null
  - `updatedAt`, string (date-time): Can be null
- `pagination`, object
  - `hasMore`, boolean
  - `nextCursor`, string: Can be null

```json
{
  "data": [
    {
      "id": "6bfebd43ddc270f6d2c56fc5",
      "accountId": "696e0b682d0a31188e7a2ba9",
      "provider": "google",
      "calendarId": "62fb57b5bc06db0fb2aad799",
      "title": "Launch day",
      "description": "A short description",
      "location": "string",
      "start": "string",
      "end": "string",
      "allDay": true,
      "timezone": "America/New_York",
      "participants": [
        {
          "email": "alex@example.com",
          "name": "Acme",
          "status": "accepted",
          "comment": "string"
        }
      ],
      "organizer": {
        "email": "alex@example.com",
        "name": "Acme"
      },
      "recurrence": [
        "string"
      ],
      "reminders": {
        "useDefault": true,
        "overrides": [
          {
            "minutes": 1
          }
        ]
      },
      "conferencing": {
        "provider": "google_meet",
        "url": "https://pozy.ai/media/example-1.jpg"
      },
      "busy": true,
      "visibility": "default",
      "status": "confirmed",
      "icalUid": "631069e90faa4f2a4fcda778",
      "masterEventId": "6de182ae3f76a86213b04d77",
      "htmlLink": "string",
      "readOnly": true,
      "metadata": {
        "key": "string"
      },
      "createdAt": "2026-10-02T09:00:00.000Z",
      "updatedAt": "2026-10-02T09:00:00.000Z"
    }
  ],
  "pagination": {
    "hasMore": true,
    "nextCursor": "string"
  }
}
```
