View as Markdown

Get API consumption metrics for the integration over a date range

GET /v1/usage
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

Returns a top-level object, NOT the { “data”: { … } } envelope: { startDate, endDate, data: [ { period, metricType, value } ], totals: { : } }. startDate defaults to 30 days before endDate; endDate defaults to today (UTC); metric filters to one metric type (ApiCalls, Events, Sessions, StorageBytes, BotAnalyses; case-insensitive).

Query Parameters

startDate
string(date-time)

Inclusive lower bound, ISO-8601 date. Defaults to 30 days before endDate.

endDate
string(date-time)

Inclusive upper bound, ISO-8601 date. Defaults to today (UTC).

metric
string

Optional metric filter. One of: ApiCalls, Events, Sessions, StorageBytes, BotAnalyses (case-insensitive).

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 UsageResponse

Show 4 response attributes Hide response attributes
startDate
string
endDate
string
data
array[object]
Show 3 data attributes Hide data attributes
period
string
metricType
string
value
integer(int64)
totals
object
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/usage
curl --request GET \
  --url https://api.isnotai.com/v1/usage \
  --header 'Authorization: Bearer aik_v1_YOUR_API_KEY'
import requests

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

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/usage';
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/usage"),
    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

Inclusive lower bound, ISO-8601 date. Defaults to 30 days before endDate.

Inclusive upper bound, ISO-8601 date. Defaults to today (UTC).

Optional metric filter. One of: ApiCalls, Events, Sessions, StorageBytes, BotAnalyses (case-insensitive).

200 Response examples
{
  "startDate": "2026-05-15",
  "endDate": "2026-06-14",
  "data": [
    {
      "period": "2026-06-13",
      "metricType": "ApiCalls",
      "value": 1204
    },
    {
      "period": "2026-06-13",
      "metricType": "Sessions",
      "value": 87
    },
    {
      "period": "2026-06-14",
      "metricType": "ApiCalls",
      "value": 998
    }
  ],
  "totals": {
    "ApiCalls": 2202,
    "Sessions": 87
  }
}
400 Response examples
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
401 Response examples
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}