# List Events

> GET /events — list your custom event definitions.

`GET /events`

Lists your [custom event](https://www.sendping.co/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 { SendPing } from 'sendping';

const mb = new SendPing('mb_xxxxxxxxx');

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

**Ruby**

```ruby
require "sendping"

SendPing.api_key = "mb_xxxxxxxxx"

SendPing::Events.list
```

**PHP**

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

use SendPing\SendPing;

$sendping = SendPing::client('mb_xxxxxxxxx');

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

**Python**

```python
import sendping

sendping.api_key = "mb_xxxxxxxxx"

sendping.Events.list()
```

**Go**

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

client := sendping.NewClient("mb_xxxxxxxxx")

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

**Rust**

```rust
use sendping::SendPing;

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

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

**Java**

```java
import co.sendping.SendPing;
import co.sendping.SendPingResponse;

SendPing sendping = new SendPing("mb_xxxxxxxxx");

SendPingResponse response = sendping.events().list();
```

**.NET**

```csharp
using SendPing;

ISendPing sendping = SendPingClient.Create("mb_xxxxxxxxx");

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

**cURL**

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

**CLI**

```bash
sendping 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.sendping.co/docs/api/errors) and [Pagination](https://www.sendping.co/docs/api/pagination).
