Skip to main content
POST
/
v1
/
portal
/
chats
/
{chat_id}
/
messages
/
delete-last
curl -X POST https://portal-api.7331.org/v1/portal/chats/42/messages/delete-last \
  -H "Content-Type: application/json" \
  -b "psession=YOUR_SESSION" \
  -d '{"count": 10}'
{
  "deleted": 10
}

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 the most recent N messages from the chat’s portal stream regardless of sender, and broadcasts a message:bulk_deleted event to all connected clients. Authorization: Chat owner can always delete. For public/official chats, any user who outranks the chat owner (Mod+) can also delete. Moderators cannot delete in private chats.
chat_id
integer
required
Chat ID.
count
integer
required
Number of messages to delete. Must be between 1 and 100.

Response

deleted
integer
required
Number of messages actually deleted (may be less than count if the chat had fewer messages).
curl -X POST https://portal-api.7331.org/v1/portal/chats/42/messages/delete-last \
  -H "Content-Type: application/json" \
  -b "psession=YOUR_SESSION" \
  -d '{"count": 10}'
{
  "deleted": 10
}