Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 43 additions & 30 deletions events/event-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ description: Request body payloads for Webhook API requests

## Chat Message

```json
No identity for broadcasters at the moment.
```
Headers
- Kick-Event-Type: “chat.message.sent”
- Kick-Event-Version: “1”

```
```json
{
"message_id": "unique_message_id_123",
"broadcaster": {
Expand All @@ -21,7 +23,7 @@ Headers
"is_verified": true,
"profile_picture": "https://example.com/broadcaster_avatar.jpg",
"channel_slug": "broadcaster_channel",
"identity": null // no identity for broadcasters at the moment
"identity": null
},
"sender": {
"is_anonymous": false,
Expand All @@ -35,17 +37,17 @@ Headers
"badges": [
{
"text": "Moderator",
"type": "moderator",
"type": "moderator"
},
{
"text": "Sub Gifter",
"type": "sub_gifter",
"count": 5,
"count": 5
},
{
"text": "Subscriber",
"type": "subscriber",
"count": 3,
"count": 3
}
]
}
Expand All @@ -71,11 +73,12 @@ Headers

## Channel Follow

```json
```
Headers
- Kick-Event-Type: “channel.followed”
- Kick-Event-Version: “1”

```
```json
{
"broadcaster": {
"is_anonymous": false,
Expand All @@ -100,11 +103,12 @@ Headers

## Channel Subscription Renewal

```json
```
Headers
- Kick-Event-Type: “channel.subscription.renewal”
- Kick-Event-Version: “1”

```
```json
{
"broadcaster": {
"is_anonymous": false,
Expand Down Expand Up @@ -132,12 +136,13 @@ Headers

## Channel Subscription Gifts

```json
Fields in `gifter` are null if the gifter is anonymous (`gifter.is_anonymous`).
```
Headers
- Kick-Event-Type: “channel.subscription.gifts”
- Kick-Event-Version: “1”

Public Gift Structure
```
```json
{
"broadcaster": {
"is_anonymous": false,
Expand All @@ -150,12 +155,12 @@ Public Gift Structure
},
"gifter": {
"is_anonymous": false,
"user_id": 987654321, // null if is_anonymous=true
"username": "gifter_name", // null if is_anonymous=true
"is_verified": false, // null if is_anonymous=true
"profile_picture": "https://example.com/sender_avatar.jpg", // null if is_anonymous=true
"channel_slug": "gifter_channel", // null if is_anonymous=true
"identity": null // null if is_anonymous=true
"user_id": 987654321,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this change it's valid JSON. On the other hand, information about null fields when is_anonymous=true is lost and can be confusing to new people.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That’s exactly why I moved this information higher up - it hasn’t been forgotten, but it isn’t included as part of the payload.

Fields in `gifter` are null if the gifter is anonymous (`gifter.is_anonymous`).

"username": "gifter_name",
"is_verified": false,
"profile_picture": "https://example.com/sender_avatar.jpg",
"channel_slug": "gifter_channel",
"identity": null
},
"giftees":
[
Expand All @@ -176,11 +181,12 @@ Public Gift Structure

## Channel Subscription Created

```json
```
Headers
- Kick-Event-Type: “channel.subscription.new”
- Kick-Event-Version: “1”

```
```json
{
"broadcaster": {
"is_anonymous": false,
Expand Down Expand Up @@ -209,11 +215,13 @@ Headers
## Livestream Status Updated

#### Livestream Status Updated - Stream started
```json

```
Headers
- Kick-Event-Type: "livestream.status.updated"
- Kick-Event-Version: “1”

```
```json
{
"broadcaster": {
"is_anonymous": false,
Expand All @@ -232,11 +240,13 @@ Headers
```

#### Livestream Status Updated - Stream ended
```json

```
Headers
- Kick-Event-Type: "livestream.status.updated"
- Kick-Event-Version: “1”

```
```json
{
"broadcaster": {
"is_anonymous": false,
Expand All @@ -256,11 +266,12 @@ Headers

## Livestream Metadata Updated

```json
```
Headers
- Kick-Event-Type: "livestream.metadata.updated"
- Kick-Event-Version: “1”

```
```json
{
"broadcaster": {
"is_anonymous": false,
Expand All @@ -286,11 +297,13 @@ Headers

## Moderation Banned

```json
`metadata.expires_at` is null if ban is permanent.
```
Headers
- Kick-Event-Type: "moderation.banned"
- Kick-Event-Version: “1”

```
```json
{
"broadcaster": {
"is_anonymous": false,
Expand Down Expand Up @@ -322,7 +335,7 @@ Headers
"metadata": {
"reason": "banned reason",
"created_at": "2025-01-14T16:08:05Z",
"expires_at": "2025-01-14T16:10:06Z", // null for permanent bans
"expires_at": "2025-01-14T16:10:06Z"
}
}
```