APIs

Chat

Chat endpoints let clients list recent channel messages, read the pinned message, send a message as the authorized user or a configured bot user, delete messages, and pin or unpin a message using the shared /v1/chats resource. Every https://api.blaze.stream/v1 request on this page must include client-id: YOUR_CLIENT_ID.

List chat messages

GEThttps://api.blaze.stream/v1/chats/messages

Returns recent non-deleted messages for the target channel. Results are limited to the current live session window, or roughly the last 8 hours when the channel is offline, and support cursor pagination up to 100 messages per request.

Required header for every https://api.blaze.stream/v1 request: client-id: YOUR_CLIENT_ID.

Authorizations

Scopes

users.read

Query parameters

channelIdstringrequired

Target channel UUID to read messages from.

cursorstringoptional

Pagination cursor returned from the previous response.

limitinteger · max: 100optional

Maximum number of messages to return.

Responses

  • 200OKapplication/json
  • 400Bad Requestapplication/json
  • 401Unauthorizedapplication/json
  • 403Forbiddenapplication/json
  • 500Internal Server Errorapplication/json
GET/v1/chats/messages
GET /v1/chats/messages?channelId=9b7f3c2a-2f41-4f5e-9f54-6c1d8a2b7e90&limit=20 HTTP/1.1
Host: api.blaze.stream
Authorization: Bearer YOUR_ACCESS_TOKEN
client-id: YOUR_CLIENT_ID
Accept: application/json
200OK
{
  "success": true,
  "message": "success",
  "data": {
    "channelId": "9b7f3c2a-2f41-4f5e-9f54-6c1d8a2b7e90",
    "messages": [
      {
        "id": "6c7e0b4d-3a21-4a7f-8c91-25d4f9b8e0a1",
        "channelId": "9b7f3c2a-2f41-4f5e-9f54-6c1d8a2b7e90",
        "sender": {
          "id": "2f4c6d9a-8e2b-4d77-9f0d-3a1b2c4d5e6f",
          "displayName": "Viewer",
          "avatarUrl": "https://cdn.blaze.stream/avatar.png",
          "isOwner": false,
          "isSubscriber": true,
          "isFollower": true,
          "isBot": false,
          "roles": [
            "vip"
          ],
          "slug": "viewer"
        },
        "message": "Hello from chat.",
        "type": "text",
        "replyToMessageId": null,
        "createdAt": "2026-05-04T12:00:00.000Z",
        "isHyperLinkAllowed": true
      }
    ],
    "pagination": {
      "cursor": "NEXT_CURSOR"
    }
  }
}

Send chat message

POSThttps://api.blaze.stream/v1/chats/messages

Creates a text chat message in the target channel. With a User Access Token, send channelId and message; Blaze uses the token user as the sender, requires channel.moderate OAuth scope, and no channel moderator role is required. With an App Access Token, also send senderId; that user must have granted users.bot to the application. Blaze sanitizes the message text and returns the created message id as a UUID. Sending is rate limited server-side to 20 messages per 30 seconds; exceeding the limit returns 429 with Rate limit exceeded. Please slow down.

Required header for every https://api.blaze.stream/v1 request: client-id: YOUR_CLIENT_ID.

Authorizations

The message is sent by the signed-in user from the access token. Do not send senderId; Blaze uses the token user as the sender and does not require a channel moderator role.

Scopes

channel.moderate

This is an OAuth scope requirement, not a channel moderator role requirement.

Request body

channelIdstringrequired

Target channel UUID where the chat action should run.

messagestring · max: 500required

Plain text chat message to send to the target channel.

replyToMessageIdstringoptional

Message UUID to reply to.

Responses

  • 200OKapplication/json
  • 400Bad Requestapplication/json
  • 401Unauthorizedapplication/json
  • 403Forbiddenapplication/json
  • 500Internal Server Errorapplication/json
POST/v1/chats/messages
POST /v1/chats/messages HTTP/1.1
Host: api.blaze.stream
Authorization: Bearer YOUR_ACCESS_TOKEN
client-id: YOUR_CLIENT_ID
Accept: application/json
content-type: application/json

