# List Events

> GET /events — list your custom event definitions.

`GET /events`

Lists your [custom event](https://www.senddart.com/docs/automations/custom-events) definitions. This endpoint is always paginated: `limit` defaults to `20` even when you do not send it, so an account with more definitions than that gets one page plus `has_more: true`. Page through the rest with `after`.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | number | No | Number of event definitions to retrieve. Minimum `1`, maximum `100`, default `20`. |
| `after` | string | No | The id after which to retrieve more definitions (for pagination). Not included in the result. Cannot be combined with `before`. |
| `before` | string | No | The id before which to retrieve more definitions (for pagination). Not included in the result. Cannot be combined with `after`. |

**Node.js**

```js
import { SendDart } from 'senddart';

const mb = new SendDart('mb_xxxxxxxxx');

const { data, error } = await mb.events.list();
console.log({ data, error });
```

**Ruby**

```ruby
require "senddart"

SendDart.api_key = "mb_xxxxxxxxx"

SendDart::Events.list
```

**PHP**

```php
<?php
require 'vendor/autoload.php';

use SendDart\SendDart;

$senddart = SendDart::client('mb_xxxxxxxxx');

$senddart->events->list();
```

**Python**

```python
import senddart

senddart.api_key = "mb_xxxxxxxxx"

senddart.Events.list()
```

**Go**

```go
import "github.com/shekhu10/senddart-sdks/senddart-go"

client := senddart.NewClient("mb_xxxxxxxxx")

events, err := client.Events.List(nil)
```

**Rust**

```rust
use senddart::SendDart;

let mb = SendDart::new("mb_xxxxxxxxx");

let _events = mb.events.list(None).await?;
```

**Java**

```java
import com.senddart.SendDart;
import com.senddart.SendDartResponse;

SendDart senddart = new SendDart("mb_xxxxxxxxx");

SendDartResponse response = senddart.events().list();
```

**.NET**

```csharp
using SendDart;

ISendDart senddart = SendDartClient.Create("mb_xxxxxxxxx");

var resp = await senddart.EventListAsync();
```

**cURL**

```bash
curl -X GET 'https://www.senddart.com/api/events' \
  -H 'Authorization: Bearer mb_xxxxxxxxx'
```

**CLI**

```bash
senddart events list
```

### Response

```json
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "event",
      "id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e",
      "name": "user.created",
      "schema": {
        "plan": "string"
      },
      "created_at": "2026-06-23T10:00:00.000Z",
      "updated_at": "2026-06-23T10:00:00.000Z"
    }
  ]
}
```

Returns `validation_error` if `limit` is outside 1–100 or if both `after` and `before` are supplied. See [Errors](https://www.senddart.com/docs/api/errors) and [Pagination](https://www.senddart.com/docs/api/pagination).
