# Events

> 2 endpoints: list events, retrieve an event.

- [List events](#list-events): `GET /v1/events`
- [Retrieve an event](#retrieve-an-event): `GET /v1/events/{event_id}`

### List events

`GET /v1/events`

Lists this Workspace's events of the last 30 days, newest first. The same objects your webhook endpoints receive.

Permission: `events:read`

#### Query parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer | No | Items per page, 1 to 100. (1 to 100, default 25) |
| `cursor` | string | No | The next_cursor of the previous page. (up to 512 characters) |
| `type` | string | No |  (up to 64 characters) |
| `project_id` | string | No |  (up to 128 characters) |

#### Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | `"list"` | Yes |  |
| `data` | array of object | Yes |  |
| `data[].id` | string | Yes |  (up to 128 characters) |
| `data[].object` | `"event"` | Yes |  |
| `data[].type` | string | Yes |  |
| `data[].api_version` | string | Yes |  |
| `data[].created` | integer | Yes | Seconds since the epoch. (-9007199254740991 to 9007199254740991) |
| `data[].livemode` | boolean | Yes |  |
| `data[].workspace_id` | string | Yes |  (up to 128 characters) |
| `data[].project_id` | string or null | Yes |  |
| `data[].data` | object | Yes |  |
| `has_more` | boolean | Yes |  |
| `next_cursor` | string or null | Yes |  |

```bash
curl https://api.nowscale.com/v1/events \
  -H "Authorization: Bearer $NOWSCALE_API_KEY"
```

### Retrieve an event

`GET /v1/events/{event_id}`

Returns one event of the last 30 days.

Permission: `events:read`

#### Path parameters

| Name | Description |
| --- | --- |
| `event_id` | The event's id. |

#### Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes |  (up to 128 characters) |
| `object` | `"event"` | Yes |  |
| `type` | string | Yes |  |
| `api_version` | string | Yes |  |
| `created` | integer | Yes | Seconds since the epoch. (-9007199254740991 to 9007199254740991) |
| `livemode` | boolean | Yes |  |
| `workspace_id` | string | Yes |  (up to 128 characters) |
| `project_id` | string or null | Yes |  |
| `data` | object | Yes |  |
| `data.object` | object | Yes |  |

```bash
curl https://api.nowscale.com/v1/events/EVENT_ID \
  -H "Authorization: Bearer $NOWSCALE_API_KEY"
```
