Skip to main content
GET
/
client
/
user
/
sessions
Get Sessions
curl --request GET \
  --url https://api.doshi.app/client/user/sessions \
  --header 'Access-Type: <access-type>' \
  --header 'Authorization: Bearer <token>'
{
  "sessions": [
    {
      "id": "<string>",
      "userId": "<string>",
      "startTime": "2023-11-07T05:31:56Z",
      "lastActivity": "2023-11-07T05:31:56Z",
      "endTime": "2023-11-07T05:31:56Z",
      "duration": 123
    }
  ],
  "total": 123,
  "totalSeconds": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.doshi.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Authentication token (API Key) provided by Doshi. Your server's IP address must be whitelisted to use this API. Contact hello@doshi.app to whitelist your IPs.

Headers

Access-Type
enum<string>
required

Must be set to 'client' for all API requests

Available options:
client

Query Parameters

userId
string

Filter by user ID

page
integer
default:1

Page number for pagination

pageSize
integer
default:10000

Number of results per page (max 10000)

Response

A list of sessions with total duration.

sessions
object[]
required
total
integer
required
totalSeconds
number
required

Sum of all session durations in seconds