Skip to main content
GET
/
api
/
stats
Get Dashboard Stats
curl --request GET \
  --url https://api.example.com/api/stats
{
  "totalViews": 123,
  "totalShares": 123,
  "totalSubscribers": 123,
  "graphData": [
    {
      "date": "<string>",
      "views": 123,
      "shares": 123
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/subratomandal/dyeink/llms.txt

Use this file to discover all available pages before exploring further.

Authentication

This endpoint requires authentication. Include a valid session cookie or authentication token.

Response

Returns comprehensive dashboard statistics for the authenticated user’s blog.
totalViews
number
required
Total number of views across all posts
totalShares
number
required
Total number of shares across all posts
totalSubscribers
number
required
Total number of active subscribers to the blog
graphData
array
required
Array of daily statistics for the last 7 days
date
string
required
Date in ISO format (YYYY-MM-DD)
views
number
required
Number of views on this date
shares
number
required
Number of shares on this date

Example Request

cURL
curl -X GET https://api.dyeink.com/api/stats \
  -H "Cookie: session=your-session-token"

Example Response

{
  "totalViews": 1523,
  "totalShares": 87,
  "totalSubscribers": 42,
  "graphData": [
    {
      "date": "2026-02-26",
      "views": 203,
      "shares": 12
    },
    {
      "date": "2026-02-27",
      "views": 187,
      "shares": 9
    },
    {
      "date": "2026-02-28",
      "views": 245,
      "shares": 15
    },
    {
      "date": "2026-03-01",
      "views": 198,
      "shares": 11
    },
    {
      "date": "2026-03-02",
      "views": 221,
      "shares": 13
    },
    {
      "date": "2026-03-03",
      "views": 234,
      "shares": 14
    },
    {
      "date": "2026-03-04",
      "views": 235,
      "shares": 13
    }
  ]
}

Error Responses

401 Unauthorized
User is not authenticated
{
  "error": "Not authenticated"
}
500 Internal Server Error
Failed to retrieve statistics
{
  "error": "Failed to get stats"
}

Build docs developers (and LLMs) love