Get portal view analytics
get
https://api.expiryedge.com/v1/getPortalAnalyticsany role (admin, editor or viewer)60/min
Request
curl 'https://api.expiryedge.com/v1/getPortalAnalytics?portalId=prt_5Vb1nK' \
-H "Authorization: Bearer $EXPIRYEDGE_API_KEY"Response
{
"success": true,
"totalViews": 12,
"lastViewedAt": "2026-09-26T09:12:00.000Z",
"recentViews": [
{
"portal_id": "prt_5Vb1nK",
"organization_id": "org_northwind",
"viewed_at": "2026-09-26T09:12:00.000Z",
"ip": "203.0.113.24"
}
],
"viewsByDay": {
"2026-09-25": 3,
"2026-09-26": 1
}
}Returns 404 for an unknown portal or one in another organization. Aggregates at most the latest 100 logged views.
portalIdstringrequiredPortal id.
200
View analytics.
successbooleantotalViewsintegerlastViewedAtstring | nullformat: date-timerecentViewsarray of objectsUp to 20 most recent views (from the latest 100 logged).viewsByDaymap of integerYYYY-MM-DD-> view count, over the latest 100 logged views.
400 | The request is missing required fields or contains invalid values. |
401 | Missing, expired or invalid bearer token. |
404 | The record does not exist or is not in your organization. |
429 | Too many requests for this endpoint from your IP. Wait Retry-After seconds. |
500 | Unexpected server error. Retry later; quote requestId to support. |
