Skip to main content
GET
/
v1
/
stats
/
documents
Get document stats over time
curl --request GET \
  --url http://localhost:8000/v1/stats/documents \
  --header 'Authorization: Bearer <token>'
{
  "period": {
    "start": "<string>",
    "end": "<string>"
  },
  "group_by": "day",
  "data": [
    {
      "date": "<string>",
      "count": 123,
      "pages": 123,
      "size_bytes": 123
    }
  ],
  "totals": {
    "count": 123,
    "pages": 123,
    "size_bytes": 123
  }
}

Authorizations

Authorization
string
header
required

API Key authentication. Format: dk_test_ or dk_live_

Query Parameters

group_by
enum<string>
default:day

Time grouping interval

Available options:
day,
week,
month
start_date
string<date> | null

Start date (ISO 8601, default: 30 days ago)

end_date
string<date> | null

End date (ISO 8601, default: today)

Response

Document upload trends with time-based grouping

Response for document stats over time (GET /v1/stats/documents).

Document upload trends with time-based grouping.

period
StatsPeriod · object
required

Time period covered

Example:
{
"end": "2025-12-07",
"start": "2025-11-07"
}
group_by
enum<string>
required

Grouping interval

Available options:
day,
week,
month
data
DocumentStatsDataPoint · object[]
required

Time series data points

totals
DocumentStatsTotals · object
required

Aggregated totals for the period

Example:
{
"count": 72,
"pages": 2808,
"size_bytes": 146925813
}