> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

---
id: 3529a12c-3492-48bd-948e-06596529bdcc
---

# Retrieve login activity

> Retrieve logs of user actions related to [login activity](https://knowledge.hubspot.com/account-management/view-and-export-account-activity-history#account-login-history).

> [accordion] Supported products

> [accordion] Required Scopes


## OpenAPI

````yaml specs/2026-03/account-audit-logs-v2026-03.json GET /account-info/2026-03/activity/login
openapi: 3.0.1
info:
  title: Audit Logs
  description: Basepom for all HubSpot Projects
  version: 2026-03
  x-hubspot-product-tier-requirements:
    marketing: FREE
    sales: FREE
    service: FREE
    cms: FREE
    commerce: FREE
    crmHub: FREE
    dataHub: FREE
  x-hubspot-api-use-case: >-
    You want to build an internal tool for your compliance team to regularly
    monitor the activity of employees in your company accessing data in your
    HubSpot account.
  x-hubspot-introduction: >-
    The account activity API allows you to retrieve login history and security
    activity for your HubSpot account.
servers:
  - url: https://api.hubapi.com
security: []
tags:
  - name: Basic
paths:
  /account-info/2026-03/activity/login:
    get:
      tags:
        - Basic
      summary: Retrieve login activity
      description: >-
        Retrieve logs of user actions related to [login
        activity](https://knowledge.hubspot.com/account-management/view-and-export-account-activity-history#account-login-history).
      operationId: get-/account-info/2026-03/activity/login
      parameters:
        - name: after
          in: query
          description: >-
            The paging cursor token of the last successfully read resource will
            be returned as the `paging.next.after` JSON property of a paged
            response containing more results.
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of results to display per page.
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: userId
          in: query
          description: >-
            The unique identifier of the user whose login activity is being
            queried.
          required: false
          style: form
          explode: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CollectionResponsePublicLoginAuditForwardPaging
        default:
          $ref: '#/components/responses/Error'
          description: ''
      security:
        - oauth2:
            - account-info.security.read
components:
  schemas:
    CollectionResponsePublicLoginAuditForwardPaging:
      required:
        - results
      type: object
      properties:
        paging:
          $ref: '#/components/schemas/ForwardPaging'
        results:
          type: array
          description: >-
            An array of PublicLoginAudit objects, each representing a single
            login audit event.
          items:
            $ref: '#/components/schemas/PublicLoginAudit'
    ForwardPaging:
      type: object
      properties:
        next:
          $ref: '#/components/schemas/NextPage'
      description: >-
        Paging information for forward-only pagination. Contains the next page
        reference when more results are available; omitted or empty on the last
        page.
    PublicLoginAudit:
      required:
        - id
        - loginAt
        - loginSucceeded
      type: object
      properties:
        countryCode:
          type: string
          description: The approximate country code of the login
        email:
          type: string
          description: Email address of the user associated with the login.
        id:
          type: string
          description: The login activity's unique ID.
        ipAddress:
          type: string
          description: IP address where the activity originated.
        location:
          type: string
          description: The approximate location where the login activity originated.
        loginAt:
          type: string
          description: The time the login took place.
          format: date-time
        loginSucceeded:
          type: boolean
          description: Whether the login was successful or not.
        regionCode:
          type: string
          description: The approximate region code of the login
        userAgent:
          type: string
          description: Information about the device used for logging in.
        userId:
          type: integer
          description: The user's unique ID.
          format: int32
    Error:
      required:
        - category
        - correlationId
        - message
      type: object
      properties:
        category:
          type: string
          description: The error category
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Context about the error condition
          example: >-
            {invalidPropertyName=[propertyValue], missingScopes=[scope1,
            scope2]}
        correlationId:
          type: string
          description: >-
            A unique identifier for the request. Include this value with any
            error reports or support tickets
          format: uuid
          example: aeb5f871-7f07-4993-9211-075dc63e7cbf
        errors:
          type: array
          description: further information about the error
          items:
            $ref: '#/components/schemas/ErrorDetail'
        links:
          type: object
          additionalProperties:
            type: string
          description: >-
            A map of link names to associated URIs containing documentation
            about the error or recommended remediation steps
        message:
          type: string
          description: >-
            A human readable message describing the error along with remediation
            steps where appropriate
          example: An error occurred
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error
      description: >-
        Represents an error response returned by the API when an operation
        fails. This component is used in various endpoints to provide detailed
        information about the error encountered.
      example:
        message: Invalid input (details will vary based on the error)
        correlationId: aeb5f871-7f07-4993-9211-075dc63e7cbf
        category: VALIDATION_ERROR
        links:
          knowledge-base: https://www.hubspot.com/products/service/knowledge-base
    NextPage:
      required:
        - after
      type: object
      properties:
        after:
          type: string
          description: >-
            A string token used as a cursor to fetch the next set of results in
            a paged response.
        link:
          type: string
          description: >-
            A URL string that provides a direct link to the next page of
            results.
      description: >-
        Specifies the paging information needed to retrieve the next set of
        results in a paginated API response
    ErrorDetail:
      required:
        - message
      type: object
      properties:
        code:
          type: string
          description: The status code associated with the error detail
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Context about the error condition
          example: '{missingScopes=[scope1, scope2]}'
        in:
          type: string
          description: The name of the field or parameter in which the error was found.
        message:
          type: string
          description: >-
            A human readable message describing the error along with remediation
            steps where appropriate
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error
      description: >-
        Represents detailed information about an error that occurred in the API.
        This component is used to provide additional context and specifics about
        errors, typically as part of an error response.
  responses:
    Error:
      description: An error occurred.
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://app.hubspot.com/oauth/authorize
          tokenUrl: https://api.hubapi.com/oauth/v1/token
          scopes:
            account-info.security.read: ''

````