# List Events

> List your organization's events from every source, newest first

URL: https://docs.lemuai.com/api-reference/events/list

Returns your organization's events, newest first. This is the same data as the [Event Log](https://docs.lemuai.com/event-log/overview) page. It includes events you sent with [Send an event](https://docs.lemuai.com/api-reference/events/trigger) and events from other sources, such as Shopify, your [tracking sources](https://docs.lemuai.com/website-pixel/overview), [segments](https://docs.lemuai.com/segments/overview) and [custom records](https://docs.lemuai.com/records/overview).

**Endpoint:** `GET /api/v1/events`

## Headers

| Name | Required | Description |
|---|---|---|
| `X-API-Key` | Yes | An API key from your organization. See [Authentication](https://docs.lemuai.com/api-reference/authentication). |

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `event_type` | string | No | Only return events of this type, for example `Purchase`. A Meta standard event name also returns events stored under its older names, so `Purchase` includes `order_placed` and `checkout_completed`. See [Standard and conversion events](https://docs.lemuai.com/website-pixel/standard-events#old-names-that-still-match). |
| `source` | string | No | Only return events from this source. See [Event sources](#event-sources) below. |
| `include_message_updates` | boolean | No | Also return message status updates, such as `message_sent` or `message_delivered`. Default `false`. Only works when the event store is on (see `store` below). |
| `search` | string | No | Match against the phone number, the contact's name or the event type. |
| `start_date` | string | No | Earliest event to include, as `YYYY-MM-DD` or a full ISO date and time. |
| `end_date` | string | No | Latest event to include, as `YYYY-MM-DD` (the whole day is included) or a full ISO date and time. |
| `limit` | integer | No | How many events to return, 1 to 500. Default `100`. |
| `offset` | integer | No | How many events to skip, for paging. Default `0`. |

## Event sources

| Source | Where the event came from |
|---|---|
| `api` | [Send an event](https://docs.lemuai.com/api-reference/events/trigger) |
| `shopify` | Your connected Shopify store |
| `pixel` | A [tracking source](https://docs.lemuai.com/website-pixel/overview): the LemuAI website snippet or an app SDK, including visits by people who aren't known yet |
| `messaging` | Status changes of messages and calls on any channel |
| `segments` | A contact entering or leaving a segment |
| `records` | A custom record being created, updated or deleted |
| `backfill` | Older events copied in when the event store was turned on |

**Example request:**

**cURL**

```bash
curl "https://app.lemuai.com/api/v1/events?source=api&event_type=cart_abandoned&start_date=2026-10-01&limit=50" \
  -H "X-API-Key: lemu_your_api_key"
```

**JavaScript**

```js
const res = await fetch("https://app.lemuai.com/api/v1/events?source=api&event_type=cart_abandoned&start_date=2026-10-01&limit=50", {
  method: "GET",
  headers: {
    "X-API-Key": process.env.LEMU_API_KEY,
  },
});
if (!res.ok) throw new Error(`LemuAI API ${res.status}: ${await res.text()}`);
const data = await res.json();
console.log(data);
```

**Python**

```python
import os

import requests

response = requests.get(
    "https://app.lemuai.com/api/v1/events?source=api&event_type=cart_abandoned&start_date=2026-10-01&limit=50",
    headers={
        "X-API-Key": os.environ["LEMU_API_KEY"],
    },
    timeout=30,
)
response.raise_for_status()
print(response.json())
```

## Response

**`200`**
```json
{
  "events": [
    {
      "id": 90412,
      "event_id": "3f6c2a9e-8d1b-5c7a-9e42-1b7d0c5a6f13",
      "event_type": "cart_abandoned",
      "source": "api",
      "phone": "+919876543210",
      "contact_id": 5531,
      "contact_name": "Priya Sharma",
      "anonymous_id": null,
      "event_data": {
        "first_name": "Priya",
        "cart_amount": 2499,
        "product_name": "Running shoes"
      },
      "created_at": "2026-10-27T09:14:02.511000+00:00"
    }
  ],
  "total": 1,
  "store": "clickhouse"
}
```

| Field | Type | Description |
|---|---|---|
| `events` | array | The events on this page, newest first. |
| `events[].id` | integer | The event's number in LemuAI. This is the `event_id` returned by Send an event. It is `0` for events that are only kept in the event store, such as page views by website visitors. |
| `events[].event_id` | string | A unique id (UUID) for the event. Every event has one, so use it when you need a stable id. |
| `events[].event_type` | string | The event name. |
| `events[].source` | string | Where the event came from. See [Event sources](#event-sources). |
| `events[].phone` | string or null | The phone number sent with the event. |
| `events[].contact_id` | integer or null | The contact the event is linked to. |
| `events[].contact_name` | string or null | That contact's name, if known. |
| `events[].anonymous_id` | string or null | The website visitor id, for activity by a visitor who isn't linked to a contact yet. |
| `events[].event_data` | object | The details sent with the event. |
| `events[].created_at` | string | When the event happened, in ISO 8601 (UTC). |
| `total` | integer | How many events match your filters in total, for paging with `limit` and `offset`. |
| `store` | string | Where the events were read from: `clickhouse` (the event store, which holds every source including anonymous website visits) or `postgres` (the main database, used when the event store isn't on). |

**Note:** API keys see full phone numbers here. In the dashboard, team members without permission to view personal data see them partly hidden.

## Errors

| Status | When |
|---|---|
| `401` | The API key is missing or not valid. |
| `422` | A query parameter has the wrong type, or `limit` is outside 1 to 500. |

See [Errors](https://docs.lemuai.com/api-reference/errors) for the error format.
