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

# Get email usage

> **Plans:** `Free` · `Developer` · `Enterprise`

Returns outbound email send usage (recipient counts) for the workspace subscription period — distinct from API credits. Field is `quota` (not `limit`). Includes per-mailbox breakdown and `legacy_sent_count` for pre-ledger sends. Requires workspace membership.

**API credits:** 1 (read).



## OpenAPI

````yaml /openapi/openapi.json get /api/v1/workspaces/{workspaceId}/usage/email
openapi: 3.1.0
info:
  title: Mermail API
  version: 1.0.0
  description: >
    Programmatic Mermail API for scripts, agents, and integrations.


    ## Authentication


    Authorize with an API key from **Settings → API Keys**:


    ```

    x-api-key: sk-proj-…

    ```


    ## Plans


    Each endpoint page shows plan badges (**Public**, **All plans**, or
    **Developer+**). Free can call the core catalog; Developer-gated paths need
    Developer or Enterprise.


    ## Try it


    Every endpoint page includes an interactive playground. Click **Try it**,
    paste your API key into the `x-api-key` field, fill path/query/body fields
    (prefilled from examples), and send a live request to
    `https://console.mermail.app`. You can also copy the generated cURL /
    JavaScript / Python snippet.


    ## Credits


    | Class | Cost |

    | --- | ---: |

    | read | 1 |

    | write | 2 |

    | email_send | 5 |

    | provision | 10 |

    | ai_light | 15 |

    | ai_heavy | 25 |
  contact:
    name: Mermail
    email: contact@mermail.app
    url: https://mermail.app
servers:
  - url: https://console.mermail.app
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Public
    description: No authentication
  - name: Usage
    description: Credits and email quotas
  - name: Workspaces
    description: Workspaces, members, storage
  - name: Domains
    description: Custom email domains (Developer+)
  - name: Mailboxes
    description: Agent inboxes
  - name: Emails
    description: Send, list, search, folders
  - name: AI agent
    description: Mailbox agent chat
  - name: Task triage
    description: Task triagers (all plans)
  - name: RAG
    description: Knowledge documents and recall
  - name: Integrations
    description: Composio, Telegram, push
  - name: Affiliate
    description: Affiliate program
paths:
  /api/v1/workspaces/{workspaceId}/usage/email:
    get:
      tags:
        - Usage
      summary: Get email usage
      description: >-
        **Plans:** `Free` · `Developer` · `Enterprise`


        Returns outbound email send usage (recipient counts) for the workspace
        subscription period — distinct from API credits. Field is `quota` (not
        `limit`). Includes per-mailbox breakdown and `legacy_sent_count` for
        pre-ledger sends. Requires workspace membership.


        **API credits:** 1 (read).
      parameters:
        - name: workspaceId
          in: path
          required: true
          description: Workspace id
          schema:
            type: string
          example: ws_01abc
      responses:
        '200':
          description: Email send usage for the current period
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailUsage'
              example:
                workspace_id: ws_01abc
                plan: developer
                plan_name: Developer
                period_start: '2026-07-01T00:00:00.000Z'
                period_end: '2026-08-01T00:00:00.000Z'
                quota: 10000
                used: 320
                remaining: 9680
                legacy_sent_count: 12
                mailboxes:
                  - id: support@mail.acme.com
                    name: Acme Support
                    email: support@mail.acme.com
                    sent: 200
                    providers:
                      cloudflare_email: 180
                      legacy: 20
                  - id: ops@mail.acme.com
                    name: Acme Ops
                    email: ops@mail.acme.com
                    sent: 120
                    providers:
                      resend: 120
        '401':
          description: Missing, invalid, expired, or revoked API key / token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Unauthorized
        '402':
          description: API credits exhausted for this workspace period
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Invalid request
        '403':
          description: Forbidden — plan gate, wrong workspace, or missing role
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Forbidden
        '429':
          description: Rate limit exceeded (workspace RPM or email send limits)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Too many requests
          headers:
            Retry-After:
              schema:
                type: integer
              description: Seconds until the rate limit window resets
      security:
        - apiKeyAuth: []
components:
  schemas:
    EmailUsage:
      type: object
      properties:
        workspace_id:
          type: string
        plan:
          type: string
        plan_name:
          type: string
        period_start:
          type: string
          format: date-time
        period_end:
          type: string
          format: date-time
        quota:
          type: number
          nullable: true
          description: Plan email send quota (recipient count); null if unlimited
        used:
          type: number
        remaining:
          type: number
          nullable: true
        legacy_sent_count:
          type: number
          description: Pre-ledger sent recipients included in `used`
        mailboxes:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              email:
                type: string
              sent:
                type: number
              providers:
                type: object
                additionalProperties:
                  type: number
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: Unauthorized
        code:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key (`sk-proj-…`) from Settings → API Keys. Required for sold API
        calls outside the Mermail console.

````