Skip to main content
POST
/
v1
/
portal
/
chats
/
{chat_id}
/
warn
curl -X POST https://portal-api.7331.org/v1/portal/chats/42/warn \
  -H "Content-Type: application/json" \
  -b "psession=YOUR_SESSION" \
  -d '{"user_id": 7, "reason": "Repeated rule violations"}'
{
  "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.

Issues a warning to a user. The warning is a platform-scoped punishment (stored in the DB) even though it is initiated in a chat context. Broadcasts a system message to the chat indicating the warn action. Authorization: Chat owner can always warn in their own chat. For public/official chats, any user who outranks the chat owner (via permission hierarchy) can also warn. Moderators cannot warn in private chats — only the chat owner or Admin+ can.
chat_id
integer
required
Chat ID (used for authorization context and system message).
user_id
integer
required
Entity ID of the user to warn.
reason
string
Reason for the warning. Max 500 characters.

Response

ok
boolean
required
true if the warning was issued.
curl -X POST https://portal-api.7331.org/v1/portal/chats/42/warn \
  -H "Content-Type: application/json" \
  -b "psession=YOUR_SESSION" \
  -d '{"user_id": 7, "reason": "Repeated rule violations"}'
{
  "ok": true
}
Warnings are platform-wide records, not chat-scoped. A warning issued via a chat context is visible in the user’s full punishment history.