Sessions
/
Get Sessions

Get Sessions

GET
https:/api.livesession.io/v1/sessions

List of all sessions

Scopes

Required scopes: users.sessions:read

Query parameters

  • page
    integer
    The number of page to start with (default 0, max 10000).
  • size
    integer
    The number of page's size (default 25, max 100).
  • email
    string

    The email address that you have associated with a session via identify.

  • visitor_id
    string
    The visitor ID.
  • tz
    string
    IANA timezone. Default Europe/London if RelativeDateString is applied.
  • date_from
    string or enum
    • date_from
      string
    • date_from
      enum
      • TODAY - Today since midnight
      • YESTERDAY - Yesterday since midnight
      • BEGINNING_OF_WEEK - Nearest monday since midnight
      • BEGINNING_OF_MONTH - 1st of the month since midnight
      • BEGINNING_OF_PREV_MONTH - Previous 1st of the month since midnight
      • TODAY-7DAYS - Exact 7 days ago since midnight
      • TODAY-30DAYS - Exact 30 days ago since midnight
      • TODAY
        string
      • YESTERDAY
        string
      • BEGINNING_OF_WEEK
        string
      • BEGINNING_OF_MONTH
        string
      • BEGINNING_OF_PREV_MONTH
        string
      • TODAY-7DAYS
        string
      • TODAY-30DAYS
        string
  • date_to
    string or enum
    • date_to
      string
    • date_to
      enum
      • TODAY - Today since midnight
      • YESTERDAY - Yesterday since midnight
      • BEGINNING_OF_WEEK - Nearest monday since midnight
      • BEGINNING_OF_MONTH - 1st of the month since midnight
      • BEGINNING_OF_PREV_MONTH - Previous 1st of the month since midnight
      • TODAY-7DAYS - Exact 7 days ago since midnight
      • TODAY-30DAYS - Exact 30 days ago since midnight
      • TODAY
        string
      • YESTERDAY
        string
      • BEGINNING_OF_WEEK
        string
      • BEGINNING_OF_MONTH
        string
      • BEGINNING_OF_PREV_MONTH
        string
      • TODAY-7DAYS
        string
      • TODAY-30DAYS
        string

Response

Successful response
  • total
    integer
    Total number of sessions matching the query
  • page
    object
    • num
      integer
      Current page number
    • size
      integer
      Number of items per page
  • sessions
    array of object
    List of session objects
    • id
      string
      Unique identifier for the session
    • website_id
      string
      ID of the website where the session was recorded
    • session_url
      string
      URL to view the session in LiveSession dashboard
    • creation_timestamp
      integer
      Unix timestamp when the session was created
    • duration
      integer
      Total duration of the session in seconds
    • end_timestamp
      integer
      Unix timestamp when the session ended
    • active_time
      integer
      Total time the user was actively interacting with the page in seconds
    • end_url
      string
      The last URL visited during the session
    • expiration_timestamp
      integer
      Unix timestamp when the session recording will expire
    • last_event_timestamp
      integer
      Unix timestamp of the last event recorded in the session
    • product
      string
      Product identifier associated with the session
    • device
      string
      Device type (e.g., desktop, mobile, tablet)
    • tags
      array of string
      Custom tags associated with the session
    • last_seen_page_view_id
      string
      ID of the last page view in the session
    • seen
      boolean
      Whether the session has been viewed in the dashboard
    • referrer
      string
      URL where the user came from before starting the session
    • start_url
      string
      First URL visited during the session
    • visitor_first_session
      boolean
      Whether this is the visitor's first session
    • engagment_score
      number
      Calculated engagement score for the session (0-100)
    • visitor
      object
      • id
        string
        Unique identifier for the visitor
      • ip
        string
        IP address of the visitor
      • geolocation
        object
        • country_code
          string
          Two-letter country code (ISO 3166-1 alpha-2)
        • city
          string
          City name
        • region
          string
          Region or state name
      • name
        string
        Name of the visitor if identified
      • email
        string
        Email address of the visitor if identified
      • email_hash
        string
        Hashed version of the visitor's email for privacy
      • params
        array of object
        Custom parameters associated with the visitor
        • name
          string
          Parameter name
        • value
          string
          Parameter value
      • last_session_timestamp
        integer
        Unix timestamp of the visitor's last session
      • first_session_timestamp
        integer
        Unix timestamp of the visitor's first session
    • resolution
      object
      • height
        integer
        Screen height in pixels
      • width
        integer
        Screen width in pixels
      • resolution
        string
        Screen resolution (e.g., "1920x1080")
    • os
      object
      • name
        string
        Operating system name (e.g., Windows, macOS, iOS)
      • version
        string
        Operating system version
    • browser
      object
      • description
        string
        Full browser description string
      • name
        string
        Browser name (e.g., Chrome, Firefox, Safari)
      • version
        string
        Browser version
    • utm
      object
      • source
        string
        UTM source parameter (e.g., google, facebook)
      • medium
        string
        UTM medium parameter (e.g., cpc, social)
      • campaign
        string
        UTM campaign parameter
      • term
        string
        UTM term parameter (search keywords)
      • content
        string
        UTM content parameter
    • page_views_statistics
      object
      • count
        integer
        Total number of page views in the session
    • events_statistics
      object
      • clicks
        integer
        Total number of clicks during the session
      • error_clicks
        integer
        Number of clicks on error elements
      • rage_clicks
        integer
        Number of rapid clicks indicating user frustration
      • error_logs
        integer
        Number of JavaScript errors logged
      • net_errors
        integer
        Number of network errors encountered
Example request
curl --request GET \
--url https://api.livesession.io/v1/sessions \
--header 'accept: application/json'
Example response
{
"total": 0,
"page": {
"num": 0,
"size": 0
},
"sessions": [
{
"id": "string",
"website_id": "string",
"session_url": "string",
"creation_timestamp": 0,
"duration": 0,
"end_timestamp": 0,
"active_time": 0,
"end_url": "string",
"expiration_timestamp": 0,
"last_event_timestamp": 0,
"product": "string",
"device": "string",
"tags": [
"string"
],
"last_seen_page_view_id": "string",
"seen": true,
"referrer": "string",
"start_url": "string",
"visitor_first_session": true,
"engagment_score": 0,
"visitor": {
"id": "string",
"ip": "string",
"geolocation": {
"country_code": "string",
"city": "string",
"region": "string"
},
"name": "string",
"email": "string",
"email_hash": "string",
"params": [
{
"name": "string",
"value": "string"
}
],
"last_session_timestamp": 0,
"first_session_timestamp": 0
},
"resolution": {
"height": 0,
"width": 0,
"resolution": "string"
},
"os": {
"name": "string",
"version": "string"
},
"browser": {
"description": "string",
"name": "string",
"version": "string"
},
"utm": {
"source": "string",
"medium": "string",
"campaign": "string",
"term": "string",
"content": "string"
},
"page_views_statistics": {
"count": 0
},
"events_statistics": {
"clicks": 0,
"error_clicks": 0,
"rage_clicks": 0,
"error_logs": 0,
"net_errors": 0
}
}
]
}
Built with

Show your support! Star us on GitHub ⭐️