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

# Fetch business activity metrics

> Generates a monthly activity summary for a specific business, including SMS and categorization metrics. This v2 endpoint supports an optional date range and returns a monthly breakdown format.



## OpenAPI

````yaml get /v2/activity/businesses/{businessId}
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v2/activity/businesses/{businessId}:
    get:
      tags: []
      summary: Fetch business activity metrics
      description: >-
        Generates a monthly activity summary for a specific business, including
        SMS and categorization metrics. This v2 endpoint supports an optional
        date range and returns a monthly breakdown format.
      operationId: activity.v2.business.get
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business to fetch metrics for.
          required: true
          schema:
            type: string
        - name: start_date
          in: query
          description: >-
            Optional filter for the start of the activity window. Metrics will
            include data on or after this date. Accepts either an ISO 8601 date
            (YYYY-MM-DD) or date-time.
          example: '2024-02-01'
          schema:
            type: string
        - name: end_date
          in: query
          description: >-
            Optional filter for the end of the activity window. Metrics will
            include data up to and including this date. Accepts either an ISO
            8601 date (YYYY-MM-DD) or date-time.
          example: '2024-03-31'
          schema:
            type: string
        - name: Content-Type
          in: header
          description: Content-Type must be set to application/json.
          schema:
            type: string
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessActivitySummaryV2'
        '404':
          description: >-
            Business id is not found. This indicates the business id is invalid
            or the business has been archived.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    BusinessActivitySummaryV2:
      type: object
      properties:
        months:
          type: array
          items:
            $ref: '#/components/schemas/BusinessActivityMonthlySummary'
          description: Monthly activity summaries for a single business.
      description: Business activity summary with monthly breakdowns.
    ApiError:
      type: object
      description: An error object returned in API error responses.
      properties:
        type:
          $ref: '#/components/schemas/ApiErrorType'
          description: >-
            A fixed category for the error, helpful for categorizing and
            processing errors.
        description:
          type: string
          description: A human-readable error description.
        error_enum:
          $ref: '#/components/schemas/ApiEnumErrorType'
          description: >-
            A stable, machine-readable identifier for programmatically handling
            specific error conditions. Only present for 4xx client errors—not
            included for 5xx server errors. Use this instead of parsing the
            description field, as enum values remain stable across API versions.
          nullable: true
        meta:
          type: object
          description: Optional additional information about the error.
          nullable: true
      required:
        - type
        - description
    BusinessActivityMonthlySummary:
      type: object
      properties:
        month:
          type: string
          description: The month in YYYY-MM format.
          example: 2024-01
        sms_sent:
          type: integer
          description: Number of SMS messages sent by this business in this month.
          example: 5
        sms_received:
          type: integer
          description: Number of SMS messages received by this business in this month.
          example: 3
        categorized_transactions:
          type: integer
          description: Number of transactions categorized in this month.
          example: 10
        uncategorized_transactions:
          type: integer
          description: Number of transactions that remain uncategorized in this month.
          example: 2
        categorized_by_api:
          type: integer
          description: Number of transactions categorized via Layer's API in this month.
          example: 7
        categorized_by_sms:
          type: integer
          description: >-
            Number of transactions categorized via Layer's SMS flows in this
            month.
          example: 3
        categorization_pct:
          type: number
          description: The fraction of transactions that were categorized this month (0-1).
          example: 0.83
        active_days:
          type: integer
          description: >-
            Number of days in this month where the business had SMS or
            categorization activity.
          example: 15
    ApiErrorType:
      type: string
      enum:
        - ResourceArchived
        - AuthFailure
        - Plaid
        - Stripe
        - InvalidState
        - ResourceNotFound
        - InvalidParameters
        - JsonSerialization
        - Unknown
        - BadRequest
        - PaginationCursor
        - Conflict
        - LedgerOperationFailed
    ApiEnumErrorType:
      type: string
      description: >-
        Stable enum values for programmatic error handling. Only present in 4xx
        error responses.
      enum:
        - AccessCodeInvalid
        - BalanceSheetDoesNotBalance
        - BalanceSheetMissingAccount
        - BankStatementParserError
        - BillStateError
        - BulkCategorizeFailure
        - BulkMatchFailure
        - BusinessTaskAlreadyCompleted
        - BusinessTaskDeleted
        - CalendlyOAuthError
        - CallBookingError
        - CantUpdateTransactionInCustomerPayout
        - CantUpdateTransactionInVendorPayout
        - CheckPayrollConfigNotFound
        - CheckPayrollServiceNotFound
        - ClerkUserAlreadyExists
        - ConflictingQueryParams
        - CustomAccountAlreadyExists
        - CustomTransactionCsvParsingError
        - CustomTransactionUploadFailure
        - CustomerPayoutInputFormatError
        - DoesNotMatchExistingEntity
        - EmptyBatchRequest
        - ExpenseParserError
        - ExternalAccountBalanceReconciliationError
        - ExternalIdConflict
        - InvalidCategory
        - InvalidEffectiveDate
        - InvalidLedgerOperation
        - InvalidMonthlyAverageRange
        - InvalidMultiPartRequest
        - InvalidPaginationCursor
        - InvalidPayload
        - InvoiceDeleted
        - InvoiceNotFound
        - InvoiceReferenceMismatch
        - InvoiceStateError
        - ManualRateLimit
        - MultipleTagKeyFiltersUnsupported
        - NoCognitoUserFound
        - NoOpeningBalanceFound
        - NotYetReconciled
        - OnePasswordApiError
        - OnePasswordItemNotFound
        - OnePasswordVaultNotFound
        - OpenAICategorizationError
        - PaymentLinkInvalid
        - PayrollStateError
        - PeriodIsClosed
        - PeriodNotClosed
        - PhoneNumberAlreadyRegistered
        - PlaidApiError
        - PlaidConnectionBroken
        - PlaidCreateLinkTokenError
        - PlaidCredentialsNotConfigured
        - PlaidExchangePublicTokenError
        - PlaidGetInstitutionByIdError
        - PlaidGetItemError
        - PlaidInvalidEnvironment
        - PlaidItemAlreadyExists
        - PlaidItemNotFound
        - PlaidProcessorApiError
        - PlaidUnlinkItemError
        - QueryParamFormat
        - QueryParamMissing
        - QuickbooksBrokenConnection
        - QuickbooksConnectionAlreadyExists
        - QuickbooksConnectionAlreadySyncing
        - QuickbooksConnectionMissing
        - QuickbooksConnectionNotActivated
        - QuickbooksInvalidRequest
        - QuickbooksInvalidState
        - QuickbooksNoMatchingAccount
        - QuickbooksNonPostingAccountType
        - QuickbooksNotConfigured
        - QuickbooksOAuthCallbackInvalid
        - QuickbooksOAuthError
        - QuickbooksTokenExpired
        - ResourceArchived
        - ScheduleCNotConfigured
        - SmsNotEnabled
        - SpecifiedBadRequest
        - SpecifiedIdNotFound
        - SplitTransactionError
        - StepEvaluationBadRequest
        - StripeConnectAccountIdNotFound
        - StripeCredentialsNotConfigured
        - StripeGetBalanceForConnectAccountFailure
        - StripeRedirectOrRefreshUrlNotConfigured
        - TagFilterNotFound
        - UnexpectedQueryParam
        - UnitAccountsInUse
        - WrongAnswerType
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````