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

# Get a report

> The Reports numbers for a range and grouping.



## OpenAPI

````yaml /api/openapi.json get /reports
openapi: 3.1.0
info:
  title: B2B Signals API
  version: '1.0'
  description: >-
    Add people, run campaigns and read results from your own tools. Every
    request needs your API key in the `X-API-Key` header.
servers:
  - url: https://api.b2bsignals.ai/api/v1
security:
  - apiKey: []
tags:
  - name: Add people
    description: >-
      Send people in from your own tools, one at a time or up to 100 per
      request.
  - name: People
    description: >-
      Read and change the people in your workspace. In API paths and fields, a
      person is a `lead`.
  - name: Notes and tasks
    description: Notes on a person, and follow-up tasks.
  - name: Lists
    description: >-
      Named groups of people you can add to a campaign. In API paths, a list is
      a `lead-list`.
  - name: Campaigns
    description: >-
      Read, start, pause and report on campaigns. In API paths and fields, a
      campaign is a `workflow`.
  - name: Campaign people
    description: >-
      One person's place in one campaign. In API paths and fields, that is a
      `workflow-run`.
  - name: Approvals
    description: Messages waiting for a yes or no before they go out.
  - name: Inbox
    description: Read conversations and keep them organized.
  - name: Do not contact
    description: People and companies that must never be contacted.
  - name: Senders
    description: >-
      The LinkedIn accounts that send for your workspace. In API paths, a sender
      is a `connected-account`.
  - name: Webhooks
    description: Send events to your own tools.
  - name: Integrations
    description: See which outside tools are connected, and send people to them.
  - name: Reports
    description: The numbers behind Reports, and exports.
  - name: Watchlists
    description: Read the companies and people you watch.
  - name: Search
    description: Search across people, campaigns, lists and watchlists.
