API Documentation
Learn how to connect and integrate with our API.
Authentication
All the API endpoints require an API key sent by the Bearer Authentication method.
curl --request GET \
--url 'https://dev.usermetric.io/api/{endpoint}' \
--header 'Authorization: Bearer {api_key}' \
Errors
Our API uses conventional HTTP status codes to indicate the success or failure of a request.
Example
{
"errors": [
{
"title": "You do not have access to the API.",
"status": 401
}
]
}
Status codes
200
Request completed successfully
400
Bad request - Required parameters are missing or invalid
401
Unauthorized - API key is missing or invalid
404
The requested resource was not found
429
Too many requests - Rate limit exceeded
500
Internal server error - this means there is a problem on our end
All API endpoint results work with the UTC timezone unless specified otherwise.
Pageviews
Lightweight tracking
Pageviews
Advanced tracking
Sessions
Advanced tracking
Events children
Advanced tracking
Outbound clicks
Advanced tracking / Lightweight tracking
Replays
Advanced tracking
Visitors
Advanced tracking
Goals
Advanced tracking / Lightweight tracking
Goal conversions
Advanced tracking / Lightweight tracking
Heatmaps
Advanced tracking
Annotations
Advanced tracking / Lightweight tracking
Website statistics
Advanced tracking / Lightweight tracking