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

# Get Sending Metrics

> Get account-level sending totals, quota usage, and optional monthly history. Requires API key with email:read permission.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/metrics/sending
openapi: 3.1.0
info:
  title: Migma.ai API (v1)
  description: >-
    API for managing brands, contacts, email generation, sending, and
    integrations.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.migma.ai
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Projects/Brands
    description: Manage projects (brands) and import from websites
  - name: Contacts
    description: Manage your contacts, segments, tags, and topics
  - name: Segments
    description: Create and manage dynamic contact segments
  - name: Tags
    description: Organize contacts with tags
  - name: Topics
    description: Manage subscription topics and preferences
  - name: Emails
    description: Generate, send, and export emails
  - name: Email Validation
    description: Validate email content for compatibility and deliverability
  - name: Email Previews
    description: Preview emails across devices and email clients
  - name: Domains
    description: Manage sending domains and verification
  - name: Webhooks
    description: Manage webhook endpoints for real-time event notifications
  - name: Events
    description: Record customer events and conversions
  - name: Integrations
    description: Third-party platform integrations
  - name: Campaigns
    description: Create, schedule, send, and manage email campaigns
  - name: Project Editing
    description: Edit project assets, logos, images, and knowledge base entries
paths:
  /v1/metrics/sending:
    get:
      tags:
        - Emails
      summary: Get Sending Metrics
      description: >-
        Get account-level sending totals, quota usage, and optional monthly
        history. Requires API key with email:read permission.
      operationId: GetSendingMetrics
      parameters:
        - name: months
          in: query
          description: >-
            Number of previous monthly periods to include in history. Omit to
            exclude history.
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 12
      responses:
        '200':
          description: Account sending metrics
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseSendingMetrics'
              example:
                success: true
                data:
                  period: 2026-07
                  monthly:
                    sent: 0
                    delivered: 0
                    bounced: 0
                    complained: 0
                  today:
                    sent: 0
                    reserved: 0
                    dailyLimit: 0
                    remainingToday: 0
                  monthlyLimit: 0
                  remainingMonth: 0
                  history:
                    - period: 2026-06
                      sent: 0
                      delivered: 0
                      bounced: 0
                      complained: 0
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    ApiResponseSendingMetrics:
      allOf:
        - $ref: '#/components/schemas/ApiResponse'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/SendingMetrics'
    ApiResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          nullable: true
        error:
          type: string
          nullable: true
      required:
        - success
    SendingMetrics:
      type: object
      properties:
        period:
          type: string
          pattern: ^\d{4}-(0[1-9]|1[0-2])$
          description: Current monthly period in YYYY-MM format.
        monthly:
          $ref: '#/components/schemas/SendingMetricsTotals'
        today:
          $ref: '#/components/schemas/SendingMetricsToday'
        monthlyLimit:
          type: integer
          minimum: 0
        remainingMonth:
          type: integer
          minimum: 0
        history:
          type: array
          description: >-
            Previous monthly periods. Returned only when the months query
            parameter is supplied.
          items:
            $ref: '#/components/schemas/SendingMetricsHistoryPeriod'
      required:
        - period
        - monthly
        - today
        - monthlyLimit
        - remainingMonth
    ApiError:
      type: object
      properties:
        success:
          type: boolean
          default: false
        error:
          type: string
        code:
          type: string
          description: >-
            Machine-readable error code (e.g., IDEMPOTENCY_CONFLICT,
            DOMAIN_CLAIMABLE).
        data:
          type: object
          description: >-
            Additional structured context for the error, such as the affected
            domain.
          additionalProperties: true
      required:
        - success
        - error
    SendingMetricsTotals:
      type: object
      properties:
        sent:
          type: integer
          minimum: 0
        delivered:
          type: integer
          minimum: 0
        bounced:
          type: integer
          minimum: 0
        complained:
          type: integer
          minimum: 0
      required:
        - sent
        - delivered
        - bounced
        - complained
    SendingMetricsToday:
      type: object
      properties:
        sent:
          type: integer
          minimum: 0
        reserved:
          type: integer
          minimum: 0
        dailyLimit:
          type: integer
          minimum: 0
        remainingToday:
          type: integer
          minimum: 0
      required:
        - sent
        - reserved
        - dailyLimit
        - remainingToday
    SendingMetricsHistoryPeriod:
      type: object
      properties:
        period:
          type: string
          pattern: ^\d{4}-(0[1-9]|1[0-2])$
          description: Monthly period in YYYY-MM format.
        sent:
          type: integer
          minimum: 0
        delivered:
          type: integer
          minimum: 0
        bounced:
          type: integer
          minimum: 0
        complained:
          type: integer
          minimum: 0
      required:
        - period
        - sent
        - delivered
        - bounced
        - complained
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Forbidden:
      description: Forbidden - Missing required permissions or access denied
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Use 'Authorization: Bearer YOUR_API_KEY' where
        YOUR_API_KEY is obtained from the Migma dashboard under Settings →
        Developers → API Keys.

````