Skip to main content
POST
/
v1
/
admin
/
chats
/
{chat_id}
/
kick
curl -X POST https://portal-api.7331.org/v1/admin/chats/1/kick \
  -H "Content-Type: application/json" \
  -b "psession=YOUR_SESSION" \
  -d '{"user_id": 7}'
{
  "message": "Kicked someuser from chat 'General'"
}

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.

Requires Admin or higher permission level. Hierarchy is enforced against both the chat owner and the target user.
Removes a user from a chat. This endpoint:
  • Removes their neko VM session if the VM is running (best-effort)
  • Removes their DB chat membership (prevents rejoining private chats)
  • Rotates the E2EE epoch for forward secrecy
  • Removes any pending VM control request they may have
  • Broadcasts room:kicked to their active sockets and room:members to the chat
Works regardless of whether the VM is running — useful for removing a user from chat even when the chat is idle.

Path Parameters

chat_id
integer
required
Chat ID.

Body

user_id
integer
required
User ID of the user to kick. Cannot be your own user ID.

Response

message
string
required
Confirmation message including the username and chat name.
curl -X POST https://portal-api.7331.org/v1/admin/chats/1/kick \
  -H "Content-Type: application/json" \
  -b "psession=YOUR_SESSION" \
  -d '{"user_id": 7}'
{
  "message": "Kicked someuser from chat 'General'"
}