Median

GET /logs

Updated Oct 1, 20261 minute read

Read the activity log

Owners and admins only. AI runs with their tokens and credits, tool calls, knowledge syncs and imports, team and settings changes, and whatever failed, newest first. Background work and API calls are only logged when they go wrong. Keep the same snapshot and filters while paging. Reading the log writes nothing to it.

Part of Billing.

Parameters

NameInTypeRequiredDescription
fromquerynumberNoInclusive Unix timestamp in milliseconds; defaults to 30 days before the end.
toquerynumberNoInclusive Unix timestamp in milliseconds; defaults to now.
snapshotquerynumberNoFixed recording cutoff in Unix milliseconds; defaults to now.
limitqueryintegerNoRecords per page.
cursorquerystringNoContinuation cursor. An empty filtered page may still have a continuation.
searchquerystringNoMatches the entry's line, its error and tool names.
categoryquerystringNoOne area, like ai, tools, knowledge or team.
actorIdquerystringNoOne member's user id.
conversationIdquerystringNoOnly entries about one conversation.
usagequerybooleanNoOnly entries that used something billed: tokens, emails or pages.
actorKindquery"member" | "agent" | "assistant" | "customer" | "api" | "system"NoWho did it: a member, the support agent, the assistant, a customer, the API or the system.
outcomequery"success" | "failed" | "denied" | "pending" | "canceled"NoEvent outcome.

Responses

StatusDescription
200A page of entries.
401Invalid or missing credentials.
403The authenticated role cannot read these records.
429Shared organization API allowance or temporary fair-use protection reached. Retry-After states the delay.

200 body

FieldTypeRequiredDescription
pageobject[]Yes
isDonebooleanYes
continueCursorstringYes

Example request

curl https://api.median.sh/v1/logs \
  -H "Authorization: Bearer $BEARER_AUTH"

Still need help?

    Esc