{
  "channelId": "9b7f3c2a-2f41-4f5e-9f54-6c1d8a2b7e90",
  "message": "Hello from the Blaze API.",
  "replyToMessageId": "4b3f1c2a-8d5e-4e70-9a6c-51d2f7b9c0a4"
}
200OK
{
  "success": true,
  "message": "success",
  "data": {
    "id": "6c7e0b4d-3a21-4a7f-8c91-25d4f9b8e0a1"
  }
}

Delete chat message

DELETEhttps://api.blaze.stream/v1/chats/messages

Deletes a chat message from the target channel. This endpoint accepts both User Access Token and App Access Token. With a User Access Token, send channelId and messageId only; Blaze uses the token user as the delete actor, requires channel.moderate scope, and senderId is not required. The token user must own the channel or have the moderator role. With an App Access Token, send channelId, messageId, and senderId; Blaze uses senderId as the delete actor. senderId must have granted users.bot and must own the channel or have the moderator role.

Required header for every https://api.blaze.stream/v1 request: client-id: YOUR_CLIENT_ID.

Authorizations

Use when the signed-in token user is deleting the message. Send channelId and messageId only; do not send senderId. The token user must own the channel or have the moderator role.

Scopes

channel.moderate

Request body

channelIdstringrequired

Target channel UUID where the chat action should run.

messageIdstringrequired

Chat message UUID to remove from the target channel.

Responses

  • 200OKapplication/json
  • 400Bad Requestapplication/json
  • 401Unauthorizedapplication/json
  • 403Forbiddenapplication/json
  • 500Internal Server Errorapplication/json
DELETE/v1/chats/messages
DELETE /v1/chats/messages HTTP/1.1
Host: api.blaze.stream
Authorization: Bearer YOUR_ACCESS_TOKEN
client-id: YOUR_CLIENT_ID
Accept: application/json
content-type: application/json

{
  "channelId": "9b7f3c2a-2f41-4f5e-9f54-6c1d8a2b7e90",
  "messageId": "6c7e0b4d-3a21-4a7f-8c91-25d4f9b8e0a1"
}
200OK
{
  "success": true,
  "message": "success"
}

Get pinned chat message

GEThttps://api.blaze.stream/v1/chats/pin

Returns the current pinned chat message for the target channel. Send channelId as a query string parameter. User Access Token and App Access Token are both accepted. User Access Token requires users.read scope; App Access Token does not require an additional scope. If there is no active pinned message, data is null.

Required header for every https://api.blaze.stream/v1 request: client-id: YOUR_CLIENT_ID.

Authorizations

Use when reading the pinned message with a signed-in user token.

Scopes

users.read

Query parameters

channelIdstring · UUIDrequired

Target channel UUID to read the pinned chat message from.

Responses

  • 200OKapplication/json
  • 400Bad Requestapplication/json
  • 401Unauthorizedapplication/json
  • 403Forbiddenapplication/json
  • 500Internal Server Errorapplication/json
GET/v1/chats/pin
GET /v1/chats/pin?channelId=9b7f3c2a-2f41-4f5e-9f54-6c1d8a2b7e90 HTTP/1.1
Host: api.blaze.stream
Authorization: Bearer YOUR_ACCESS_TOKEN
client-id: YOUR_CLIENT_ID
Accept: application/json
200OK
{
  "success": true,
  "message": "success",
  "data": {
    "id": "6c7e0b4d-3a21-4a7f-8c91-25d4f9b8e0a1",
    "channelId": "9b7f3c2a-2f41-4f5e-9f54-6c1d8a2b7e90",
    "type": "pin",
    "message": "Pinned chat message.",
    "pinnedMessage": "Pinned chat message.",
    "messageId": "6c7e0b4d-3a21-4a7f-8c91-25d4f9b8e0a1",
    "pinnedMessageId": "6c7e0b4d-3a21-4a7f-8c91-25d4f9b8e0a1",
    "sender": {
      "id": "0f3d8a67-4d25-48f1-a3c5-1f7a9b2c6d30",
      "displayName": "Moderator",
      "slug": "moderator"
    },
    "actionInfo": {
      "messageId": "6c7e0b4d-3a21-4a7f-8c91-25d4f9b8e0a1",
      "pinnedMessageId": "6c7e0b4d-3a21-4a7f-8c91-25d4f9b8e0a1",
      "message": "Pinned chat message.",
      "pinnedMessageText": "Pinned chat message.",
      "pinnedByDisplayName": "Moderator",
      "pinnedBySlug": "moderator",
      "senderId": "0f3d8a67-4d25-48f1-a3c5-1f7a9b2c6d30",
      "pinnerId": "0f3d8a67-4d25-48f1-a3c5-1f7a9b2c6d30"
    },
    "pinnedByDisplayName": "Moderator",
    "pinnedBySlug": "moderator",
    "createdAt": "2026-05-04T12:10:00.000Z"
  }
}

