Betting Entertainment Tools

Channel Creation

Chat channels can be created via the moderation interface or API endpoints provided by Sportradar. Clients send a channel creation request, and the channel is created and opened immediately. Channels close based on the expiration timestamp provided (the default is 24 hours after creation).

Endpoints

https://management.vs.sportradar.com/api/operator/{operatorId}/channel
https://management.vs.sportradar.com/api/operator/{operatorId}/channel/batch
Bulk channel creation requests are the same as single channel creation but with an array of channel objects in the request body.

Authentication

Requests are made with a JWT bearer token in the Authorization header. When generating a token for channel creation, the user type must be 'MODERATOR'.
To create a token, see: Signed token - JWT

Create channel request

Properties:
Name Type Attributes Description
channelId string <required>

The unique identifier assigned to each channel. (Maximum length is 128 characters. Valid values: alphanumeric characters and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~)")

channelName string <required>

The channel name displayed in the header and tags.

operatorId string
active boolean <required>

Channel status.

messageTTLDays integer

The number of days the channel's messages are retained. (Must be in the future)

retentionTime integer

The time in seconds for which the message is visible.

sportContext Array.<Object>
id number <required>

Sportradar Sport/Match/Tournament ID.

type string <required>

Type of sport context. (Valid values: Sport, Category, Tournament, UniqueTournament, Team, Match, Player)

eventTypes number

List of event types that will trigger event messages in the channel. (Valid values: MATCH_ABOUT_TO_START, SCORE_CHANGED_POSSIBLE, SCORE_CHANGED, SCORE_CHANGED_CANCELLED, YELLOW_CARD_POSSIBLE, YELLOW_CARD, YELLOW_CARD_CANCELLED, YELLOWRED_CARD, RED_CARD_POSSIBLE, RED_CARD, RED_CARD_CANCELLED, MATCH_STARTED, MATCH_ENDED, PERIOD_START, PERIOD_SCORE, PLAYER_SUBSTITUTION, CORNER, OFFSIDE, SHOT_ON_TARGET, THROW_IN, TIMEOUT)

tags Array.<Object>
channelId number <required>

Valid channel ID

Example
{
  "channelId": "spain-germany",
  "channelName": "Spain vs Germany",
  "operatorId": "ch-123",
  "active": true,
  "messageTTLDays": 3,
  "retentionTime": 1854959740,
  "sportContext": [
    {
      "id": "sr:match:123456",
      "type": "Match",
      "eventTypes": [ "MATCH_ABOUT_TO_START", "SCORE_CHANGED", "YELLOW_CARD", "RED_CARD", "CORNER", "OFFSIDE" ]
    }
  ]
}