Dashboard Events
1 endpoints from the published OpenAPI import.
Dashboard Events Stream
Server-Sent Events stream for the Live Activity Theater.
Connect from the dashboard via new EventSource('/api/v1/dashboard/events/stream', { withCredentials: true }) — Better Auth session cookie authenticates; X-Selected-Client-Id (set by api-client.ts on super_admin impersonation) determines the channel.
Subscribed channel is events:{client_id}; same Redis pubsub channel as the public Bearer endpoint at /api/v1/events/stream so any event_service.publish_event(client_id, …) call reaches both consumer types.
Event types streamed (live as published — not exhaustive, evolves with backend hooks):
- job.queued / job.started / job.completed / job.failed
- campaign.created / campaign.location.completed / campaign.business.found / campaign.email.verified / campaign.vayapin.exported / campaign.completed
- playbook.company.completed
- spiderSite.scraped / spiderPeople.enriched / spiderCompanyData.fetched / spiderPublic.{instagram,linkedin,facebook}.crawled
- resources.changed / resource.flagged
- booking.created / booking.confirmed / booking.cancelled
- content.page.published / content.post.published / content.site.deployed / content.template.applied
- mail.outreach.reply / mail.security.flag
- gate.key.created / gate.rate_limit.hit
- heartbeat (every 30s — keep-alive)
The frontend hook (apps/web/src/hooks/useLiveEventStream.ts) parses each event type against a Zod schema in apps/web/src/routes/client/live/cards/types.ts and dispatches it to the appropriate card component. Unknown event types fall back to a generic JsonCard renderer — the page never breaks when the backend adds new types.
Try it
Examples
cURL
curl -X GET 'https://spideriq.ai/api/v1/dashboard/events/stream' \
-H 'Authorization: Bearer <token>'Python
import httpx
resp = httpx.get(
"https://spideriq.ai/api/v1/dashboard/events/stream",
headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())JavaScript
const resp = await fetch("https://spideriq.ai/api/v1/dashboard/events/stream", {
method: "GET",
headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);Go
package main
import (
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://spideriq.ai/api/v1/dashboard/events/stream", nil)
req.Header.Set("Authorization", "Bearer <token>")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
| Status | Description |
|---|---|
200 | Successful Response |