Skip to main content

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

FieldTypeRequiredDescription
typeStringYes"open_channel:operation"
idStringYesUnique event ID.
timeLongYesEvent generation time (Unix ms).
dataArrayYesArray containing one open channel operation object. See Data fields.

Data fields

FieldTypeRequiredDescription
channelIdStringYesThe open channel ID.
userIdsString[]YesUser IDs affected by the operation.
operationTypeIntYesEvent type. See Operation types.
statusIntYesHow the operation was triggered. See Status values.
timeNumberYesTime the operation occurred (Unix ms).

Operation types

ValueMeaning
0Channel created — The open channel was created.
1User joined — One or more users entered the open channel.
2User left — One or more users exited the open channel.
3Channel destroyed — The open channel was destroyed.

Status values

ValueMeaning
0Active — The operation was triggered by a direct user or API action.
1Auto-exited — The user was automatically removed (e.g., went offline for 30 seconds or the channel accumulated 30 messages without the user being active).
2User banned — The user was removed because they were banned from the channel.
3Channel 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
}
]
}