paths:
  /reports:
    get:
      tags:
        - Reports
      summary: Get a report
      description: The Reports numbers for a range and grouping.
      operationId: get_reports
      parameters:
        - name: range
          in: query
          required: false
          schema:
            enum:
              - 7d
              - 30d
              - 90d
              - custom
            type: string
            default: 30d
          description: The period to report on. `custom` needs `from` and `to`.
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
        - name: to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
        - name: group_by
          in: query
          required: false
          schema:
            enum:
              - signal
              - source
              - campaign
              - sender
              - week
              - step
              - version
              - person
            type: string
            default: signal
          description: How to group the report's rows.
        - name: workflow_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
          description: Only this campaign.
        - name: sender_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
          description: Only this sender.
        - name: include
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          description: The request did not pass validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ReportResponse:
      properties:
        range:
          $ref: '#/components/schemas/ReportRange'
        group_by:
          type: string
          enum:
            - signal
            - source
            - campaign
            - sender
            - week
            - step
            - version
            - person
        workflow_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        workflow_name:
          anyOf:
            - type: string
            - type: 'null'
        insight:
          $ref: '#/components/schemas/ReportInsight'
        numbers:
          $ref: '#/components/schemas/ReportNumbers'
        rows:
          items:
            $ref: '#/components/schemas/ReportRow'
          type: array
        people:
          anyOf:
            - items:
                $ref: '#/components/schemas/ReportPersonRow'
              type: array
            - type: 'null'
        people_total:
          anyOf:
            - type: integer
            - type: 'null'
        funnel:
          $ref: '#/components/schemas/ReportFunnel'
        average_reply_rate:
          anyOf:
            - type: number
            - type: 'null'
        min_people_for_rate:
          type: integer
          default: 50
        mature_after_days:
          type: integer
          default: 7
        generated_at:
          type: string
          format: date-time
        workspace_name:
          anyOf:
            - type: string
            - type: 'null'
        group_by_options:
          items:
            $ref: '#/components/schemas/GroupByOption'
          type: array
        sender_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        sender_name:
          anyOf:
            - type: string
            - type: 'null'
        daily_sends:
          anyOf:
            - items:
                $ref: '#/components/schemas/TimeSeriesPoint'
              type: array
            - type: 'null'
      type: object
      required:
        - range
        - group_by
        - insight
        - numbers
        - funnel
        - generated_at
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    ReportRange:
      properties:
        key:
          type: string
          enum:
            - 7d
            - 30d
            - 90d
            - custom
        from_date:
          type: string
          format: date
        to_date:
          type: string
          format: date
        label:
          type: string
      type: object
      required:
        - key
        - from_date
        - to_date
        - label
    ReportInsight:
      properties:
        headline:
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
        focus_key:
          anyOf:
            - type: string
            - type: 'null'
        state:
          type: string
          enum:
            - empty
            - thin
            - normal
          default: normal
        action:
          anyOf:
            - $ref: '#/components/schemas/InsightAction'
            - type: 'null'
      type: object
      required:
        - headline
    ReportNumbers:
      properties:
        people_contacted:
          type: integer
          default: 0
        replied:
          type: integer
          default: 0
        meetings_booked:
          type: integer
          default: 0
      type: object
    ReportRow:
      properties:
        key:
          type: string
        label:
          type: string
        contacted:
          type: integer
        replied:
          type: integer
        reply_rate:
          anyOf:
            - type: number
            - type: 'null'
        interested_replies:
          type: integer
        meetings:
          type: integer
        comparison:
          type: string
          enum:
            - much_more
            - more
            - about_average
            - less
            - not_enough_data
        enough_data:
          type: boolean
        note:
          anyOf:
            - type: string
            - type: 'null'
        position:
          anyOf:
            - type: integer
            - type: 'null'
      type: object
      required:
        - key
        - label
        - contacted
        - replied
        - interested_replies
        - meetings
        - comparison
        - enough_data
    ReportPersonRow:
      properties:
        lead_id:
          type: string
          format: uuid
        run_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        name:
          type: string
        title:
          anyOf:
            - type: string
            - type: 'null'
        company:
          anyOf:
            - type: string
            - type: 'null'
        got_so_far:
          type: string
        what_happened:
          type: string
        outcome:
          type: string
          enum:
            - meeting
            - interested
            - replied
            - accepted
            - no_answer
        sender:
          anyOf:
            - type: string
            - type: 'null'
        last_touch:
          anyOf:
            - type: string
              format: date
            - type: 'null'
        first_contacted:
          type: string
          format: date
      type: object
      required:
        - lead_id
        - name
        - got_so_far
        - what_happened
        - outcome
        - first_contacted
    ReportFunnel:
      properties:
        caption:
          type: string
        steps:
          items:
            $ref: '#/components/schemas/FunnelStep'
          type: array
      type: object
      required:
        - caption
        - steps
    GroupByOption:
      properties:
        key:
          type: string
          enum:
            - signal
            - source
            - campaign
            - sender
            - week
            - step
            - version
            - person
        label:
          type: string
        needs_campaign:
          type: boolean
          default: false
        shareable:
          type: boolean
          default: true
      type: object
      required:
        - key
        - label
    TimeSeriesPoint:
      properties:
        date:
          type: string
        connections_sent:
          type: integer
          default: 0
        connections_accepted:
          type: integer
          default: 0
        messages_sent:
          type: integer
          default: 0
        message_replies:
          type: integer
          default: 0
      type: object
      required:
        - date
    Error:
      type: object
      required:
        - detail
      properties:
        detail:
          description: A message, or an object with a `code` and a `message`.
          anyOf:
            - type: string
            - type: object
              properties:
                code:
                  type: string
                message:
                  type: string
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
    InsightAction:
      properties:
        label:
          type: string
        target:
          type: string
          enum:
            - sources
            - campaigns
            - senders
      type: object
      required:
        - label
        - target
    FunnelStep:
      properties:
        key:
          type: string
          enum:
            - contacted
            - accepted
            - replied
            - interested
            - meeting
        label:
          type: string
        count:
          type: integer
        pct_of_contacted:
          anyOf:
            - type: number
            - type: 'null'
      type: object
      required:
        - key
        - label
        - count
  responses:
    Unauthorized:
      description: The key is missing or not valid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        The key cannot do this, or your plan does not include it. `detail` says
        which.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your workspace's API key. It starts with `b2b_sk_`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.