Realtime Updates
Subscribe to database changes and receive instant updates via WebSocket.
WebSocket Connection
wss://api.wowsql.com/api/v1/realtime/ws
Headers:
Authorization: Bearer YOUR_API_KEY
X-Project-Slug: your-project-slug
Subscribe to Table Changes
{
"type": "subscribe",
"table": "users",
"filters": {
"status": "active"
}
}
Receive Updates
You'll receive messages when data changes:
{
"type": "update",
"table": "users",
"event": "INSERT",
"data": {
"id": 1,
"name": "John Doe",
"email": "john@example.com"
}
}
Event Types
INSERT- New record createdUPDATE- Record updatedDELETE- Record deleted
Unsubscribe
{
"type": "unsubscribe",
"table": "users"
}