> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.heyreach.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.heyreach.io/_mcp/server.

# Get Overall Stats

POST https://api//api/public/stats/GetOverallStats
Content-Type: application/json

## Gets the overall stats for the specified filters.

* **Method:** `POST`

* **Content-Type:** `application/json`

***

## **Request Body**

* **accountIds**: Array of Ids of the LinkedIn senders. If empty - all the senders will be included.

* **campaignIds:** Array of the Ids of the campaigns to be included. If empty - all the campaigns will be included.

* **startDate:**

* **endDate:**

\{\
"accountIds": \[1234],\
"campaignIds": \[],\
"startDate": "2024-12-17T00:00:00.000Z",\
"endDate": "2024-12-19T23:59:59.999Z"\
}

Reference: https://docs.heyreach.io/hey-reach-api/analytics/get-overall-stats

## Request

### Headers

- `X-API-KEY` (string, optional)

### Body (application/json)

This endpoint expects an object.

- `accountIds` (list of integer, required)
- `campaignIds` (list of any, required)
- `startDate` (datetime, required)
- `endDate` (datetime, required)

## Response

### 200

OK

- `byDayStats` (object, required)
  - `2024-12-17T00:00:00Z` (object, required)
    - `profileViews` (integer, required)
    - `postLikes` (integer, required)
    - `follows` (integer, required)
    - `messagesSent` (integer, required)
    - `totalMessageStarted` (integer, required)
    - `totalMessageReplies` (integer, required)
    - `inmailMessagesSent` (integer, required)
    - `totalInmailStarted` (integer, required)
    - `totalInmailReplies` (integer, required)
    - `connectionsSent` (integer, required)
    - `connectionsAccepted` (integer, required)
    - `messageReplyRate` (double, required)
    - `inMailReplyRate` (integer, required)
    - `connectionAcceptanceRate` (double, required)
  - `2024-12-18T00:00:00Z` (object, required)
    - `profileViews` (integer, required)
    - `postLikes` (integer, required)
    - `follows` (integer, required)
    - `messagesSent` (integer, required)
    - `totalMessageStarted` (integer, required)
    - `totalMessageReplies` (integer, required)
    - `inmailMessagesSent` (integer, required)
    - `totalInmailStarted` (integer, required)
    - `totalInmailReplies` (integer, required)
    - `connectionsSent` (integer, required)
    - `connectionsAccepted` (integer, required)
    - `messageReplyRate` (double, required)
    - `inMailReplyRate` (integer, required)
    - `connectionAcceptanceRate` (double, required)
  - `2024-12-19T00:00:00Z` (object, required)
    - `profileViews` (integer, required)
    - `postLikes` (integer, required)
    - `follows` (integer, required)
    - `messagesSent` (integer, required)
    - `totalMessageStarted` (integer, required)
    - `totalMessageReplies` (integer, required)
    - `inmailMessagesSent` (integer, required)
    - `totalInmailStarted` (integer, required)
    - `totalInmailReplies` (integer, required)
    - `connectionsSent` (integer, required)
    - `connectionsAccepted` (integer, required)
    - `messageReplyRate` (double, required)
    - `inMailReplyRate` (integer, required)
    - `connectionAcceptanceRate` (double, required)
- `overallStats` (object, required)
  - `profileViews` (integer, required)
  - `postLikes` (integer, required)
  - `follows` (integer, required)
  - `messagesSent` (integer, required)
  - `totalMessageStarted` (integer, required)
  - `totalMessageReplies` (integer, required)
  - `inmailMessagesSent` (integer, required)
  - `totalInmailStarted` (integer, required)
  - `totalInmailReplies` (integer, required)
  - `connectionsSent` (integer, required)
  - `connectionsAccepted` (integer, required)
  - `messageReplyRate` (double, required)
  - `inMailReplyRate` (integer, required)
  - `connectionAcceptanceRate` (double, required)

## Examples

**Request**

```json
{
  "accountIds": [
    1234
  ],
  "campaignIds": [],
  "startDate": "2024-12-17T00:00:00Z",
  "endDate": "2024-12-19T23:59:59Z"
}
```

**Response**

