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

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 one or more messages from the chat’s portal stream by ID (1–100 per call) and broadcasts a message:bulk_deleted event to all clients in the chat. Authorization: Chat owner can always delete messages in their own chat. For public/official chats, any user who outranks the chat owner (Mod+) can also delete. Moderators cannot delete in private chats — only the chat owner or Admin+ can.
chat_id
integer
required
Chat ID.
ids
string[]
required
List of Redis stream message IDs to delete (format: {timestamp}-{sequence}). 1–100 entries per call.

Response

deleted
integer
required
Number of messages actually deleted (may be less than ids.length if some were already gone).
curl -X POST https://portal-api.7331.org/v1/portal/chats/42/messages/delete \
  -H "Content-Type: application/json" \
  -b "psession=YOUR_SESSION" \
  -d '{"ids": ["1710000000000-0"]}'
{
  "deleted": 1
}