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

# Subscriber Statistics

> Get aggregate statistics about your subscribers

## Overview

Retrieve aggregate statistics about your subscriber base including counts by status and plan usage information.

## Authentication

<ParamField header="Authorization" type="string" required>
  Bearer token. Format: `Bearer YOUR_API_KEY`
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="Statistics">
    <ResponseField name="total" type="integer">
      Total number of subscribers in your account
    </ResponseField>

    <ResponseField name="active" type="integer">
      Number of active subscribers who can receive emails
    </ResponseField>

    <ResponseField name="unsubscribed" type="integer">
      Number of subscribers who have opted out
    </ResponseField>

    <ResponseField name="bounced" type="integer">
      Number of subscribers with bounced email addresses
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Maximum number of subscribers allowed on your current plan
    </ResponseField>

    <ResponseField name="usage_percentage" type="integer">
      Percentage of your subscriber limit currently used
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.mailgreet.com/api/v1/external/subscribers/stats" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.mailgreet.com/api/v1/external/subscribers/stats',
    {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
      }
    }
  );

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.mailgreet.com/api/v1/external/subscribers/stats',
      headers={'Authorization': 'Bearer YOUR_API_KEY'}
  )

  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "success": true,
    "data": {
      "total": 1500,
      "active": 1350,
      "unsubscribed": 100,
      "bounced": 50,
      "limit": 5000,
      "usage_percentage": 30
    }
  }
  ```
</ResponseExample>

## Use Cases

<CardGroup cols={2}>
  <Card title="Dashboard Widgets" icon="chart-pie">
    Display subscriber metrics in your application dashboard
  </Card>

  <Card title="Limit Monitoring" icon="gauge">
    Monitor usage to avoid hitting subscriber limits
  </Card>

  <Card title="Health Checks" icon="heart-pulse">
    Track bounce rates and subscriber health
  </Card>

  <Card title="Reporting" icon="file-chart-pie">
    Generate subscriber growth reports
  </Card>
</CardGroup>
