Docs
Sites APIConversion

Record an analytics event

A demand event a page observed, forwarded by the site's server. Uses the read rate limit, since events arrive in volume.

POST/api/sites/v1/events

A demand event a page observed, forwarded by the site's server. Uses the read rate limit, since events arrive in volume.

Authorization

websiteToken
AuthorizationBearer <token>

A Sanctum token scoped to one website.

In: header

Header Parameters

X-Resi-Website?string

Website id. Overrides Host resolution for builds running where Host is meaningless. The token must still be scoped to this website.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/sites/v1/events" \  -H "Content-Type: application/json" \  -d '{    "event_type": "string",    "property": "string"  }'
{  "data": {    "id": "string",    "event_type": "string",    "status": "recorded"  },  "meta": {}}