Admin analytics overview
curl --request GET \
--url https://api.example.com/api/v1/admin/analytics/overviewimport requests
url = "https://api.example.com/api/v1/admin/analytics/overview"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/admin/analytics/overview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/admin/analytics/overview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/admin/analytics/overview"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/admin/analytics/overview")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/admin/analytics/overview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyAnalytics
Admin analytics overview
Live platform-wide counters (users, listings, matches, chats, MRR/ARR) computed against the current collections and cached for 60 seconds.
GET
/
api
/
v1
/
admin
/
analytics
/
overview
Admin analytics overview
curl --request GET \
--url https://api.example.com/api/v1/admin/analytics/overviewimport requests
url = "https://api.example.com/api/v1/admin/analytics/overview"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/admin/analytics/overview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/admin/analytics/overview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/admin/analytics/overview"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/admin/analytics/overview")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/admin/analytics/overview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyOverview
The “front-page” tile of the admin dashboard. Returns live platform-wide counters computed against the current Mongo collections — total users, active listings, mutual matches, recently-active chats, and the monthly + annual recurring revenue in pence. Unlike the cohorts and locations surfaces, this endpoint does not read from the nightlyanalytics_daily rollup; it recomputes on demand so the dashboard reflects the current moment.
To keep a burst of admin page-loads from hammering Mongo, the snapshot is cached for 60 seconds. A cache hit returns the cached object untouched; a miss recomputes, populates the cache, and returns the fresh snapshot.
See Analytics and rollups for the full split between live + rollup paths.
Available to any admin role — SUPER, MODERATOR, and FINANCE all read this surface (mirrors the reports feed and audit-log read paths).
Authentication
Bearer <accessToken> with scope: 'admin' required (requireAdmin).
Path parameters
None.Query parameters
None.Request body
None.Response — 200 OK
| Field | Type | Notes | Example |
|---|---|---|---|
totalUsers | integer | Count of all users rows. Not filtered by ban/delete status — raw row count. | 1842 |
totalActiveListings | integer | Count of current_homes rows with status: 'LIVE' AND ownerTenancyApproved: true. | 412 |
totalEngineMatches | integer | Count of matches rows neither side has dismissed. The engine deletes rows once a pair stops matching, so these are the live pairs either user can open a chat from. Shown as Matches on the dashboard. | 640 |
totalCloseMatches | integer | Every member’s close matches added up (homes that miss one thing by a little; one per pair). Worked out by walking the members, so it is kept for about 10 minutes and refreshed in the background. Shown as Close matches on the dashboard; the dashboard’s Total matches is this plus totalEngineMatches. | 454 |
closeMatchesByMiss | object | The close matches split by the one thing each misses by: location (just outside the search area), rent (a little over the maximum) and bedrooms (one more or fewer). The three add up to totalCloseMatches. | { "location": 120, "rent": 210, "bedrooms": 124 } |
totalMatches | integer | Count of matches rows where both savedByA and savedByB are non-null (mutual saves). Shown as Mutual saves on the dashboard. | 87 |
activeChats | integer | Count of conversations with a lastMessageAt in the trailing 7 days. | 54 |
mrr | integer | Monthly Recurring Revenue in pence. With the single GBP-monthly tier this is count(ACTIVE subscriptions) × monthlyPence. | 89700 |
arr | integer | Annual Recurring Revenue in pence. Convenience field — always mrr × 12. | 1076400 |
computedAt | string | ISO 8601 UTC timestamp of when this snapshot was computed. On a cache hit this is the original compute time (up to 60s old). | 2026-05-23T09:14:08.412Z |
{
"totalUsers": 1842,
"totalActiveListings": 412,
"totalEngineMatches": 640,
"totalCloseMatches": 454,
"totalMatches": 87,
"activeChats": 54,
"mrr": 89700,
"arr": 1076400,
"computedAt": "2026-05-23T09:14:08.412Z"
}
computedAt is the truthful “as of” — clients can check Date.now() - computedAt to know how stale the snapshot is. Worst case is 60 seconds.MVP limitations
totalMatchescounts mutual saves (savedByA && savedByB). Chat does not require a save — any engine match can open a conversation — soactiveChatscan exceed it.mrr/arrassume the single GBP-monthly pricing tier. Mixed-tier or non-GBP pricing requires a per-row summation againstapp_config.pricing— out of scope for MVP.
Error responses
| Status | Code | Meaning |
|---|---|---|
| 401 | UNAUTHENTICATED | Missing, malformed, expired, or non-admin-scope token. |
See also
- Analytics and rollups — the split between live (this endpoint) and rollup (cohorts/locations).
- Admin analytics cohorts — per-day rollup metrics.
- Admin analytics locations — top boroughs from the latest rollup.
curl
curl "https://api.swappr.co.uk/api/v1/admin/analytics/overview" \
-H "Authorization: Bearer $ADMIN_ACCESS_TOKEN"
Postman
Seedocs/postman/swappr.postman_collection.json → Admin Analytics → Overview.