# Get the calendar

`GET /v1/calendar`

Required scope: `meetings:read`

Events from every connected calendar and tasks due between `start` and `end` (at most 62 days), in time order.

## Query parameters

- `start` (string (date-time), required)
- `end` (string (date-time), required)
- `owner` (string, optional) Default: `"mine"`.

## Responses

- `200`: Successful Response
- `400`: The request is not valid.
- `401`: Not signed in, or the credentials are not valid.
- `402`: The balance is too low.
- `403`: Not allowed to do this.
- `404`: Not found.
- `409`: Conflicts with the current state.
- `413`: The request body is too large.
- `415`: The content type is not supported.
- `422`: A value in the request is not valid.
- `429`: Too many requests. Wait for `Retry-After` seconds.
- `500`: Something went wrong on our side.
- `502`: A service Valeron depends on refused the request.
- `503`: A service Valeron depends on is unavailable.

## Examples

### Request

```bash title="cURL"
curl "https://api.valeron.io/v1/calendar?start=2026-12-03T14%3A30%3A00Z&end=2026-12-03T14%3A30%3A00Z" \
  -H "Authorization: Bearer $VALERON_API_KEY"
```

```js title="JavaScript"
const response = await fetch("https://api.valeron.io/v1/calendar?start=2026-12-03T14%3A30%3A00Z&end=2026-12-03T14%3A30%3A00Z", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.VALERON_API_KEY}`,
  },
});
if (!response.ok) throw new Error(`Valeron returned ${response.status}`);
const data = await response.json();
```

```python title="Python"
import os
import requests

response = requests.get(
    "https://api.valeron.io/v1/calendar",
    headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"},
    params={
        "start": "2026-12-03T14:30:00Z",
        "end": "2026-12-03T14:30:00Z",
    },
)
response.raise_for_status()
data = response.json()
```

### Response 200

```json
{
  "data": [
    {
      "ends_at": "2026-12-03T14:30:00Z",
      "event": {
        "attendees": [
          {
            "email": "jordan@example.com",
            "name": "Jordan Rivera",
            "response": "example"
          }
        ],
        "calendar_id": "cal_01JN4XEMPV",
        "contact": {
          "id": "_01J8FC10VR",
          "name": "Jordan Rivera"
        },
        "description": "A short description.",
        "join_url": "example",
        "location": "example",
        "provider": {
          "label": "Example",
          "value": "example"
        },
        "recorder_status": {
          "label": "Example",
          "value": "example"
        },
        "recording_id": "rec_01JR70S5VT"
      },
      "id": "_01J8FC10VR",
      "is_all_day": true,
      "kind": "event",
      "owner": {
        "id": "_01J8FC10VR",
        "name": "Jordan Rivera"
      },
      "starts_at": "2026-12-03T14:30:00Z",
      "task": {
        "record": {
          "id": "_01J8FC10VR",
          "name": "Jordan Rivera",
          "object": "contacts"
        },
        "status": {
          "label": "Example",
          "value": "example"
        }
      },
      "title": "Discovery call"
    }
  ],
  "has_more": false
}
```

### Response 401

```json
{
  "error": null
}
```

### Response 402

```json
{
  "error": null
}
```

### Response 403

```json
{
  "error": null
}
```

### Response 404

```json
{
  "error": null
}
```
