List sign-in audit events
const url = 'https://example.com/v1/audit/sign-ins?limit=25&kind=signed-in&order=asc';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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://example.com/v1/audit/sign-ins?limit=25&kind=signed-in&order=asc' \ --header 'Authorization: Bearer <token>'The workspace’s sign-in history: who signed in and out, how (method), when and from where (clientAddress), what was refused and why, and emailed links sent or capped. ?userId= narrows to one person’s own sign-ins and sign-outs. Oldest first; ?order=desc for newest first. A tenant admin’s to read (403 permission-denied otherwise). Only mounted when CreateAppInput.auditEvents is wired.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”1..100. Default 25.
Where the previous page ended: its nextCursor, as it came. A runtime that seals cursors takes one only for the same list, filters and caller, within a day; otherwise 400 bad-input, and the list starts again without it. Absent → first page.
One person’s own sign-ins and sign-outs.
One kind of event.
Inclusive lower bound on timestamp.
Inclusive upper bound on timestamp.
asc (the default): oldest first. desc: newest first. nextCursor continues in the same order.
Responses
Section titled “Responses”A page of sign-in audit events.
object
One sign-in audit event, flattened: who signed in or out, how, from where, and what was refused.
object
signed-in / signed-out; sign-in-refused (with reason); sign-in-link-sent / sign-in-link-capped (an emailed link, for userId; reason is the limit that held); sessions-revoked (“sign out everywhere”, or removing a person; byUserId is the admin who did it, if not the person); sessions-ended (a changed boot token, or a session made without a second factor in a workspace that requires one: reason says which); second-factor-set-up, second-factor-removed (byUserId is the admin who removed it, if not the person) and recovery-codes-replaced; chat-app-connected, chat-app-refresh-refused (with reason) and chat-app-disconnected (a chat app this person connected, whose renewal was refused, or that they disconnected; clientId is the chat app). Never a key or a code.
succeeded or denied.
The person the event is about: who signed in or out, whose sessions ended, whom a link was for, or whose chat app it was. Absent on a refusal that names no one.
How: api-token, email-link, google, microsoft, github, or a workspace identity provider’s id.
The client’s address, as the runtime trusts it.
Why a sign-in or a chat app’s renewal was refused, or which limit held.
Who acted, when it isn’t userId: the admin who ended this person’s sessions.
The chat app, on a chat-app-* kind: its client id.
Example
{ "data": [ { "kind": "signed-in" } ]}Malformed cursor, kind, from, to, or order.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Not a tenant admin (permission-denied).
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}rate-limit-exceeded with details.limit: "api-requests", on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; Retry-After says when to send it again.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.
The database was too busy to answer in time (database-busy), or the authorization store couldn’t be reached (authz-backend-unavailable); Retry-After (whole seconds) says when to try again.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.