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.
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"
}
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.
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.
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.
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.