> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Heyreach Get Overall Stats: Inputs, Cost & CLI Example

> Reading overall HeyReach stats with sender/campaign filters. Includes inputs, outputs, pricing notes, Deepline CLI examples, and GTM automation guidance.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=heyreach_get_overall_stats:{}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                         | Type     | Required | Default | Description |
| ---------------------------- | -------- | -------- | ------- | ----------- |
| `payload.account_ids`        | `array`  | No       |         |             |
| `payload.campaign_ids`       | `array`  | No       |         |             |
| `payload.from`               | `string` | No       |         |             |
| `payload.to`                 | `string` | No       |         |             |
| `payload.additional_filters` | `record` | No       |         |             |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "HeyReach get overall stats input.",
    "properties": {
      "account_ids": {
        "type": "array",
        "items": {
          "description": "Numeric id as integer or numeric string.",
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1
            },
            {
              "type": "string",
              "minLength": 1,
              "pattern": "^\\d+$"
            }
          ]
        }
      },
      "campaign_ids": {
        "type": "array",
        "items": {
          "description": "Numeric id as integer or numeric string.",
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1
            },
            {
              "type": "string",
              "minLength": 1,
              "pattern": "^\\d+$"
            }
          ]
        }
      },
      "from": {
        "type": "string",
        "format": "date-time"
      },
      "to": {
        "type": "string",
        "format": "date-time"
      },
      "additional_filters": {
        "type": "object",
        "additionalProperties": {}
      }
    },
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name            | Type     | Required | Default | Description |
| --------------- | -------- | -------- | ------- | ----------- |
| `result.status` | `string` | Yes      |         |             |
| `result.result` | `object` | Yes      |         |             |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "status": {
        "type": "string"
      },
      "result": {
        "type": "object",
        "properties": {
          "byDayStats": {
            "type": "object",
            "properties": {
              "2024-12-17T00:00:00Z": {
                "type": "object",
                "properties": {
                  "profileViews": {
                    "type": "integer"
                  },
                  "postLikes": {
                    "type": "integer"
                  },
                  "follows": {
                    "type": "integer"
                  },
                  "messagesSent": {
                    "type": "integer"
                  },
                  "totalMessageStarted": {
                    "type": "integer"
                  },
                  "totalMessageReplies": {
                    "type": "integer"
                  },
                  "inmailMessagesSent": {
                    "type": "integer"
                  },
                  "totalInmailStarted": {
                    "type": "integer"
                  },
                  "totalInmailReplies": {
                    "type": "integer"
                  },
                  "connectionsSent": {
                    "type": "integer"
                  },
                  "connectionsAccepted": {
                    "type": "integer"
                  },
                  "messageReplyRate": {
                    "type": "number"
                  },
                  "inMailReplyRate": {
                    "type": "integer"
                  },
                  "connectionAcceptanceRate": {
                    "type": "number"
                  }
                },
                "required": [
                  "profileViews",
                  "postLikes",
                  "follows",
                  "messagesSent",
                  "totalMessageStarted",
                  "totalMessageReplies",
                  "inmailMessagesSent",
                  "totalInmailStarted",
                  "totalInmailReplies",
                  "connectionsSent",
                  "connectionsAccepted",
                  "messageReplyRate",
                  "inMailReplyRate",
                  "connectionAcceptanceRate"
                ],
                "additionalProperties": true
              },
              "2024-12-18T00:00:00Z": {
                "type": "object",
                "properties": {
                  "profileViews": {
                    "type": "integer"
                  },
                  "postLikes": {
                    "type": "integer"
                  },
                  "follows": {
                    "type": "integer"
                  },
                  "messagesSent": {
                    "type": "integer"
                  },
                  "totalMessageStarted": {
                    "type": "integer"
                  },
                  "totalMessageReplies": {
                    "type": "integer"
                  },
                  "inmailMessagesSent": {
                    "type": "integer"
                  },
                  "totalInmailStarted": {
                    "type": "integer"
                  },
                  "totalInmailReplies": {
                    "type": "integer"
                  },
                  "connectionsSent": {
                    "type": "integer"
                  },
                  "connectionsAccepted": {
                    "type": "integer"
                  },
                  "messageReplyRate": {
                    "type": "number"
                  },
                  "inMailReplyRate": {
                    "type": "integer"
                  },
                  "connectionAcceptanceRate": {
                    "type": "number"
                  }
                },
                "required": [
                  "profileViews",
                  "postLikes",
                  "follows",
                  "messagesSent",
                  "totalMessageStarted",
                  "totalMessageReplies",
                  "inmailMessagesSent",
                  "totalInmailStarted",
                  "totalInmailReplies",
                  "connectionsSent",
                  "connectionsAccepted",
                  "messageReplyRate",
                  "inMailReplyRate",
                  "connectionAcceptanceRate"
                ],
                "additionalProperties": true
              }
            },
            "required": [
              "2024-12-17T00:00:00Z",
              "2024-12-18T00:00:00Z"
            ],
            "additionalProperties": true
          },
          "overallStats": {
            "type": "object",
            "properties": {
              "profileViews": {
                "type": "integer"
              },
              "postLikes": {
                "type": "integer"
              },
              "follows": {
                "type": "integer"
              },
              "messagesSent": {
                "type": "integer"
              },
              "totalMessageStarted": {
                "type": "integer"
              },
              "totalMessageReplies": {
                "type": "integer"
              },
              "inmailMessagesSent": {
                "type": "integer"
              },
              "totalInmailStarted": {
                "type": "integer"
              },
              "totalInmailReplies": {
                "type": "integer"
              },
              "connectionsSent": {
                "type": "integer"
              },
              "connectionsAccepted": {
                "type": "integer"
              },
              "messageReplyRate": {
                "type": "number"
              },
              "inMailReplyRate": {
                "type": "integer"
              },
              "connectionAcceptanceRate": {
                "type": "number"
              }
            },
            "required": [
              "profileViews",
              "postLikes",
              "follows",
              "messagesSent",
              "totalMessageStarted",
              "totalMessageReplies",
              "inmailMessagesSent",
              "totalInmailStarted",
              "totalInmailReplies",
              "connectionsSent",
              "connectionsAccepted",
              "messageReplyRate",
              "inMailReplyRate",
              "connectionAcceptanceRate"
            ],
            "additionalProperties": true
          }
        },
        "required": [
          "byDayStats",
          "overallStats"
        ],
        "additionalProperties": true
      }
    },
    "required": [
      "status",
      "result"
    ],
    "additionalProperties": true
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute heyreach_get_overall_stats --payload '{}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.
* Billing mode: `no_bill`.
