Docs

GET /v1/score/{session_id}

Get a real-time health score for any mobile or web session — friction, performance, and error signals combined into one number.

API

GET /v1/score/{session_id}

A single health score (0–100) for any session — combining crash risk, performance signals, and friction events into one number your agent can act on.

Request

GET https://api.coolcoding.co.uk/v1/score/{session_id}

Path Parameters

Parameter Type Required Description
session_id string Session UUID from your ingest events

Query Parameters

Parameter Type Required Default Description
include_breakdown boolean false Return per-signal score breakdown

Example Request

curl https://api.coolcoding.co.uk/v1/score/sess_abc123 \
  -H "Authorization: Bearer cc-YOUR_API_KEY"

Python:

import requests

response = requests.get(
    "https://api.coolcoding.co.uk/v1/score/sess_abc123",
    headers={"Authorization": "Bearer cc-YOUR_API_KEY"},
    params={"include_breakdown": True}
)
print(response.json())

JavaScript:

const response = await fetch(
  `https://api.coolcoding.co.uk/v1/score/sess_abc123?include_breakdown=true`,
  { headers: { "Authorization": "Bearer cc-YOUR_API_KEY" } }
);
console.log(await response.json());

Response

{
  "session_id": "sess_abc123",
  "app_id": "my-app",
  "score": 43,
  "rating": "poor",
  "scored_at": "2026-05-13T09:10:00Z",
  "breakdown": {
    "crash_risk": 18,
    "performance": 55,
    "friction": 38,
    "network": 61
  },
  "signals_evaluated": 12,
  "request_id": "req_9d1f7c",
  "usage": { "credits": 1 }
}
Field Description
score 0–100. Higher is healthier. Below 50 = agent should investigate.
rating excellent (80–100) · good (60–79) · fair (40–59) · poor (0–39)
breakdown Per-dimension scores when include_breakdown=true

Error Responses

Code Meaning
400 Bad Request — missing or invalid parameters
401 Unauthorized — API key missing or invalid
429 Too Many Requests — rate limit exceeded
432 Plan limit exceeded — upgrade your plan
500 Internal Server Error

429 example:

{
  "error": "Rate limit exceeded. Please reduce request frequency.",
  "retry_after": 60
}

Implement retry logic that respects the retry-after header value.

Expert help

Need help tracking this in your app?

Our team sets up analytics pipelines for mobile and web teams every day. Talk to us and get your first events flowing in under an hour.

Talk to an expert