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

# Aggregated events (count + revenue)



## OpenAPI

````yaml /api-reference/openapi.json get /v1/analytics/events/summary
openapi: 3.0.1
info:
  title: Scribe Public API
  version: v1
  description: >-
    REST API to manage email signatures, teammates, smart fields, and marketing
    campaigns in your Scribe workspace. Every request uses JSON and is
    authenticated with a workspace API key. Endpoints are versioned under `/v1`,
    for example `https://api.scribe-mail.com/v1/signatures`.
  contact:
    name: Scribe Support
    url: https://help.scribe-mail.com/en
servers:
  - url: https://api.scribe-mail.com
    description: Production
security: []
tags:
  - name: Signatures
    description: >-
      Create, update, publish, and install email signature templates, and
      control which teammates each signature is assigned to.
  - name: Teammates
    description: >-
      Manage the people whose signatures Scribe deploys, and set their smart
      field values.
  - name: Emails
    description: >-
      Manage teammate email addresses, including the aliases that receive a
      signature.
  - name: Smart fields
    description: >-
      Define the dynamic fields, such as job title, phone number, or calendar
      link, that populate signatures.
  - name: Folders
    description: Organize signature templates into folders.
  - name: Assets
    description: >-
      Upload and manage the images and files used across signatures and
      campaigns.
  - name: Marketing campaigns
    description: >-
      Schedule, pause, and resume the promotional banners shown in your team's
      signatures.
  - name: Integrations
    description: >-
      List the directory, HRIS, and email integrations connected to your
      workspace.
  - name: Integration entities
    description: >-
      List the org units and groups from your connected integrations, used to
      target signatures.
  - name: Financial documents
    description: List the invoices and financial documents for your workspace.
paths:
  /v1/analytics/events/summary:
    get:
      tags:
        - Events
      summary: Aggregated events (count + revenue)
      parameters:
        - name: granularity
          in: query
          required: false
          schema:
            type: string
            enum:
              - hour
              - day
              - week
              - month
        - name: group_by
          in: query
          required: false
          schema:
            type: string
            enum:
              - name
              - signature_template
              - marketing_campaign
              - teammate
              - anchor
              - country
              - currency
              - user
        - name: start_date
          in: query
          required: false
          schema:
            type: string
        - name: end_date
          in: query
          required: false
          schema:
            type: string
        - name: name
          in: query
          required: false
          schema:
            type: string
        - name: currency
          in: query
          required: false
          schema:
            type: string
        - name: order_by
          in: query
          required: false
          schema:
            type: string
            enum:
              - count
              - value
        - name: order
          in: query
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
        - name: limit
          in: query
          required: false
          schema:
            type: integer
        - name: page
          in: query
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: Breakdown by group_by (revenue by name)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/event_summary_breakdown_response'
      security:
        - ApiKey: []
components:
  schemas:
    event_summary_breakdown_response:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/event_summary_row'
        pagination:
          $ref: '#/components/schemas/offset_pagination'
      required:
        - data
        - pagination
      additionalProperties: false
    event_summary_row:
      type: object
      properties:
        id:
          type: string
          description: >-
            Dimension value: a UUID, or the raw string (event name, ISO country
            code, currency, or visitor distinct_id).
        label:
          type: string
          nullable: true
          description: >-
            Human label for the uuid dimensions (signature/campaign name,
            teammate email, link content); equals `id` otherwise.
        count:
          type: integer
        value:
          type: number
          description: Sum of event `value` for this dimension value.
      required:
        - id
        - label
        - count
        - value
      additionalProperties: false
    offset_pagination:
      type: object
      description: >-
        Offset (page/limit) pagination. The single pagination shape returned by
        every paginated list endpoint in the public API.
      properties:
        page:
          type: integer
        limit:
          type: integer
        total_count:
          type: integer
        total_pages:
          type: integer
        has_more:
          type: boolean
      required:
        - page
        - limit
        - total_count
        - total_pages
        - has_more
      additionalProperties: false
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer

````