# YouTube event formats

Each event in the `youtube` channel contains a [`PlatformEvent`](https://developers.donatty.com/en/structures/platform-event.md#platformevent) object in `data`. Its `details` fields depend on the event type. The amount of a Super Chat and a Super Sticker is an [`ExactMoney`](https://developers.donatty.com/en/structures.md#exactmoney): exact, never rounded.

## youtube.subscriber

A viewer subscribed to a linked YouTube channel. `actor` is the subscriber. YouTube lists only subscribers whose subscriptions are public, so a subscriber who keeps them private is not sent. `data` is the event as `GET /v1/platform-events` returns it.

**Channel:** `youtube` (scope `youtube:read`)

| Field | Type | Description |
|---|---|---|
| `id` | string, `evt_…` | Publication identifier: the same when the event is delivered again from the channel history or published again. Drop repeats by `data.id`, which is also the same as in REST. |
| `type` | string, always `youtube.subscriber` |  |
| `subject` | string | Platform event identifier, `pevt_…`: `data.id`. |
| `dataschema` | string (URI), always [the PlatformEvent schema address](https://api.donatty.com/v1/asyncapi.yaml#/components/schemas/PlatformEvent) |  |
| `data` | [`PlatformEvent`](https://developers.donatty.com/en/structures/platform-event.md#platformevent) |  |

### Example

```json
{
  "specversion": "1.0",
  "id": "evt_51bc7fd9-c364-4ea0-b85b-9cd061ce437a",
  "type": "youtube.subscriber",
  "source": "https://api.donatty.com/v1/streamer",
  "subject": "pevt_1d7e3b95-8f20-4a6c-b417-5e9c2d8a0f36",
  "time": "2026-11-09T10:20:43.881201Z",
  "datacontenttype": "application/json",
  "dataschema": "https://api.donatty.com/v1/asyncapi.yaml#/components/schemas/PlatformEvent",
  "data": {
    "id": "pevt_1d7e3b95-8f20-4a6c-b417-5e9c2d8a0f36",
    "platform": "YOUTUBE",
    "type": "youtube.subscriber",
    "accountId": "104857306182736450192",
    "occurredAt": "2026-11-09T10:20:05Z",
    "recordedAt": "2026-11-09T10:20:43.881201Z",
    "actor": {
      "id": "UCq3Lr8VtNb2Kp6YdHs9WmXe",
      "login": null,
      "displayName": "Cool Subscriber",
      "avatarUrl": "https://yt3.ggpht.com/a/UCq3Lr8VtNb2Kp6YdHs9WmXe=s88-c-k"
    },
    "message": null,
    "isTest": false,
    "details": {}
  }
}
```

## youtube.member

A viewer became a member of a linked YouTube channel or moved to another membership level. `actor` is the member. One event per continuous access to a level: a member who leaves and comes back, or moves to another level, is a new event. Needs channel memberships and YouTube's access to the member list: without them the source lists `youtube.member` in `unavailableTypes`. `data` is the event as `GET /v1/platform-events` returns it.

**Channel:** `youtube` (scope `youtube:read`)

| Field | Type | Description |
|---|---|---|
| `id` | string, `evt_…` | Publication identifier: the same when the event is delivered again from the channel history or published again. Drop repeats by `data.id`, which is also the same as in REST. |
| `type` | string, always `youtube.member` |  |
| `subject` | string | Platform event identifier, `pevt_…`: `data.id`. |
| `dataschema` | string (URI), always [the PlatformEvent schema address](https://api.donatty.com/v1/asyncapi.yaml#/components/schemas/PlatformEvent) |  |
| `data` | [`PlatformEvent`](https://developers.donatty.com/en/structures/platform-event.md#platformevent) |  |

### Example

```json
{
  "specversion": "1.0",
  "id": "evt_62cd80ea-d475-4fb1-a96c-ade172df548b",
  "type": "youtube.member",
  "source": "https://api.donatty.com/v1/streamer",
  "subject": "pevt_2e8f4ca6-9031-4b7d-8528-6fad3e9b1047",
  "time": "2026-11-09T10:22:16.305477Z",
  "datacontenttype": "application/json",
  "dataschema": "https://api.donatty.com/v1/asyncapi.yaml#/components/schemas/PlatformEvent",
  "data": {
    "id": "pevt_2e8f4ca6-9031-4b7d-8528-6fad3e9b1047",
    "platform": "YOUTUBE",
    "type": "youtube.member",
    "accountId": "104857306182736450192",
    "occurredAt": "2026-11-09T10:21:58Z",
    "recordedAt": "2026-11-09T10:22:16.305477Z",
    "actor": {
      "id": "UCm7Tn2QwRe5Yu8Io1PaSdFg",
      "login": null,
      "displayName": "Loyal Member",
      "avatarUrl": "https://yt3.ggpht.com/a/UCm7Tn2QwRe5Yu8Io1PaSdFg=s88-c-k"
    },
    "message": null,
    "isTest": false,
    "details": {
      "level": "Gold",
      "months": 3,
      "levelSince": "2026-11-09T10:21:58Z",
      "isUpgrade": null
    }
  }
}
```

## youtube.super_chat

A viewer bought a Super Chat on a linked YouTube channel. `actor` is the viewer, `message` is the comment, `details.amount` is the exact amount in the currency the viewer paid, never converted or rounded. `data` is the event as `GET /v1/platform-events` returns it.

**Channel:** `youtube` (scope `youtube:read`)

| Field | Type | Description |
|---|---|---|
| `id` | string, `evt_…` | Publication identifier: the same when the event is delivered again from the channel history or published again. Drop repeats by `data.id`, which is also the same as in REST. |
| `type` | string, always `youtube.super_chat` |  |
| `subject` | string | Platform event identifier, `pevt_…`: `data.id`. |
| `dataschema` | string (URI), always [the PlatformEvent schema address](https://api.donatty.com/v1/asyncapi.yaml#/components/schemas/PlatformEvent) |  |
| `data` | [`PlatformEvent`](https://developers.donatty.com/en/structures/platform-event.md#platformevent) |  |

### Example

```json
{
  "specversion": "1.0",
  "id": "evt_73de91fb-e586-4ac2-ba7d-bef283e0659c",
  "type": "youtube.super_chat",
  "source": "https://api.donatty.com/v1/streamer",
  "subject": "pevt_3f9a5db7-a142-4c8e-9639-7abe4fac2158",
  "time": "2026-11-09T10:25:12.640833Z",
  "datacontenttype": "application/json",
  "dataschema": "https://api.donatty.com/v1/asyncapi.yaml#/components/schemas/PlatformEvent",
  "data": {
    "id": "pevt_3f9a5db7-a142-4c8e-9639-7abe4fac2158",
    "platform": "YOUTUBE",
    "type": "youtube.super_chat",
    "accountId": "104857306182736450192",
    "occurredAt": "2026-11-09T10:25:03.112Z",
    "recordedAt": "2026-11-09T10:25:12.640833Z",
    "actor": {
      "id": "UCz1Xc4VbN7mQ0Ws3Ed6Rf9T",
      "login": null,
      "displayName": "Generous Viewer",
      "avatarUrl": "https://yt3.ggpht.com/a/UCz1Xc4VbN7mQ0Ws3Ed6Rf9T=s88-c-k"
    },
    "message": "Great stream!",
    "isTest": false,
    "details": {
      "amount": {
        "value": "5.00",
        "currency": "USD"
      },
      "superChatId": "Cg0KC3N1cGVyY2hhdC0x",
      "tier": 2
    }
  }
}
```

## youtube.super_sticker

A viewer bought a Super Sticker on a linked YouTube channel. `actor` is the viewer, `details.amount` is the exact amount in the currency the viewer paid, never converted or rounded, `details.sticker` is the sticker. `data` is the event as `GET /v1/platform-events` returns it.

**Channel:** `youtube` (scope `youtube:read`)

| Field | Type | Description |
|---|---|---|
| `id` | string, `evt_…` | Publication identifier: the same when the event is delivered again from the channel history or published again. Drop repeats by `data.id`, which is also the same as in REST. |
| `type` | string, always `youtube.super_sticker` |  |
| `subject` | string | Platform event identifier, `pevt_…`: `data.id`. |
| `dataschema` | string (URI), always [the PlatformEvent schema address](https://api.donatty.com/v1/asyncapi.yaml#/components/schemas/PlatformEvent) |  |
| `data` | [`PlatformEvent`](https://developers.donatty.com/en/structures/platform-event.md#platformevent) |  |

### Example

```json
{
  "specversion": "1.0",
  "id": "evt_84efa20c-f697-4bd3-8b8e-cf0394f176ad",
  "type": "youtube.super_sticker",
  "source": "https://api.donatty.com/v1/streamer",
  "subject": "pevt_40ab6ec8-b253-4d9f-a74a-8bcf50bd3269",
  "time": "2026-11-09T10:26:41.027519Z",
  "datacontenttype": "application/json",
  "dataschema": "https://api.donatty.com/v1/asyncapi.yaml#/components/schemas/PlatformEvent",
  "data": {
    "id": "pevt_40ab6ec8-b253-4d9f-a74a-8bcf50bd3269",
    "platform": "YOUTUBE",
    "type": "youtube.super_sticker",
    "accountId": "104857306182736450192",
    "occurredAt": "2026-11-09T10:26:33.490Z",
    "recordedAt": "2026-11-09T10:26:41.027519Z",
    "actor": {
      "id": "UCp5Lk8Jh2Gf6Ds9Az3Xc7Vb",
      "login": null,
      "displayName": "Sticker Fan",
      "avatarUrl": "https://yt3.ggpht.com/a/UCp5Lk8Jh2Gf6Ds9Az3Xc7Vb=s88-c-k"
    },
    "message": null,
    "isTest": false,
    "details": {
      "amount": {
        "value": "500",
        "currency": "JPY"
      },
      "superChatId": "Cg0KC3N1cGVyc3RpY2tlcg",
      "tier": 1,
      "sticker": {
        "id": "sticker_cat_wave",
        "altText": "A cat waving its paw"
      }
    }
  }
}
```
