Open channel operation
The open_channel:operation event fires when a user's membership status in an open channel changes, or when the open channel itself is created or destroyed.
For the complete webhook setup and signature verification guide, see Webhooks overview.
Event type
open_channel:operation
Payload
Envelope
| Field | Type | Required | Description |
|---|---|---|---|
type | String | Yes | "open_channel:operation" |
id | String | Yes | Unique event ID. |
time | Long | Yes | Event generation time (Unix ms). |
data | Array | Yes | Array containing one open channel operation object. See Data fields. |
Data fields
| Field | Type | Required | Description |
|---|---|---|---|
channelId | String | Yes | The open channel ID. |
userIds | String[] | Yes | User IDs affected by the operation. |
operationType | Int | Yes | Event type. See Operation types. |
status | Int | Yes | How the operation was triggered. See Status values. |
time | Number | Yes | Time the operation occurred (Unix ms). |
Operation types
| Value | Meaning |
|---|---|
0 | Channel created — The open channel was created. |
1 | User joined — One or more users entered the open channel. |
2 | User left — One or more users exited the open channel. |
3 | Channel destroyed — The open channel was destroyed. |
Status values
| Value | Meaning |
|---|---|
0 | Active — The operation was triggered by a direct user or API action. |
1 | Auto-exited — The user was automatically removed (e.g., went offline for 30 seconds or the channel accumulated 30 messages without the user being active). |
2 | User banned — The user was removed because they were banned from the channel. |
3 | Channel auto-destroyed — The channel was automatically destroyed (e.g., all members left and auto-destroy is enabled). |
Example
JSON
{
"type": "open_channel:operation",
"id": "550e8400-e29b-41d4-a716-446655440011",
"time": 1730192400000,
"data": [
{
"channelId": "chatroom_001",
"userIds": ["user_001", "user_002"],
"status": 0,
"operationType": 1,
"time": 1730192400000
}
]
}