Logs

Retrieve the payload schema of a log event type

Changed on

Returns the payload schema of a log event type: which fields its payload carries, addressed by the dot-paths that the payload_filter and payload_fields parameters of the list endpoint accept.

type accepts a concrete event type (sign_in.completed), a trailing-* wildcard (sign_in.*), or a bare family name (sign_in, normalized to sign_in.* when no concrete type matches — the response's event_type echoes the normalized form). For wildcard lookups the fields are the intersection across every matching event type, and matched_event_types lists what the intersection was computed over; per-type metadata (description, severity, docs_group) is present only for concrete types.

The response is the same for every instance.

get/logs/schemas

Request

  • Base URL
    https://api.clerk.com/v1
  • URL
    https://api.clerk.com/v1/logs/schemas
  • Auth
    HTTP bearer

Query parameters

typestring required
Example:sign_in.*

The event type to describe: concrete (sign_in.completed), trailing-* wildcard (sign_in.*), or bare family name (sign_in). Unknown types return a 422. A bare * is not accepted.

Response

The payload schema of a log event type.

objectstring required

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

event_typestring required

The event type this schema describes: a concrete type (sign_in.completed) or a trailing-* wildcard (sign_in.*). A bare family name in the request (sign_in) is normalized to its wildcard form here.

descriptionstring

Human-readable description of the event type. Present only for concrete types.

severitystring

Severity of the event type (e.g. info, success, warning_external). Present only for concrete types.

docs_groupstring

The documentation group the event type belongs to. Present only for concrete types.

matched_event_typesstring[]

The concrete event types a wildcard expanded to. Present only for wildcard lookups, whose fields are the intersection across these types.

Example response

{
  "object": "log_schema",
  "event_type": "sign_in.completed",
  "description": "Sign in was completed",
  "severity": "success",
  "docs_group": "Sign-in events",
  "fields": [
    {
      "path": "user_id"
    }
  ]
}

Changes