Skip to main content
POST
/
v1
/
portal
/
chats
/
{chat_id}
/
clear
curl -X POST https://portal-api.7331.org/v1/portal/chats/42/clear \
  -b "psession=YOUR_SESSION"
{
  "ok": true,
  "cleared": 42
}

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.

Deletes all messages from the chat’s portal stream, broadcasts a portal:cleared event, restarts the wipe scheduler, rotates the encryption epoch (forward secrecy), and emits a system message to the chat. Authorization: Chat owner can always clear their own chat. Admin+ can clear any chat. Moderators cannot clear messages.
chat_id
integer
required
Chat ID.

Response

ok
boolean
required
true if the operation succeeded.
cleared
integer
required
Number of messages cleared.
curl -X POST https://portal-api.7331.org/v1/portal/chats/42/clear \
  -b "psession=YOUR_SESSION"
{
  "ok": true,
  "cleared": 42
}