Skip to main content
GET
/
matches
/
{matchId}
/
chat
List a match chat room's messages
curl --request GET \
  --url https://teambattles.gg/api/v1/matches/{matchId}/chat \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "<string>",
      "content": "<string>",
      "senderUserId": "<string>",
      "senderUsername": "<string>",
      "teamId": "<string>",
      "replyToId": "<string>",
      "createdAt": "<string>"
    }
  ],
  "nextCursor": "<string>",
  "hasMore": true,
  "timestamp": "<string>"
}

Permission Required

This endpoint requires chat.read:read on your API key. The reader is always the API key owner, derived from the key itself - it is never accepted as a parameter.

Access / Membership Rules

This route is participant-gated. The API key owner may only read a match’s chat room if they participate in the match (a member of one of the match’s teams). The gate is enforced inside Convex: a non-participant - or a match that has no chat room - returns 404 CHAT_ROOM_NOT_FOUND, never revealing whether the room exists. Results are cursor-paginated. Use the limit query parameter (1-100, default 50) for page size and pass a prior page’s nextCursor as the cursor query parameter to continue. An invalid cursor returns 400 INVALID_CURSOR.

What’s Returned

Returns the cursor-page envelope: a data array of chat messages (each with id, content, senderUserId, senderUsername, teamId, replyToId, and createdAt), a nextCursor (null when the last page is reached), a hasMore flag, and a timestamp. Mintlify renders the full schema from the spec below.

Authorizations

Authorization
string
header
required

Send your API key as: Authorization: Bearer tb_

Path Parameters

matchId
string
required

Match ID. The caller must be a participant of this match.

Query Parameters

limit
string

Page size (1-100). Defaults to 50.

cursor
string

Opaque continuation cursor from a prior page's nextCursor.

Response

Program cursor-paginated result. nextCursor is null when hasMore is false.

data
object[]
required
nextCursor
string | null
required
hasMore
boolean
required
timestamp
string
required