Rest API
Get content library events per day
GET
/api/v1/insights/wiki/events/per-day
const url = 'https://api.unless.com/api/v1/insights/wiki/events/per-day?startTime=2026-04-15&endTime=2026-04-15&forceRefresh=false';const options = { method: 'GET', headers: { 'x-api-key': 'example', 'x-user-email': 'example', 'x-account-id': 'example', 'x-website-id': 'example' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.unless.com/api/v1/insights/wiki/events/per-day?startTime=2026-04-15&endTime=2026-04-15&forceRefresh=false' \ --header 'x-account-id: example' \ --header 'x-api-key: example' \ --header 'x-user-email: example' \ --header 'x-website-id: example'Content library updates and token spend, one entry per day in the range.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”x-api-key
required
string
Your API key from account settings.
x-user-email
required
string
The email address of your user.
x-account-id
required
string
The ID of your account. You can find this in the account settings.
x-website-id
required
string
The ID of the workspace you want to use.
Query Parameters
Section titled “Query Parameters”startTime
required
string format: date
First day of the range, inclusive, as YYYY-MM-DD.
endTime
required
string format: date
Last day of the range, inclusive, as YYYY-MM-DD.
forceRefresh
boolean
Recompute instead of reading the query cache. Slow - only worth it when you know the cache is stale.
Responses
Section titled “Responses”One entry per day in the range.
Media typeapplication/json
object
status
string
lastUpdate
number
days
Array<object>
object
day
string
updates
number
tokensInput
number
tokensOutput
number
Example generated
{ "status": "example", "lastUpdate": 1, "days": [ { "day": "example", "updates": 1, "tokensInput": 1, "tokensOutput": 1 } ]}Unauthorized - invalid API key.
StartTime or endTime was missing.