Logs

Retrieve a single log

Changed on

Returns a single log entry by its composite key ({event_time_ms}:{event_id}). Unlike the list endpoint, this returns the full payload for the event.

get/logs/{event_time_and_id}

Request

  • Base URL
    https://api.clerk.com/v1
  • URL
    https://api.clerk.com/v1/logs/{event_time_and_id}
  • Auth
    HTTP bearer

Path parameters

event_time_and_idstring required
Example:1776207110588:019d8e31-a1bc-7e07-9347-0fd20b25c475

Composite identifier in the format {event_time_ms}:{event_id}, where event_time_ms is the event timestamp as a Unix timestamp in milliseconds and event_id is the UUID of the event.

Response

A single log entry with full payload.

objectstring required

String representing the object's type. Always "log".

idstring uuid required

Unique identifier for the log event.

event_timeinteger required

The timestamp when the event occurred (Unix timestamp in milliseconds).

actorstring required

The actor that performed the action (e.g., user ID).

actor_typestring

The kind of principal the actor identifies, classified when the event was recorded: user (an end user of your application), dashboard_user (a member of your Clerk Dashboard workspace), instance_key, api_key, integration, or clerk_system.

subjectstring required

The subject of the event (e.g., user ID, resource ID).

typestring required

The type of the log event.

client_idstring nullable

The client ID of the request. Set on FAPI requests, unset on BAPI requests.

sourcestring nullable required

The source service that generated the event.

session_idstring nullable

The ID of the session the event occurred in, if any.

trace_idstring required

Trace ID for distributed tracing (32 hex characters).

span_idstring required

Span ID for distributed tracing (16 hex characters).

parent_span_idstring nullable

Parent span ID for hierarchical tracing.

group_idstring nullable

The ID of the event group (a flow such as a sign-in) the event belongs to, e.g. a sign-in ID. Null for an event outside any group.

group_typestring nullable

The kind of event group the event belongs to, e.g. sign_in. Null for an event outside any group.

group_started_atinteger nullable

When the event's group started (Unix timestamp in milliseconds). Null for an event outside any group.

payloadobject required

Additional event-specific data.

Example response

{
  "object": "log",
  "actor_type": "dashboard_user",
  "event_context": {
    "device": {
      "location": {
        "country_code": "US"
      }
    }
  }
}

Changes