---
title: "The sessions behind the numbers"
method: GET
path: "/sessions"
tags: ["Analytics"]
---

# The sessions behind the numbers

`GET /sessions`

## Request

- Base URL: `https://api.opentools.com`
- URL: `https://api.opentools.com/sessions`
- Auth: HTTP bearer

Sessions on one site over the last `days` days, most recent first, each with its verdict as it stood after its last batch. For the full verdict with scores and signals, use `/verdicts/{session_id}`.

## Query parameters

- `site` string, required
- `days` integer
- `limit` integer
- `visitor` 'agent' | 'automation' | 'human' | 'unclassified'

## Response `200`

The sessions.

- object
  - `site` string, required
  - `since` string, date-time, required
  - `until` string, date-time, required
  - `sessions` Session[], required
    - `session_id` string, required
    - `first_seen` string, date-time, required
    - `last_seen` string, date-time, required
    - `pageviews` integer, required
    - `url` string, required: The first page of the visit, origin and path.
    - `run` string, nullable, required: The label your own test visit was opened with, if any (see the script reference); null for real visitors.
    - `visitor` 'agent' | 'automation' | 'human' | 'unclassified', required
    - `agent` object, nullable, required: Which agent, when the visitor is one. Without vendor; `/verdicts/{session_id}` has the full record.
      - `type` string, required
      - `name` string, required
      - `identity` string, required
      - `confidence` string, required
    - `confidence` 'high' | 'medium' | 'low', required: How sure the verdict is.
    - `rules` string, required: The rules version that produced this verdict.

## Other responses

- `400`: `site` is missing or malformed, or `days`, `limit` or `visitor` is out of range.
- `401`: The `Authorization` header is missing, or its key is unknown or revoked.
- `404`: No site with this id belongs to your organization.
- `429`: The key made more than 600 requests this minute.
- `503`: The key or the site couldn't be checked just now. Nothing is wrong with the request; retry it shortly.

---

[API](https://skmtc.dev/opentools/apis/opentools-js-api-reference.md) - [All operations](https://skmtc.dev/opentools/apis/opentools-js-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/opentools/apis/opentools-js-api-reference/revisions/ab1463b57d31?raw)