```json
{
  "byDayStats": {
    "2024-12-17T00:00:00Z": {
      "profileViews": 0,
      "postLikes": 0,
      "follows": 0,
      "messagesSent": 723,
      "totalMessageStarted": 593,
      "totalMessageReplies": 136,
      "inmailMessagesSent": 0,
      "totalInmailStarted": 0,
      "totalInmailReplies": 0,
      "connectionsSent": 4650,
      "connectionsAccepted": 637,
      "messageReplyRate": 0.22934233,
      "inMailReplyRate": 0,
      "connectionAcceptanceRate": 0.13698925
    },
    "2024-12-18T00:00:00Z": {
      "profileViews": 0,
      "postLikes": 0,
      "follows": 0,
      "messagesSent": 1033,
      "totalMessageStarted": 592,
      "totalMessageReplies": 119,
      "inmailMessagesSent": 0,
      "totalInmailStarted": 0,
      "totalInmailReplies": 0,
      "connectionsSent": 5161,
      "connectionsAccepted": 652,
      "messageReplyRate": 0.20101352,
      "inMailReplyRate": 0,
      "connectionAcceptanceRate": 0.1263321
    },
    "2024-12-19T00:00:00Z": {
      "profileViews": 0,
      "postLikes": 0,
      "follows": 0,
      "messagesSent": 845,
      "totalMessageStarted": 581,
      "totalMessageReplies": 140,
      "inmailMessagesSent": 0,
      "totalInmailStarted": 0,
      "totalInmailReplies": 0,
      "connectionsSent": 4929,
      "connectionsAccepted": 539,
      "messageReplyRate": 0.24096386,
      "inMailReplyRate": 0,
      "connectionAcceptanceRate": 0.10935281
    }
  },
  "overallStats": {
    "profileViews": 0,
    "postLikes": 0,
    "follows": 0,
    "messagesSent": 2601,
    "totalMessageStarted": 1766,
    "totalMessageReplies": 395,
    "inmailMessagesSent": 0,
    "totalInmailStarted": 0,
    "totalInmailReplies": 0,
    "connectionsSent": 14740,
    "connectionsAccepted": 1828,
    "messageReplyRate": 0.2236693,
    "inMailReplyRate": 0,
    "connectionAcceptanceRate": 0.124016285
  }
}
```

**SDK Code**

```python
import requests

url = "https://api//api/public/stats/GetOverallStats"

payload = {
    "accountIds": [1234],
    "campaignIds": [],
    "startDate": "2024-12-17T00:00:00Z",
    "endDate": "2024-12-19T23:59:59Z"
}
headers = {
    "X-API-KEY": "<string>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api//api/public/stats/GetOverallStats';
const options = {
  method: 'POST',
  headers: {'X-API-KEY': '<string>', 'Content-Type': 'application/json'},
  body: '{"accountIds":[1234],"campaignIds":[],"startDate":"2024-12-17T00:00:00Z","endDate":"2024-12-19T23:59:59Z"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api//api/public/stats/GetOverallStats"

	payload := strings.NewReader("{\n  \"accountIds\": [\n    1234\n  ],\n  \"campaignIds\": [],\n  \"startDate\": \"2024-12-17T00:00:00Z\",\n  \"endDate\": \"2024-12-19T23:59:59Z\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-KEY", "<string>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api//api/public/stats/GetOverallStats")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<string>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"accountIds\": [\n    1234\n  ],\n  \"campaignIds\": [],\n  \"startDate\": \"2024-12-17T00:00:00Z\",\n  \"endDate\": \"2024-12-19T23:59:59Z\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api//api/public/stats/GetOverallStats")
  .header("X-API-KEY", "<string>")
  .header("Content-Type", "application/json")
  .body("{\n  \"accountIds\": [\n    1234\n  ],\n  \"campaignIds\": [],\n  \"startDate\": \"2024-12-17T00:00:00Z\",\n  \"endDate\": \"2024-12-19T23:59:59Z\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api//api/public/stats/GetOverallStats', [
  'body' => '{
  "accountIds": [
    1234
  ],
  "campaignIds": [],
  "startDate": "2024-12-17T00:00:00Z",
  "endDate": "2024-12-19T23:59:59Z"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-KEY' => '<string>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api//api/public/stats/GetOverallStats");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-KEY", "<string>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"accountIds\": [\n    1234\n  ],\n  \"campaignIds\": [],\n  \"startDate\": \"2024-12-17T00:00:00Z\",\n  \"endDate\": \"2024-12-19T23:59:59Z\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-API-KEY": "<string>",
  "Content-Type": "application/json"
]
let parameters = [
  "accountIds": [1234],
  "campaignIds": [],
  "startDate": "2024-12-17T00:00:00Z",
  "endDate": "2024-12-19T23:59:59Z"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api//api/public/stats/GetOverallStats")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```