# Events API

The same events your webhook endpoints receive, read by long-polling.

Source: https://clipmux.com/docs/reference/api/events

`npx @clipmux/node listen` uses it.

## Long-poll the app's webhook events [#long-poll-the-apps-webhook-events]

`GET /v1/events`

The app's webhook events created at or after `since` (default now), oldest first, up to 100. `body` is exactly what an endpoint receives. Long-polls up to `wait` seconds (at most 25) until an event is newer than `after`, the `created_at` of the newest event you have.

**Authentication:** An API key with `assets:read`.

### Parameters [#parameters]

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `since` | query | string (date-time) | no |  |
| `after` | query | string (date-time) | no | The created_at (RFC 3339) of the newest event you have; the poll waits for a newer one. |
| `wait` | query | integer | no |  |

### Response 200 [#response-200]

Oldest first, at most 100

```json
{
  "data": [
    {
      "id": "evt_01j2ef9545dh466aggzfdgtejb",
      "created_at": "2026-11-18T09:34:12Z",
      "body": {
        "id": "evt_01j2ef9545dh466aggzfdgtejb",
        "type": "video.asset.ready",
        "created_at": "2026-11-18T09:34:12Z",
        "data": {
          "id": "ast_01jhsze3w2mhtbzr5qv1w5xy68",
          "app_id": "app_01j6hrm8vmt8f27hd13py42rdc",
          "status": "ready",
          "version": 4,
          "passthrough": "lesson_42",
          "title": "Lesson 42: Sorting",
          "base_url": "https://media.example.com",
          "playback_ids": [
            {
              "id": "pid_01j88d4vyy93fwe7p3aqr8kcqz",
              "policy": "signed",
              "playable": true,
              "status": "active"
            }
          ],
          "duration_seconds": 1830.4,
          "tracks": [
            {
              "id": "trk_01j0qtsj1vyp4dyn7fsdkb9t8q",
              "kind": "subtitles",
              "source": "generated",
              "status": "ready",
              "language": "en",
              "name": "English"
            },
            {
              "id": "trk_01jbz1ke29rzfnpwz5grhd401k",
              "kind": "chapters",
              "source": "generated",
              "status": "ready"
            }
          ],
          "created_at": "2026-11-18T09:30:00Z",
          "updated_at": "2026-11-18T09:34:12Z"
        }
      }
    }
  ]
}
```

### Errors [#errors]

| Status | Code |
| --- | --- |
| 400 | [`invalid_request`](/docs/reference/errors#invalid_request) |
| 401 | [`unauthorized`](/docs/reference/errors#unauthorized) |
| 403 | [`insufficient_scope`](/docs/reference/errors#insufficient_scope) |
| 429 | [`rate_limited`](/docs/reference/errors#rate_limited) |
