Dashboard API
Retrieve aggregated performance metrics, daily time series, and activity data across all your campaigns and accounts.
Dashboard Stats
/api/dashboard/statsGet aggregated dashboard statistics with daily time series. Supports date range, campaign, and account filters.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
days | number | Number of days of history (default: 7, max: 90) |
startDate | string | Start date in ISO format (alternative to days) |
endDate | string | End date in ISO format |
campaignId | string | Filter by specific campaign |
accountId | string | Filter by specific LinkedIn account |
curl --location --request GET 'http://outreach.weezly.com/api/dashboard/stats' \
--header 'X-API-KEY: sk_live_YOUR_API_KEY'{
"stats": {
"totalConnectionsSent": 450,
"totalConnectionsAccepted": 135,
"connectionAcceptRate": 30.0,
"totalMessagesSent": 280,
"totalReplies": 42,
"replyRate": 15.0,
"totalInMailsSent": 25,
"totalProfileViews": 500,
"totalPostLikes": 180,
"totalFollows": 95,
"activeCampaigns": 3,
"activeAccounts": 2,
"leadsProcessed": 890
},
"daily": [
{
"date": "2026-06-01",
"connectionsSent": 15,
"connectionsAccepted": 4,
"messagesSent": 12,
"replies": 2,
"inmailsSent": 3,
"profileViews": 25,
"postLikes": 8,
"follows": 5
},
{
"date": "2026-06-02",
"connectionsSent": 18,
"connectionsAccepted": 6,
"messagesSent": 15,
"replies": 3,
"inmailsSent": 2,
"profileViews": 30,
"postLikes": 10,
"follows": 4
}
],
"campaigns": [
{
"id": "cm3camp456",
"name": "Q1 SaaS Founders Outreach",
"status": "ACTIVE",
"totalLeads": 150,
"leadsProcessed": 87,
"leadsReplied": 12,
"connectionRate": 30.0,
"replyRate": 13.8
}
],
"accounts": [
{
"id": "cm3acc123mno",
"linkedinName": "John Smith",
"status": "ACTIVE",
"ssiScore": 72.5,
"todayActions": 18,
"dailyLimit": 45
}
]
}Activity Feed
/api/dashboard/activityGet recent activity events (messages sent, connections accepted, replies received, etc.).
Query Parameters
| Parameter | Type | Description |
|---|---|---|
limit | number | Number of events to return (default: 20, max: 100) |
offset | number | Offset for pagination (default: 0) |
type | string | Filter by activity type: message, connection, reply, inmail, step |
curl --location --request GET 'http://outreach.weezly.com/api/dashboard/activity' \
--header 'X-API-KEY: sk_live_YOUR_API_KEY'{
"activities": [
{
"id": "act_001",
"type": "reply",
"description": "Sarah Chen replied to your message",
"leadName": "Sarah Chen",
"campaignName": "Q1 SaaS Founders Outreach",
"accountName": "John Smith",
"timestamp": "2026-06-07T08:30:00.000Z"
},
{
"id": "act_002",
"type": "connection",
"description": "Marcus Johnson accepted your connection request",
"leadName": "Marcus Johnson",
"campaignName": "Q1 SaaS Founders Outreach",
"accountName": "John Smith",
"timestamp": "2026-06-07T08:25:00.000Z"
},
{
"id": "act_003",
"type": "step",
"description": "Message sent to Lisa Park",
"leadName": "Lisa Park",
"campaignName": "Enterprise CTO Campaign",
"accountName": "Jane Doe",
"stepType": "MESSAGE",
"timestamp": "2026-06-07T08:20:00.000Z"
}
],
"total": 156,
"hasMore": true
}Live Activity Stream (SSE)
Subscribe to real-time activity updates via Server-Sent Events. New events are pushed as they happen — no polling required.
/api/dashboard/stream?token=YOUR_TOKENOpens a persistent SSE connection. Authentication is via query parameter since EventSource cannot set headers.
const token = "eyJhbGciOiJIUzI1NiIs...";
const es = new EventSource(`/api/dashboard/stream?token=${token}`);
es.addEventListener("activity", (event) => {
const data = JSON.parse(event.data);
console.log("New activity:", data);
// { type: "reply", leadName: "Sarah Chen", ... }
});
es.addEventListener("heartbeat", () => {
// Sent every 15s to keep connection alive
});
es.onerror = () => {
// Reconnect logic
console.log("SSE connection lost, reconnecting...");
};event: activity
data: {"type":"reply","leadName":"Sarah Chen","campaignName":"Q1 SaaS Outreach","accountName":"John Smith","timestamp":"2026-06-07T08:30:00.000Z"}
event: heartbeat
data: {}
Note: The SSE stream endpoint uses query parameter authentication (?token=...) because the browser EventSource API does not support custom headers. Keep the token secure and rotate regularly.
Inbox Message Stream (SSE)
Subscribe to real-time inbox message updates for a specific LinkedIn account.
/api/messages/stream?token=YOUR_TOKEN&accountId=ACCOUNT_IDOpens a persistent SSE connection for inbox updates. Receives events when new messages arrive, conversations are updated, etc.
const token = "eyJhbGciOiJIUzI1NiIs...";
const accountId = "cm3acc123mno";
const es = new EventSource(
`/api/messages/stream?token=${token}&accountId=${accountId}`
);
es.addEventListener("new-message", (event) => {
const data = JSON.parse(event.data);
console.log("New message:", data);
// { chatId: "chat_xyz", senderName: "Sarah Chen", preview: "..." }
});