View as Markdown

List LMS users correlated with sessions

GET /v1/users
Base URL
https://api.isnotai.com

Authenticate with Authorization: Bearer aik_v1_... (preferred) or the x-api-key header. Keys are region-bound. Authentication

Available Regions 2 regions

riskLevel, botSessionCount and mediumSessionCount follow the integration’s risk thresholds (GET /v1/settings/risk-thresholds; mediumAt 40 and botAt 70 by default), applied to each user’s raw session botScores. averageBotScore and maxBotScore are the raw scores, rounded to 2 decimals, never up onto 0.40 or 0.70 when the score is below it (0.6999 reads 0.69). GET /v1/users lists users by user id. Pages no longer repeat or skip users: a walk lists each user once, and a user who first appears after the walk has passed their place in the order is listed by the next walk. Sort by lastSeen on your side if you need recency. A page can hold fewer users than pageSize while hasMore is true: continue with nextCursor until hasMore is false.

Query Parameters

pageSize
integer(int32)

Page size. The maximum is scoped to the integration’s plan tier (Free 50, Pro and Enterprise 100). Requests above the tier maximum clamp to the maximum and the effective value is returned in pagination.limit. Minimum 1. Default 50.

cursor
string

Opaque cursor from a previous response’s pagination.nextCursor. Pass it back unchanged, with the same filters; omit it for the first page. A cursor resumes only the query that issued it: an invalid cursor, or one sent with other filters, returns 400 with error code INVALID_REQUEST; a cursor in this list’s earlier format returns 400 with error code CURSOR_EXPIRED. In both cases, restart from the first page.

search
string

Case-insensitive substring match against userId or userName.

Responses

Any authenticated route can also return 401 (missing or invalid key), 429 RATE_LIMITED (edge rate limit; Retry-After is an integer number of seconds), and 5xx errors, even where not listed below. See Error Handling and Rate Limits.

200 application/json

Payload of UserListResponse

Show 2 response attributes Hide response attributes
data
array[object]
Show 13 data attributes Hide data attributes
userId
string
userName
string
sessionCount
integer(int32)
botSessionCount
integer(int32)

Sessions whose raw botScore is at or above the integration’s botAt risk threshold (GET /v1/settings/risk-thresholds; 70 by default).

mediumSessionCount
integer(int32)

Sessions whose raw botScore is at or above the integration’s mediumAt risk threshold and below botAt (GET /v1/settings/risk-thresholds; 40 and 70 by default).

averageBotScore
number(double)
maxBotScore
number(double)
deviceCount
integer(int32)
firstSeen
string(date-time)
lastSeen
string(date-time)
riskLevel
string

low, medium or high, from the user’s highest raw session botScore and the integration’s risk thresholds (GET /v1/settings/risk-thresholds): high at or above botAt, medium from mediumAt up to botAt, low below mediumAt or with no score. 70 and 40 by default.

sparkline
array[integer(int32)]
userUrl
string
pagination
object
Show 3 pagination attributes Hide pagination attributes
nextCursor
string
hasMore
boolean
limit
integer(int32)
400 application/json

Payload of ErrorEnvelope

Show 1 response attribute Hide response attributes
error
object
Show 3 error attributes Hide error attributes
code
string Required
message
string Required
details
object Required

Always present and null unless the error carries field-level context (validation errors set details.field to the offending parameter name).

401 application/json

Payload of ErrorEnvelope

Show 1 response attribute Hide response attributes
error
object
Show 3 error attributes Hide error attributes
code
string Required
message
string Required
details
object Required

Always present and null unless the error carries field-level context (validation errors set details.field to the offending parameter name).

GET /v1/users
curl --request GET \
  --url https://api.isnotai.com/v1/users \
  --header 'Authorization: Bearer aik_v1_YOUR_API_KEY'
import requests

url = "https://api.isnotai.com/v1/users"

headers = {"Authorization": "Bearer aik_v1_YOUR_API_KEY"}

response = requests.get(url, headers=headers)

print(response.json())
const fetch = require('node-fetch');

const url = 'https://api.isnotai.com/v1/users';
const options = {method: 'GET', headers: {Authorization: 'Bearer aik_v1_YOUR_API_KEY'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("https://api.isnotai.com/v1/users"),
    Headers =
    {
        { "Authorization", "Bearer aik_v1_YOUR_API_KEY" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}

Try it

Collapse

Sent to the API as Authorization: Bearer aik_v1_.... Held only in this tab's input element; re-enter on each browser tab. The docs site never receives or stores it.

Query parameters

Page size. The maximum is scoped to the integration's plan tier (Free 50, Pro and Enterprise 100). Requests above the tier maximum clamp to the maximum and the effective value is returned in pagination.limit. Minimum 1. Default 50.

Opaque cursor from a previous response's pagination.nextCursor. Pass it back unchanged, with the same filters; omit it for the first page. A cursor resumes only the query that issued it: an invalid cursor, or one sent with other filters, returns 400 with error code INVALID_REQUEST; a cursor in this list's earlier format returns 400 with error code CURSOR_EXPIRED. In both cases, restart from the first page.

Case-insensitive substring match against userId or userName.

200 Response examples
{
  "data": [
    {
      "userId": "string",
      "userName": "string",
      "sessionCount": 0,
      "botSessionCount": 0,
      "mediumSessionCount": 0,
      "averageBotScore": 0,
      "maxBotScore": 0,
      "deviceCount": 0,
      "firstSeen": "2024-01-01T00:00:00Z",
      "lastSeen": "2024-01-01T00:00:00Z",
      "riskLevel": "string",
      "sparkline": [
        0
      ],
      "userUrl": "string"
    }
  ],
  "pagination": {
    "nextCursor": "string",
    "hasMore": false,
    "limit": 0
  }
}
400 Response examples
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
401 Response examples
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}