Skip to main content
GET
/
api
/
external
/
loginaudit
/
users
/
{userId}
/
recent
Recent login activity for a user
curl --request GET \
  --url https://gateway-api.guardhousehq.com/api/external/loginaudit/users/{userId}/recent \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": 123,
      "userId": 123,
      "companyId": 123,
      "appType": "<string>",
      "emailAttempted": "<string>",
      "ipAddress": "<string>",
      "userAgent": "<string>",
      "failureReason": "<string>",
      "occurredUtc": "2023-11-07T05:31:56Z"
    }
  ],
  "errors": [
    {
      "code": "<string>",
      "message": "<string>",
      "field": "<string>"
    }
  ],
  "meta": {
    "traceId": "<string>",
    "timestampUtc": "2023-11-07T05:31:56Z",
    "nextPageEndpoint": "<string>",
    "prevPageEndpoint": "<string>"
  }
}

Authorizations

Authorization
string
header
required

JWT issued by POST /api/token/request. Send as Authorization: Bearer <token>.

Path Parameters

userId
integer<int32>
required

The user's ID.

Query Parameters

take
integer<int32>
default:50

How many events to return. Clamped server-side to [1, 500].

Required range: 1 <= x <= 500

Response

Recent login audit events for the user, newest first.

Standard { data, errors, meta } envelope used by Login Audit endpoints. Differs from the legacy ApiResponse envelope used by older endpoints.

data
object[] · null · null

Endpoint-specific payload. null when errors is populated.

errors
object[] | null
meta
object