Skip to main content
POST/site-views/

Create page visit

You can create a page visit occurrence associated with a specific user.

Attributes

Optional unless marked required

client_userstringrequired
A unique identifier (12 random characters) for the user which is given by User automatically.
page_domainstring(URL)required
A URL of a website.
page_pathstringrequired
A path (exact location of a page) visited by a user.
timestampstringrequired
A unix format timestamp of a user visit.

Request​

curl -X POST "https://<your_app_subdomain>.user.com/api/public/site-views/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2" \
-H "Content-Type: application/json" \
-d '{
"client_user": "dlfpgqe5r6yu",
"page_domain": "https://example.com",
"page_path": "/pricing",
"timestamp": "2026-11-10T09:32:46.576Z"
}'

Response examples​

{
"id": 54,
"client_user": "Ypp9DQiEZIPl",
"created_at": "2019-10-07T11:39:25.385368Z",
"domain": "http://mysite.com",
"path": "/my-path"
}

Response fields​

Fields returned in the 201 Created response body.

idinteger
ID of the page visit.
client_userstring
A unique identifier (12 random characters) for the user which is given by User automatically.
created_atstring (date-time)
When the visit was recorded, ISO 8601.
domainstring (URL)
Domain of the visited page, with the protocol, for example https://example.com.
pathstring
Path of the visited page on that domain, for example /pricing.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.