Realtime
Publish message to channel
Publish a message to a realtime channel. The message is persisted in a Redis Stream and immediately broadcast to all active WebSocket subscribers via Redis Pub/Sub.
Streams are automatically trimmed to 1 000 messages to prevent unbounded memory growth.
post/api/realtime/{project_id}/publish
Request
- Base URLhttps://core.blink.new
- URLhttps://core.blink.new/api/realtime/{project_id}/publish
- AuthHTTP bearer
Path parameters
project_idstring required
Example:my-project-123
Unique identifier for the project
Request body
Example request
{
"channel": "chat-room-1",
"type": "message",
"data": {
"text": "Hello world!",
"user": "john_doe"
},
"userId": "user_123"
}Response
Message published successfully
Example response
{
"messageId": "1640995200000-0"
}Changes
No recorded changes to this operation across all 1 revision of this API.