Pin chat message

POSThttps://api.blaze.stream/v1/chats/pin

Pins a text chat message in the target channel. This endpoint only accepts a User Access Token and does not require an additional OAuth scope. Send channelId, moderatorId, and messageId. moderatorId must match the token user UUID, and moderatorId must be the same as channelId for the owner or have the moderator role in the channel.

Required header for every https://api.blaze.stream/v1 request: client-id: YOUR_CLIENT_ID.

Authorizations

Use when the signed-in token user is pinning or unpinning a message. Send channelId, moderatorId, and messageId. moderatorId must match the token user UUID, and that user must be the channel owner or have the moderator role in the channel.

Scopes

No additional OAuth scope required. moderatorId and the token user UUID must be the same UUID, and the user must be the channel owner or a channel moderator.

Request body

channelIdstring · UUIDrequired

Target channel UUID where the pin or unpin action should run.

moderatorIdstring · UUIDrequired

Moderator user UUID used as the pin/unpin actor.

messageIdstring · UUIDrequired

Chat message UUID to pin or unpin.

Responses

  • 200OKapplication/json
  • 400Bad Requestapplication/json
  • 401Unauthorizedapplication/json
  • 403Forbiddenapplication/json
  • 500Internal Server Errorapplication/json
POST/v1/chats/pin
POST /v1/chats/pin HTTP/1.1
Host: api.blaze.stream
Authorization: Bearer YOUR_ACCESS_TOKEN
client-id: YOUR_CLIENT_ID
Accept: application/json
content-type: application/json

{
  "channelId": "9b7f3c2a-2f41-4f5e-9f54-6c1d8a2b7e90",
  "moderatorId": "0f3d8a67-4d25-48f1-a3c5-1f7a9b2c6d30",
  "messageId": "6c7e0b4d-3a21-4a7f-8c91-25d4f9b8e0a1"
}
200OK
{
  "success": true,
  "message": "success"
}

Unpin chat message

DELETEhttps://api.blaze.stream/v1/chats/pin

Removes the pinned state for a chat message in the target channel. This endpoint only accepts a User Access Token and does not require an additional OAuth scope. Send channelId, moderatorId, and messageId. moderatorId must match the token user UUID, and moderatorId must be the same as channelId for the owner or have the moderator role in the channel.

Required header for every https://api.blaze.stream/v1 request: client-id: YOUR_CLIENT_ID.

Authorizations

Use when the signed-in token user is pinning or unpinning a message. Send channelId, moderatorId, and messageId. moderatorId must match the token user UUID, and that user must be the channel owner or have the moderator role in the channel.

Scopes

No additional OAuth scope required. moderatorId and the token user UUID must be the same UUID, and the user must be the channel owner or a channel moderator.

Request body

channelIdstring · UUIDrequired

Target channel UUID where the pin or unpin action should run.

moderatorIdstring · UUIDrequired

Moderator user UUID used as the pin/unpin actor.

messageIdstring · UUIDrequired

Chat message UUID to pin or unpin.

Responses

  • 200OKapplication/json
  • 400Bad Requestapplication/json
  • 401Unauthorizedapplication/json
  • 403Forbiddenapplication/json
  • 500Internal Server Errorapplication/json
DELETE/v1/chats/pin
DELETE /v1/chats/pin HTTP/1.1
Host: api.blaze.stream
Authorization: Bearer YOUR_ACCESS_TOKEN
client-id: YOUR_CLIENT_ID
Accept: application/json
content-type: application/json

{
  "channelId": "9b7f3c2a-2f41-4f5e-9f54-6c1d8a2b7e90",
  "moderatorId": "0f3d8a67-4d25-48f1-a3c5-1f7a9b2c6d30",
  "messageId": "6c7e0b4d-3a21-4a7f-8c91-25d4f9b8e0a1"
}
200OK
{
  "success": true,
  "message": "success"
}