Skip to main content
POST
/
chat
/
messages
/
{messageId}
/
report
curl -X POST https://teambattles.gg/api/v1/chat/messages/MESSAGE_ID/report \
  -H "Authorization: Bearer tb_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"reason": "Harassment toward a teammate"}'
{
  "success": true,
  "reportId": "<string>",
  "alreadyReported": true,
  "timestamp": "<string>"
}

Permission Required

This endpoint requires chat.write:write on your API key. The reporter is always the API key owner, derived from the key itself - it is never accepted as a body field. A free (api_free) key receives 403 error_api_feature_required; this requires an api_pro+ plan.

Access / Membership Rules

This route is participant-gated. The API key owner may only report a message in a chat room they participate in. The gate is re-applied inside Convex: a non-participant returns 403 CHAT_ACCESS_DENIED. A missing message returns 404 MESSAGE_NOT_FOUND; a system message or the owner’s own message cannot be reported and returns 400. Reporting is idempotent at the report level: reporting the same message twice returns the existing report ID with alreadyReported: true and fires no second moderation webhook. The route also supports the Idempotency-Key header.

Request Body

FieldTypeRequiredDescription
reasonstringNoOptional reason for the report (max 500 chars).

What’s Returned

Returns an object with success: true, the reportId (the existing one when already reported), an alreadyReported flag, and a timestamp. Mintlify renders the full schema from the spec below.
curl -X POST https://teambattles.gg/api/v1/chat/messages/MESSAGE_ID/report \
  -H "Authorization: Bearer tb_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"reason": "Harassment toward a teammate"}'

Authorizations

Authorization
string
header
required

Send your API key as: Authorization: Bearer tb_

Path Parameters

messageId
string
required

ID of the chat message to report.

Body

application/json

Reports a chat message for staff moderation review.

reason
string

Optional reason for the report (max 500 chars).

Maximum string length: 500

Response

The message was reported (or was already reported).

success
boolean
required
reportId
string
required

Report ID (existing one if already reported).

alreadyReported
boolean
required

True if the owner had already reported this message.

timestamp
string
required

Response generation time (ISO 8601).