Skip to main content
POST
/
v1
/
portal
/
match
/
leave
curl -X POST https://portal-api.7331.org/v1/portal/match/leave \
  -b "psession=YOUR_SESSION"
{
  "message": "Left direct chat"
}

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.

Tears down the caller’s active direct chat immediately. Distinct from a socket disconnect (which arms a 60s grace window) — an explicit leave signals “done with this chat” and the peer is routed straight to the “match ended” screen without a countdown. Before teardown, the server persists a {username} left the chat system message so both parties see the context in their timeline and get_history.

Response

message
string
required
Human-readable confirmation.

Errors

StatusErrorMeaning
404ERR_MATCH_NO_ACTIVE_DIRECTCaller isn’t in a direct chat — client state has drifted from the server
Frontends should treat 404 as a force-reset: dismiss the chat UI, toast the user, and re-render as idle.
curl -X POST https://portal-api.7331.org/v1/portal/match/leave \
  -b "psession=YOUR_SESSION"
{
  "message": "Left direct chat"
}