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

# Retrieve analytics

> Requires full_access. Account and connection are derived from the key.



## OpenAPI

````yaml /openapi/mail.json get /analytics
openapi: 3.1.0
info:
  title: Webdock Mail API
  version: 1.0.0
  description: >-
    Transactional Mail. Accepted means provider acceptance, not delivery. JSON
    limit 4,000,000 bytes; text+HTML 512 KiB. Requests 120/minute/tenant.
    Unknown handoffs must never be resent with a new key. Webhooks: HMAC-SHA256
    over id.timestamp.rawBody, at-least-once.
servers:
  - url: https://api.webdock.dev/api/mail/v1
security: []
paths:
  /analytics:
    get:
      tags:
        - Analytics
      summary: Retrieve analytics
      description: Requires full_access. Account and connection are derived from the key.
      operationId: analytics_get
      parameters:
        - name: domain_id
          in: query
          schema:
            $ref: '#/components/schemas/ID'
        - name: include_simulated
          in: query
          schema:
            type: boolean
            default: false
        - name: days
          in: query
          schema:
            type: integer
            enum:
              - 7
              - 30
              - 90
            default: 30
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '428':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: >-
            Failed or uncertain handoff. Inspect email_id; never automatically
            resend.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - MailApiKey: []
components:
  schemas:
    ID:
      type: string
      pattern: ^[1-9][0-9]{0,18}$
    Error:
      type: object
      required:
        - statusCode
        - name
        - message
        - request_id
      properties:
        statusCode:
          type: integer
        name:
          type: string
        message:
          type: string
        request_id:
          type: string
        email_id:
          type: string
        id:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/SendResult'
        failed_index:
          type: integer
        failed_email_id:
          type:
            - string
            - 'null'
    SendResult:
      type: object
      required:
        - id
      properties:
        id:
          $ref: '#/components/schemas/ID'
  securitySchemes:
    MailApiKey:
      type: http
      scheme: bearer
      bearerFormat: wdm_…

````

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