PapermarkDocs

Document analytics

Aggregate analytics for a single document: total views, unique viewers, total read time, per-page average duration. Backed by Tinybird — subject to a tighter per-minute rate limit than other endpoints.

GET
/v1/analytics/documents/{id}

Authorization

bearerAuth analytics.read
AuthorizationBearer <token>

Dashboard-issued token (pm_live_...) or OAuth-issued access token.

In: header

Scope: analytics.read

Query Parameters

since?integer

Unix milliseconds — start of window (default: 30 days ago)

until?integer

Unix milliseconds — end of window (default: now)

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.papermark.com/v1/analytics/documents/{id}"
{
  "document_id": "string",
  "total_views": 0,
  "unique_viewers": 0,
  "total_duration_seconds": 0,
  "avg_page_duration_seconds": [
    {
      "page_number": 0,
      "avg_duration_seconds": 0
    }
  ],
  "since": "2019-08-24T14:15:22Z",
  "until": "2019-08-24T14:15:22Z"
}
{
  "error": {
    "code": "unauthorized",
    "message": "Missing bearer token.",
    "doc_url": "https://www.papermark.com/docs/api/errors#unauthorized",
    "details": null
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Missing bearer token.",
    "doc_url": "https://www.papermark.com/docs/api/errors#unauthorized",
    "details": null
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Missing bearer token.",
    "doc_url": "https://www.papermark.com/docs/api/errors#unauthorized",
    "details": null
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Missing bearer token.",
    "doc_url": "https://www.papermark.com/docs/api/errors#unauthorized",
    "details": null
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Missing bearer token.",
    "doc_url": "https://www.papermark.com/docs/api/errors#unauthorized",
    "details": null
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Missing bearer token.",
    "doc_url": "https://www.papermark.com/docs/api/errors#unauthorized",
    "details": null
  }
}