Skip to main content
POST
/
v1
/
portal
/
chats
/
{chat_id}
/
kick
curl -X POST https://portal-api.7331.org/v1/portal/chats/42/kick \
  -H "Content-Type: application/json" \
  -b "psession=YOUR_SESSION" \
  -d '{"user_id": 7}'
{
  "ok": true
}

Documentation Index

Fetch the complete documentation index at: https://docs.7331.org/llms.txt

Use this file to discover all available pages before exploring further.

Kicks a user from a chat — removes them from the neko VM (if running), drops them from the control queue, broadcasts portal:key_removed and a system leave message to the chat, rotates the E2EE epoch, and disconnects their socket from the chat channel (room:kicked). Authorization: Chat owner. For public/official chats: any user who outranks the chat owner via the permission hierarchy (ADMIN+ for user-owned public chats). ADMIN+ can kick from any chat regardless of type.
chat_id
integer
required
Chat ID.
user_id
integer
required
Entity ID of the user to kick. Cannot be yourself.

Response

ok
boolean
required
true if the user was kicked.
curl -X POST https://portal-api.7331.org/v1/portal/chats/42/kick \
  -H "Content-Type: application/json" \
  -b "psession=YOUR_SESSION" \
  -d '{"user_id": 7}'
{
  "ok": true
}
Kicking a user rotates the chat’s E2EE epoch. All remaining members must re-obtain the chat key to decrypt future messages.