Skip to main content

Analytics API

Retrieve document generation analytics and metrics.

Endpoints Overview

MethodEndpointDescription
GET/api/v1/documents/analyticsGet document generation analytics
GET/api/v1/templates/:id/analyticsGet template-specific analytics
note

Analytics data is available through the Documents and Templates API endpoints, not a separate Analytics API.


Document Analytics

GET /api/v1/documents/analytics

Get document generation analytics for your team.

Query Parameters

ParameterTypeDescription
startDatestringStart date (ISO 8601 format)
endDatestringEnd date (ISO 8601 format)

Response

{
"summary": {
"totalDocuments": 1250,
"successfulDocuments": 1230,
"failedDocuments": 20,
"successRate": 98.4
},
"byFormat": {
"pdf": 850,
"xlsx": 400
},
"byStatus": {
"completed": 1230,
"failed": 20
},
"period": {
"startDate": "2025-01-01T00:00:00Z",
"endDate": "2025-01-31T23:59:59Z"
}
}

Example

curl "https://api.rynko.dev/api/v1/documents/analytics?startDate=2025-01-01&endDate=2025-01-31" \
-H "Authorization: Bearer rd_sk_your_api_key"

Template Analytics

GET /api/v1/templates/:id/analytics

Get usage analytics for a specific template.

Path Parameters

ParameterTypeDescription
idstringTemplate ID

Response

{
"templateId": "tmpl_abc123",
"templateName": "Invoice Template",
"format": "pdf",
"usage": {
"total": 450,
"last7Days": 45,
"last30Days": 180
},
"performance": {
"successRate": 99.1,
"avgGenerationTimeMs": 2300,
"failedCount": 4
}
}

Example

curl https://api.rynko.dev/api/v1/templates/tmpl_abc123/analytics \
-H "Authorization: Bearer rd_sk_your_api_key"

Metrics Definitions

MetricDescription
totalDocumentsTotal documents generated in the period
successfulDocumentsSuccessfully generated documents
failedDocumentsFailed document generations
successRatePercentage of successful generations
avgGenerationTimeMsAverage generation time in milliseconds

Related: Documents API | Templates API | Analytics Dashboard