Skip to content
Start in Cloud

Ingest Web Vital REST API

POST
/ingest/web-vitals
curl --request POST \
--url https://app.hitkeep.com/ingest/web-vitals \
--header 'Content-Type: application/json' \
--data '{ "mid": "example", "n": "LCP", "nt": "example", "p": "example", "pid": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "sid": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "tsrc": "example", "tv": "example", "v": 1 }'

Ingests one compact opt-in Web Vital sample from hk-vitals.js. The server resolves the site from Origin, derives the rating from standard thresholds, and strips browser-provided query strings or hashes from the path.

Media typeapplication/json
object
mid

Optional web-vitals metric instance ID used for future dedupe and bfcache analysis.

string
n
required

Metric name.

string
Allowed values: LCP INP CLS FCP TTFB
nt

Navigation type.

string
p
required

Browser path. Query strings and hashes are stripped server-side.

string
pid
required
string format: uuid
sid
required
string format: uuid
tsrc
string
tv
string
v
required

Metric value. LCP, INP, FCP, and TTFB use milliseconds. CLS is unitless.

number

Accepted

Invalid request

Media typeapplication/json
object
message
string
Examplegenerated
{
"message": "example"
}