Weezly Outreach
|Developer Docs

Dashboard API

Retrieve aggregated performance metrics, daily time series, and activity data across all your campaigns and accounts.

Dashboard Stats

GET/api/dashboard/stats

Get aggregated dashboard statistics with daily time series. Supports date range, campaign, and account filters.

Query Parameters

ParameterTypeDescription
daysnumberNumber of days of history (default: 7, max: 90)
startDatestringStart date in ISO format (alternative to days)
endDatestringEnd date in ISO format
campaignIdstringFilter by specific campaign
accountIdstringFilter by specific LinkedIn account
Request — cURLcURL
curl --location --request GET 'http://outreach.weezly.com/api/dashboard/stats' \
  --header 'X-API-KEY: sk_live_YOUR_API_KEY'
Response — 200 OKJSON
{
  "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

GET/api/dashboard/activity

Get recent activity events (messages sent, connections accepted, replies received, etc.).

Query Parameters

ParameterTypeDescription
limitnumberNumber of events to return (default: 20, max: 100)
offsetnumberOffset for pagination (default: 0)
typestringFilter by activity type: message, connection, reply, inmail, step
Request — cURLcURL
curl --location --request GET 'http://outreach.weezly.com/api/dashboard/activity' \
  --header 'X-API-KEY: sk_live_YOUR_API_KEY'
Response — 200 OKJSON
{
  "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.

GET/api/dashboard/stream?token=YOUR_TOKEN

Opens a persistent SSE connection. Authentication is via query parameter since EventSource cannot set headers.

JavaScript — Connect to streamJavaScript
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...");
};
SSE event formatText
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.

GET/api/messages/stream?token=YOUR_TOKEN&accountId=ACCOUNT_ID

Opens a persistent SSE connection for inbox updates. Receives events when new messages arrive, conversations are updated, etc.

JavaScript — Connect to inbox streamJavaScript
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: "..." }
});