# Create page visit

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

POST /site-views/

Attributes Type Required Description
client_user string yes A unique identifier (12 random characters) for the user which is given by User.com automatically.
page_domain string(URL) yes A URL of a website.
page_path string yes A path (exact location of a page) visited by a user.
timestamp string yes A unix format timestamp of a user visit.

# Request

  • CURL
  • JavaScript
  • PHP
  • Python
 curl -X POST -H "Authorization: Token <your_64_char_api_key>"
     -H "Accept: */*; version=2" -H "Content-Type: application/json" -d '{
        "client_user": "Ypp9DQiEZIPl",
        "page_domain": "http://mysite.com",
        "page_path": "/my-path",
        "timestamp": "2019-02-18T12:53:17.165251Z"
    }' "https://<your_app_subdomain>.user.com/api/public/site-views/"

# Response

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