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

# Summarize activity

> Summarizes LinkedIn activity and performance for the current organization.



## OpenAPI

````yaml /openapi.yaml get /v1/activity/summary
openapi: 3.0.3
info:
  title: TalkToHumans Public API
  version: 1.0.0
  license:
    name: Proprietary
  description: >
    Read and organize the LinkedIn organization data your team already manages
    in TalkToHumans: accounts, contacts, tags, notes, sequence state,
    conversations, and views.
servers:
  - url: https://api.talktohumans.app
    description: TalkToHumans API
security:
  - bearerAuth: []
tags:
  - name: Organization
    description: Organization details for the current API key.
  - name: LinkedIn
    description: LinkedIn accounts, contacts, companies, and conversations.
  - name: Activity
    description: Activity for organization reporting.
  - name: Enrich
    description: Profile enrichment for LinkedIn contacts and companies.
  - name: Views
    description: Saved TalkToHumans views.
paths:
  /v1/activity/summary:
    get:
      tags:
        - Activity
      summary: Summarize activity
      description: >-
        Summarizes LinkedIn activity and performance for the current
        organization.
      operationId: summarizeActivity
      parameters:
        - $ref: '#/components/parameters/ActivityFrom'
        - $ref: '#/components/parameters/ActivityTo'
        - $ref: '#/components/parameters/ActivityTimezone'
        - $ref: '#/components/parameters/ActivityAccountId'
        - $ref: '#/components/parameters/ActivityUserId'
        - $ref: '#/components/parameters/ActivityEventType'
        - $ref: '#/components/parameters/ActivityChannel'
        - $ref: '#/components/parameters/ActivitySource'
        - $ref: '#/components/parameters/ActivityTag'
      responses:
        '200':
          description: Activity summary.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActivitySummaryEnvelope'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/ReportingForbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    ActivityFrom:
      name: from
      in: query
      description: |
        Inclusive activity window start. Use RFC3339 or `YYYY-MM-DD`.
        Date-only values are interpreted in the requested `timezone`.
      schema:
        type: string
      example: '2026-07-01'
    ActivityTo:
      name: to
      in: query
      description: >
        Exclusive activity window end. Use RFC3339 or `YYYY-MM-DD`.

        Date-only values are interpreted in the requested `timezone` and advance
        to the start of the following local day.

        The response repeats the normalized instant in `filters.to` with
        `to_exclusive: true`.
      schema:
        type: string
      example: '2026-07-10'
    ActivityTimezone:
      name: timezone
      in: query
      description: >-
        IANA timezone used for date-only `from` and `to` filters. Defaults to
        `UTC`.
      schema:
        type: string
        default: UTC
      example: America/Los_Angeles
    ActivityAccountId:
      name: account_id
      in: query
      description: >
        Filter by TalkToHumans LinkedIn account ID in activity facts.

        Repeat the query parameter for multiple accounts. The backend also
        accepts comma-separated values.
      schema:
        type: array
        items:
          type: string
          pattern: ^[1-9][0-9]*$
      style: form
      explode: true
    ActivityUserId:
      name: user_id
      in: query
      description: >
        Filter by TalkToHumans user ID in activity facts.

        Repeat the query parameter for multiple users. The backend also accepts
        comma-separated values.
      schema:
        type: array
        items:
          type: string
          pattern: ^[1-9][0-9]*$
      style: form
      explode: true
    ActivityEventType:
      name: event_type
      in: query
      description: >
        Filter by activity event type.

        Repeat the query parameter for multiple event types. The backend also
        accepts comma-separated values.
      schema:
        type: array
        items:
          $ref: '#/components/schemas/ActivityEventType'
      style: form
      explode: true
    ActivityChannel:
      name: channel
      in: query
      description: >
        Filter by activity channel, such as `linkedin_message`,
        `linkedin_inmail`, or `linkedin_connection`.

        Repeat the query parameter for multiple channels. The backend also
        accepts comma-separated values.
      schema:
        type: array
        items:
          type: string
      style: form
      explode: true
    ActivitySource:
      name: source
      in: query
      description: >
        Filter by activity emitter source, such as `canonical_messages`,
        `canonical_chats`,

        `canonical_sequence_steps`, `sequence_runner_report`, or
        `canonical_account_participants`.

        Repeat the query parameter for multiple sources. The backend also
        accepts comma-separated values.
      schema:
        type: array
        items:
          type: string
      style: form
      explode: true
    ActivityTag:
      name: tag
      in: query
      description: >-
        Reserved for future tag-attributed reporting. Passing this parameter
        currently returns `400 bad_request`.
      schema:
        type: string
  schemas:
    ActivitySummaryEnvelope:
      type: object
      additionalProperties: false
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/ActivitySummaryResponse'
    ActivityEventType:
      type: string
      enum:
        - connection_request_sent
        - connection_request_accepted
        - incoming_connection_request_accepted
        - message_scheduled
        - message_sent
        - follow_up_sent
        - message_received
        - outbound_reply_received
        - template_run_started
        - template_run_replied
    ActivitySummaryResponse:
      type: object
      additionalProperties: false
      required:
        - generated_at
        - timezone
        - totals
        - by_event_type
        - by_channel
        - by_source
        - by_user
        - by_account
        - by_template
        - template_metrics_basis
        - metrics
      properties:
        generated_at:
          type: string
          format: date-time
        timezone:
          type: string
        totals:
          $ref: '#/components/schemas/ActivitySummaryTotals'
        by_event_type:
          type: array
          items:
            $ref: '#/components/schemas/ActivityStringCount'
        by_channel:
          type: array
          items:
            $ref: '#/components/schemas/ActivityStringCount'
        by_source:
          type: array
          items:
            $ref: '#/components/schemas/ActivityStringCount'
        by_user:
          type: array
          items:
            $ref: '#/components/schemas/ActivityIdCount'
        by_account:
          type: array
          items:
            $ref: '#/components/schemas/ActivityIdCount'
        by_template:
          type: array
          description: >-
            Per-template conversion metrics derived from attributed activity
            facts.
          items:
            $ref: '#/components/schemas/ActivityTemplateMetrics'
        template_metrics_basis:
          type: string
          description: >-
            Run activation and single-reply attribution rule used for
            per-template rates.
        metrics:
          $ref: '#/components/schemas/ActivityDerivedMetrics'
    Error:
      type: object
      additionalProperties: false
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Machine-readable error code.
          enum:
            - unauthorized
            - forbidden
            - not_found
            - bad_request
            - internal_error
            - conflict
            - rate_limit_exceeded
            - account_shared_access_required
            - billing_payment_failed
            - billing_subscription_incomplete
            - billing_subscription_expired
            - billing_grace_period
            - billing_feature_not_available
            - billing_insufficient_credits
            - billing_invalid
            - upstream_error
        message:
          type: string
          description: Human-readable error message.
        debug:
          type: string
          description: Development-only debug details.
    ActivitySummaryTotals:
      type: object
      additionalProperties: false
      required:
        - events
        - unattributed_user_events
        - unattributed_account_events
      properties:
        events:
          type: integer
        unattributed_user_events:
          type: integer
        unattributed_account_events:
          type: integer
    ActivityStringCount:
      type: object
      additionalProperties: false
      required:
        - count
      properties:
        key:
          type: string
        count:
          type: integer
        missing:
          type: boolean
    ActivityIdCount:
      type: object
      additionalProperties: false
      required:
        - count
      properties:
        id:
          type: string
        count:
          type: integer
        unattributed:
          type: boolean
    ActivityTemplateMetrics:
      type: object
      additionalProperties: false
      required:
        - template_key
        - template_public_id
        - template_type
        - outreach_runs_started
        - outreach_runs_replied
        - reply_rate
        - connection_requests_sent
        - connection_requests_accepted
        - connection_request_acceptance_rate
      properties:
        template_key:
          type: string
          description: Stable opaque template identity including scope and ownership.
        template_public_id:
          type: string
        template_type:
          type: string
          enum:
            - normal
            - sequence
        outreach_runs_started:
          type: integer
          description: Distinct template runs activated after a delivered outbound action.
        outreach_runs_replied:
          type: integer
          description: Activated template runs credited with a reply.
        reply_rate:
          type: number
          format: double
          minimum: 0
          maximum: 1
          nullable: true
        connection_requests_sent:
          type: integer
        connection_requests_accepted:
          type: integer
        connection_request_acceptance_rate:
          type: number
          format: double
          minimum: 0
          maximum: 1
          nullable: true
    ActivityDerivedMetrics:
      type: object
      additionalProperties: false
      required:
        - contacts_contacted_outbound
        - contacts_replied_to_outbound
        - reply_rate
        - connection_requests_sent
        - connection_requests_accepted
        - connection_request_acceptance_rate
        - basis
      properties:
        contacts_contacted_outbound:
          type: integer
        contacts_replied_to_outbound:
          type: integer
        reply_rate:
          type: number
          format: double
          minimum: 0
          maximum: 1
          nullable: true
        connection_requests_sent:
          type: integer
        connection_requests_accepted:
          type: integer
        connection_request_acceptance_rate:
          type: number
          format: double
          minimum: 0
          maximum: 1
          nullable: true
        basis:
          type: string
          description: >-
            Explicit distinct-subject and numerator-intersection rule used for
            the rates.
  responses:
    BadRequest:
      description: Invalid request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: bad_request
            message: Invalid request parameters
    Unauthorized:
      description: Missing, malformed, invalid, or retired local API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missingAuthorization:
              value:
                code: unauthorized
                message: Authorization header is required
            invalidAuthorizationFormat:
              value:
                code: unauthorized
                message: Authorization header must use Bearer scheme
            invalidAPIKey:
              value:
                code: unauthorized
                message: Invalid API key
    ReportingForbidden:
      description: >-
        API access is not enabled for the organization, the API key cannot
        resolve to an active organization user, or the credential's user is not
        an organization admin.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            adminRequired:
              summary: Reporting requires an admin API-key principal
              value:
                code: forbidden
                message: Only organization admins can perform this action.
            forbidden:
              value:
                code: forbidden
                message: you don't have access to this organization
            featureUnavailable:
              value:
                code: billing_feature_not_available
                message: >-
                  Feature 'TalkToHumansAPI' is not available in your current
                  plan
            insufficientCredits:
              value:
                code: billing_insufficient_credits
                message: Insufficient credits
            apiKeyPrincipalInvalid:
              value:
                code: forbidden
                message: >-
                  This API key is no longer linked to an active organization
                  user. Ask an organization admin to regenerate it
    RateLimited:
      description: >-
        Rate limit exceeded. Public routes allow 50 requests per 10 seconds per
        IP and endpoint.
      headers:
        Retry-After:
          description: Seconds to wait before retrying the request.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: rate_limit_exceeded
            message: Rate limit exceeded
    InternalServerError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: internal_error
            message: An internal error occurred
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Pass API key as `Authorization: Bearer <api_key>`.'

````