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

# List email unit ledger entries

> Every movement on the credit balance — plan allowances, usage, purchases and staff adjustments — newest first. Each entry carries `quantity` (negative when units were spent), `balanceAfter`, `source`, `reference` and `reason`. The same history is on the dashboard under Credit history. Requires `units:read`. Pagination fields use pageSize, totalItems, totalPages, and optional hasNext/hasPrev.



## OpenAPI

````yaml /customer-openapi.json get /units/ledger
openapi: 3.1.0
info:
  title: WazobiaMail API
  version: 1.0.0
  description: >-
    Customer-facing WazobiaMail API. Base URL
    https://app.wazobiamail.com/api/v1. Every response uses the {success,
    message, data} envelope. This specification covers the integration API:
    API-key and public operations. Sign-in, registration, password reset and
    account settings are supported in the app and are not listed here, although
    a dashboard key can call the account operations. The dashboard key carries
    wildcard permissions; the scoped sending key documented below can only send.
    Customer responses omit internal email providers, tenant/queue routing, raw
    upstream payloads and stored service credentials. See /guides/api-responses
    for the response contract and migration guidance. Download the OpenAPI
    specification at https://wazobiamail.com/openapi.json. API-owned JSON
    response field names use camelCase, including pagination; user-defined data
    and third-party protocol payloads retain their own keys.
  contact:
    name: WazobiaMail Support
    url: https://wazobiamail.com/contact
servers:
  - url: https://app.wazobiamail.com/api/v1
security:
  - apiKey: []
tags:
  - name: Account
    description: >-
      Profile, password, two-factor, notifications and account data. Account
      status, plan, units and health.
  - name: Sending
    description: Sending API keys, messages, domains, SMTP access and engagement.
  - name: Mailboxes
    description: Hosted mailboxes and their credentials.
  - name: Relays
    description: Customer SMTP relay configurations.
  - name: Billing
    description: Plans, subscriptions, invoices, payments and email credits.
  - name: Plans
    description: >-
      Plan catalogue entitlements and the effective limits of the current
      account's plan.
  - name: Support
    description: Support tickets.
paths:
  /units/ledger:
    get:
      tags:
        - Billing
      summary: List email unit ledger entries
      description: >-
        Every movement on the credit balance — plan allowances, usage, purchases
        and staff adjustments — newest first. Each entry carries `quantity`
        (negative when units were spent), `balanceAfter`, `source`, `reference`
        and `reason`. The same history is on the dashboard under Credit history.
        Requires `units:read`. Pagination fields use pageSize, totalItems,
        totalPages, and optional hasNext/hasPrev.
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            example: 1
          description: Page number, starting at 1.
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            example: 50
          description: Entries per page, 1 to 100.
        - name: status
          in: query
          required: false
          schema:
            type: string
            example: purchase
          description: >-
            Only entries from this source, such as `purchase`, `usage` or
            `plan`.
        - name: search
          in: query
          required: false
          schema:
            type: string
            example: inv_01HZY8QK3M7P2R4T6V8X0
          description: Match the reference or the account email.
      responses:
        '200':
          description: One page of ledger entries with pagination totals.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Envelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/LedgerPage'
        '401':
          description: Authentication required.
      security:
        - apiKey: []
components:
  schemas:
    Envelope:
      type: object
      required:
        - success
        - message
        - data
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Done
        data:
          description: Payload; shape depends on the endpoint.
    LedgerPage:
      type: object
      required:
        - items
        - pagination
      properties:
        items:
          type: array
          items:
            type: object
            additionalProperties: true
        pagination:
          $ref: '#/components/schemas/Pagination'
    Pagination:
      type: object
      required:
        - page
        - pageSize
        - totalItems
        - totalPages
      properties:
        page:
          type: integer
          minimum: 1
          example: 1
        pageSize:
          type: integer
          minimum: 0
          example: 25
        totalItems:
          type: integer
          minimum: 0
          example: 1
        totalPages:
          type: integer
          minimum: 0
          example: 1
        hasNext:
          type: boolean
          description: Present on endpoints that report navigation flags.
          example: false
        hasPrev:
          type: boolean
          description: Present on endpoints that report navigation flags.
          example: false
      description: >-
        Pagination field names are camelCase. Optional navigation flags are not
        provided by every list endpoint.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Dashboard API key created at
        https://app.wazobiamail.com/dashboard/smtp-api. Send operations also
        accept a narrower sending key created through POST /sending/api-keys;
        every other operation needs the dashboard key.
      x-default: YOUR_API_KEY

````

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