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

# Get Tenant Stats

> How the emails of one restaurant performed

Guide: [Statistics widget](https://docs.minimo.it/embedded/widget-statistics.md). Errors: [Errors and limits](https://docs.minimo.it/embedded/errors.md).


## OpenAPI

````yaml get /public/v1/tenants/{tenant}/stats
openapi: 3.1.0
info:
  title: API Documentation
  description: Documentation for transactional and subscribe APIs
  version: 1.0.0
servers:
  - url: https://app.minimo.it
security:
  - bearerAuth: []
paths:
  /public/v1/tenants/{tenant}/stats:
    servers:
      - url: https://api.minimo.it
    get:
      summary: Get tenant stats
      description: >-
        How the restaurant's emails performed: totals, automatic messages and
        campaigns apart, a trend, the top 5 emails and the sending status. The
        same numbers as the [Statistics widget](/embedded/widget-statistics).
        Updated at most every 3 minutes.


        Opens are inflated by Apple Mail privacy protection.
      operationId: getTenantStats
      parameters:
        - name: tenant
          in: path
          required: true
          description: >-
            Your reference for the customer (for example the restaurant id). 1
            to 64 letters, digits, `.` `_` `:` `-`.
          schema:
            type: string
            example: restaurant_4812
        - name: period
          in: query
          required: false
          description: Default `30d`.
          schema:
            type: string
            enum:
              - 7d
              - 30d
              - 90d
        - name: tz
          in: query
          required: false
          description: Time zone of the days, for example `Europe/Rome`. Default UTC.
          schema:
            type: string
      responses:
        '200':
          description: The statistics
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/TenantStats'
              example:
                data:
                  tenant: restaurant_4812
                  period:
                    days: 7
                    from: '2026-11-09T00:00:00.000Z'
                    to: '2026-11-15T17:32:18.799Z'
                    timeZone: UTC
                    bucket: day
                  totals:
                    sent: 18
                    delivered: 18
                    opened: 4
                    clicked: 0
                    hardBounced: 0
                    softBounced: 0
                    blocked: 0
                    complaints: 0
                    unsubscribed: 0
                    notSent: 0
                    rates:
                      delivered: 100
                      opened: 22.2
                      clicked: 0
                      bounced: 0
                      complaints: 0
                      unsubscribed: 0
                  automatic:
                    sent: 15
                    delivered: 15
                    opened: 4
                    clicked: 0
                    hardBounced: 0
                    softBounced: 0
                    blocked: 0
                    complaints: 0
                    unsubscribed: 0
                    notSent: 0
                    rates:
                      delivered: 100
                      opened: 26.7
                      clicked: 0
                      bounced: 0
                      complaints: 0
                      unsubscribed: 0
                  campaigns:
                    sent: 3
                    delivered: 3
                    opened: 0
                    clicked: 0
                    hardBounced: 0
                    softBounced: 0
                    blocked: 0
                    complaints: 0
                    unsubscribed: 0
                    notSent: 0
                    rates:
                      delivered: 100
                      opened: 0
                      clicked: 0
                      bounced: 0
                      complaints: 0
                      unsubscribed: 0
                  trend:
                    - date: '2026-11-14'
                      sent: 3
                      opened: 1
                      clicked: 0
                    - date: '2026-11-15'
                      sent: 2
                      opened: 0
                      clicked: 0
                  top:
                    - templateId: 1201
                      name: Booking confirmation
                      kind: automatic
                      sent: 9
                      delivered: 9
                      opened: 3
                      clicked: 0
                      hardBounced: 0
                      softBounced: 0
                      blocked: 0
                      complaints: 0
                      unsubscribed: 0
                      notSent: 0
                      rates:
                        delivered: 100
                        opened: 33.3
                        clicked: 0
                        bounced: 0
                        complaints: 0
                        unsubscribed: 0
                  status:
                    state: limited
                    dailyCap: 1000
                    usedToday: 0
                    remainingToday: 1000
                  generatedAt: '2026-11-15T17:32:19.016Z'
        '401':
          description: >-
            `INVALID_TOKEN`: missing or wrong key, or a key without the
            **Widgets** or **Events** permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: '`INVALID_TENANT`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - bearerAuth: []
      x-codeSamples:
        - label: cURL
          lang: bash
          source: |-
            curl --request GET \
              --url 'https://api.minimo.it/public/v1/tenants/restaurant_4812/stats?period=7d&tz=Europe/Rome' \
              --header 'Authorization: Bearer YOUR_MINIMO_KEY'
        - lang: JavaScript
          source: >-
            const res = await
            fetch('https://api.minimo.it/public/v1/tenants/restaurant_4812/stats?period=7d&tz=Europe/Rome',
            {
              method: 'GET',
              headers: {
                Authorization: 'Bearer YOUR_MINIMO_KEY',
              },
            });

            const { data } = await res.json();

            console.log(data);
        - lang: Python
          source: |-
            import requests

            res = requests.get(
                'https://api.minimo.it/public/v1/tenants/restaurant_4812/stats?period=7d&tz=Europe/Rome',
                headers={'Authorization': 'Bearer YOUR_MINIMO_KEY'},
            )
            print(res.status_code, res.text)
components:
  schemas:
    TenantStats:
      type: object
      properties:
        tenant:
          type: string
          example: restaurant_4812
        period:
          type: object
          properties:
            days:
              type: integer
              example: 30
            from:
              type: string
              format: date-time
            to:
              type: string
              format: date-time
            timeZone:
              type: string
              example: Europe/Rome
            bucket:
              type: string
              enum:
                - day
                - week
        totals:
          type: object
          properties:
            sent:
              type: integer
            delivered:
              type: integer
            opened:
              type: integer
            clicked:
              type: integer
            hardBounced:
              type: integer
            softBounced:
              type: integer
            blocked:
              type: integer
            complaints:
              type: integer
            unsubscribed:
              type: integer
            notSent:
              type: integer
            rates:
              type: object
              properties:
                delivered:
                  type: number
                  nullable: true
                opened:
                  type: number
                  nullable: true
                clicked:
                  type: number
                  nullable: true
                bounced:
                  type: number
                  nullable: true
                complaints:
                  type: number
                  nullable: true
                unsubscribed:
                  type: number
                  nullable: true
              description: Percentages with one decimal. `null` when nothing was sent.
        automatic:
          type: object
          properties:
            sent:
              type: integer
            delivered:
              type: integer
            opened:
              type: integer
            clicked:
              type: integer
            hardBounced:
              type: integer
            softBounced:
              type: integer
            blocked:
              type: integer
            complaints:
              type: integer
            unsubscribed:
              type: integer
            notSent:
              type: integer
            rates:
              type: object
              properties:
                delivered:
                  type: number
                  nullable: true
                opened:
                  type: number
                  nullable: true
                clicked:
                  type: number
                  nullable: true
                bounced:
                  type: number
                  nullable: true
                complaints:
                  type: number
                  nullable: true
                unsubscribed:
                  type: number
                  nullable: true
              description: Percentages with one decimal. `null` when nothing was sent.
          description: Automatic messages only.
        campaigns:
          type: object
          properties:
            sent:
              type: integer
            delivered:
              type: integer
            opened:
              type: integer
            clicked:
              type: integer
            hardBounced:
              type: integer
            softBounced:
              type: integer
            blocked:
              type: integer
            complaints:
              type: integer
            unsubscribed:
              type: integer
            notSent:
              type: integer
            rates:
              type: object
              properties:
                delivered:
                  type: number
                  nullable: true
                opened:
                  type: number
                  nullable: true
                clicked:
                  type: number
                  nullable: true
                bounced:
                  type: number
                  nullable: true
                complaints:
                  type: number
                  nullable: true
                unsubscribed:
                  type: number
                  nullable: true
              description: Percentages with one decimal. `null` when nothing was sent.
          description: Campaigns only.
        trend:
          type: array
          items:
            type: object
            properties:
              date:
                type: string
                example: '2026-11-15'
              sent:
                type: integer
              opened:
                type: integer
              clicked:
                type: integer
          description: One item per day (per week for `90d`).
        top:
          type: array
          items:
            type: object
            properties:
              templateId:
                type: integer
              name:
                type: string
              kind:
                type: string
                enum:
                  - automatic
                  - campaign
              sent:
                type: integer
              delivered:
                type: integer
              opened:
                type: integer
              clicked:
                type: integer
              hardBounced:
                type: integer
              softBounced:
                type: integer
              blocked:
                type: integer
              complaints:
                type: integer
              unsubscribed:
                type: integer
              notSent:
                type: integer
              rates:
                type: object
                properties:
                  delivered:
                    type: number
                    nullable: true
                  opened:
                    type: number
                    nullable: true
                  clicked:
                    type: number
                    nullable: true
                  bounced:
                    type: number
                    nullable: true
                  complaints:
                    type: number
                    nullable: true
                  unsubscribed:
                    type: number
                    nullable: true
                description: Percentages with one decimal. `null` when nothing was sent.
          description: The 5 emails sent most.
        status:
          type: object
          properties:
            state:
              type: string
              enum:
                - ok
                - limited
                - paused
            dailyCap:
              type: integer
              nullable: true
            usedToday:
              type: integer
              nullable: true
            remainingToday:
              type: integer
              nullable: true
          description: >-
            Sending status: `limited` = a new restaurant with a daily marketing
            limit, `paused` = marketing on hold.
        generatedAt:
          type: string
          format: date-time
    ApiError:
      type: object
      properties:
        status:
          type: string
          example: FAIL
        message:
          type: string
          description: The error code to test in your code.
          example: INVALID_PARAMETERS
        userMessage:
          type: string
          description: >-
            When present, a sentence that says what to fix. You can show or log
            it.
          example: Set the origins allowed to embed the widgets first.
      description: >-
        Every error has this shape. See [Errors and limits](/embedded/errors)
        for every code.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: mn-API_CLIENT_ID-API_KEY

````

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