sendmux-ai Billing API

The Billing API from sendmux-ai — 3 operation(s) for billing.

Operations 3

GET /billing/balance Get current balance #
GET /billing/summary Get spend summary #
GET /billing/transactions List transactions #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sendmux-ai:sendmux-ai-billing-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sendmux-ai-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: Programmatic access to your Sendmux email infrastructure.
  title: Sendmux Billing API
  version: 1.0.0
servers:
- description: API v1
  url: https://app.sendmux.ai/api/v1
security:
- bearerAuth: []
- oauth2: []
tags:
- name: Billing
paths:
  /billing/balance:
    get:
      description: Returns the current spendable balance.
      operationId: managementListBalance
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalanceResponse'
          description: Current spendable balance
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Authentication required
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Insufficient permissions
      security:
      - bearerAuth: []
      - oauth2:
        - billing.read
      summary: Get current balance
      tags:
      - Billing
  /billing/summary:
    get:
      description: Returns a spend summary over a configurable lookback period.
      operationId: managementGetSpendSummary
      parameters:
      - in: query
        name: days
        required: false
        schema:
          description: 'Lookback period in days (default: 30)'
          enum:
          - '7'
          - '30'
          - '90'
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpendSummaryResponse'
          description: Spend summary
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Authentication required
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Insufficient permissions
      security:
      - bearerAuth: []
      - oauth2:
        - billing.read
      summary: Get spend summary
      tags:
      - Billing
  /billing/transactions:
    get:
      description: Returns paginated credit transaction history with optional type filter. Uses cursor-based pagination ordered by created_at descending — pass `cursor=` from the previous response to fetch the next page.
      operationId: managementListTransactions
      parameters:
      - in: query
        name: cursor
        required: false
        schema:
          description: Pagination cursor — the `next_cursor` from the previous response.
          type: string
      - in: query
        name: limit
        required: false
        schema:
          description: Max results (default 25, max 100)
          maximum: 100
          minimum: 1
          type: integer
      - in: query
        name: type
        required: false
        schema:
          enum:
          - PURCHASE
          - USAGE
          - AUTO_TOPUP
          - REFUND
          - ADJUSTMENT
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionCursorListResponse'
          description: Transaction list
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Authentication required
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Insufficient permissions
      security:
      - bearerAuth: []
      - oauth2:
        - billing.read
      summary: List transactions
      tags:
      - Billing
components:
  schemas:
    SpendSummary:
      additionalProperties: false
      properties:
        currency:
          enum:
          - USD
          type: string
        period_days:
          example: 30
          type: number
        total_consumed:
          example: '54.770000'
          type: string
        total_purchased:
          example: '150.000000'
          type: string
        transaction_count:
          example: 23
          type: number
      required:
      - period_days
      - total_purchased
      - total_consumed
      - transaction_count
      - currency
      type: object
    ResponseMeta:
      additionalProperties: false
      properties:
        request_id:
          example: req_clxxxxxxxxxxxxxxxxxxxxxxxxx
          type: string
      required:
      - request_id
      type: object
    ApiError:
      additionalProperties: false
      properties:
        error:
          additionalProperties: false
          properties:
            code:
              description: Machine-readable error code
              enum:
              - invalid_parameter
              - missing_parameter
              - authentication_required
              - insufficient_permissions
              - not_found
              - conflict
              - limit_exceeded
              - idempotency_conflict
              - payload_too_large
              - validation_error
              - rate_limit_exceeded
              - service_unavailable
              - internal_error
              example: invalid_parameter
              type: string
            doc_url:
              description: Link to relevant documentation
              type: string
            errors:
              description: Accumulated per-field issues for validation errors. Only present on 400/422 responses.
              items:
                $ref: '#/components/schemas/ApiErrorDetail'
              type: array
            message:
              description: Human-readable error description
              type: string
            param:
              description: The parameter that caused the error
              type: string
            retryable:
              description: Whether the caller may safely retry this request. 4xx are typically false (except 429); 5xx are typically true.
              example: false
              type: boolean
          required:
          - code
          - message
          - retryable
          type: object
        meta:
          additionalProperties: false
          properties:
            request_id:
              example: req_clxxxxxxxxxxxxxxxxxxxxxxxxx
              type: string
          required:
          - request_id
          type: object
        ok:
          enum:
          - false
          type: boolean
      required:
      - ok
      - error
      - meta
      type: object
    SuccessEnvelope:
      properties:
        meta:
          additionalProperties: {}
          properties: {}
          type: object
        ok:
          enum:
          - true
          type: boolean
      required:
      - ok
      - meta
      type: object
    ApiErrorDetail:
      additionalProperties: false
      properties:
        code:
          description: Machine-readable issue code from the validator (e.g. zod issue code).
          example: invalid_string
          type: string
        field:
          description: Dot-path of the offending request field.
          example: recipient.email
          type: string
        message:
          description: Human-readable issue description.
          type: string
      required:
      - field
      - code
      - message
      type: object
    SpendSummaryResponse:
      allOf:
      - $ref: '#/components/schemas/SuccessEnvelope'
      - properties:
          data:
            $ref: '#/components/schemas/SpendSummary'
          meta:
            $ref: '#/components/schemas/ResponseMeta'
        required:
        - data
        type: object
      unevaluatedProperties: false
    Transaction:
      additionalProperties: false
      properties:
        amount:
          description: DECIMAL(19,6) amount
          example: '-0.001500'
          type: string
        balance_after:
          type:
          - string
          - 'null'
        balance_before:
          type:
          - string
          - 'null'
        created_at:
          description: ISO 8601 timestamp
          type: string
        description:
          type: string
        id:
          description: Transaction public ID
          example: tx_clxxxxxxxxxxxxxxxxxxxxxxxxx
          type: string
        quantity:
          description: Item count (for USAGE transactions)
          type:
          - number
          - 'null'
        type:
          enum:
          - PURCHASE
          - USAGE
          - AUTO_TOPUP
          - REFUND
          - ADJUSTMENT
          type: string
      required:
      - id
      - amount
      - type
      - description
      - quantity
      - balance_before
      - balance_after
      - created_at
      type: object
    BalanceResponse:
      allOf:
      - $ref: '#/components/schemas/SuccessEnvelope'
      - properties:
          data:
            $ref: '#/components/schemas/Balance'
          meta:
            $ref: '#/components/schemas/ResponseMeta'
        required:
        - data
        type: object
      unevaluatedProperties: false
    CursorPagination:
      additionalProperties: false
      properties:
        has_more:
          type: boolean
        next_cursor:
          type: string
      required:
      - has_more
      type: object
    TransactionCursorListResponse:
      allOf:
      - $ref: '#/components/schemas/SuccessEnvelope'
      - properties:
          data:
            items:
              $ref: '#/components/schemas/Transaction'
            type: array
          meta:
            $ref: '#/components/schemas/ResponseMeta'
          pagination:
            $ref: '#/components/schemas/CursorPagination'
        required:
        - data
        - pagination
        type: object
      unevaluatedProperties: false
    Balance:
      additionalProperties: false
      properties:
        auto_topup:
          additionalProperties: false
          properties:
            amount:
              example: '50.000000'
              type:
              - string
              - 'null'
            enabled:
              type: boolean
            monthly_limit:
              example: '200.000000'
              type:
              - string
              - 'null'
            monthly_used:
              example: '50.000000'
              type: string
            threshold:
              example: '10.000000'
              type:
              - string
              - 'null'
          required:
          - enabled
          - threshold
          - amount
          - monthly_limit
          - monthly_used
          type: object
        balance:
          description: Current spendable balance
          example: '45.230000'
          type: string
        balance_consumed:
          example: '54.770000'
          type: string
        balance_purchased:
          example: '100.000000'
          type: string
        currency:
          enum:
          - USD
          type: string
      required:
      - balance
      - balance_purchased
      - balance_consumed
      - currency
      - auto_topup
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: API Key
      description: Sendmux API key. Use a root API key for Management API routes, or a mailbox credential for Mailbox API routes. Obtain keys from the dashboard under API Keys.
      scheme: bearer
      type: http
    oauth2:
      description: Use the authorisation-code flow with S256 PKCE and resource=https://sendmux.ai/api. The user selects the team, API access and mailboxes during consent. OAuth access tokens authenticate HTTP API requests; use separate credentials for SMTP and IMAP.
      flows:
        authorizationCode:
          authorizationUrl: https://app.sendmux.ai/oauth/authorize
          refreshUrl: https://app.sendmux.ai/oauth/token
          scopes:
            analytics.*: All analytics operations
            analytics.read: View key usage analytics and verification logs
            billing.*: All billing operations
            billing.auto_topup: Configure auto top-up settings
            billing.read: View balance, transactions, invoices
            billing.topup: Purchase balance top-ups
            calendar.read: Read calendars and events in this mailbox
            calendar.write: Create calendars and create, edit and delete events in this mailbox
            domain.*: All domain operations
            domain.create: Add sending domains
            domain.delete: Remove domains
            domain.read: List/view domains and DNS status
            domain.verify: Trigger domain verification
            email.receive: Authorise email reception
            email.send: Send email through the HTTP API
            key.*: All key management operations
            key.create: Create new API keys (both root and mailbox)
            key.read: List/view API keys and their metadata
            key.revoke: Revoke API keys
            key.rotate: Rotate API keys
            logs.*: All log operations
            logs.read: View delivery logs
            mailbox.admin.*: All mailbox admin operations
            mailbox.admin.create: Create mailboxes (admin-level)
            mailbox.admin.delete: Delete mailboxes (admin-level)
            mailbox.admin.manage: Manage all mailbox settings
            mailbox.admin.read: List/view mailboxes (admin-level)
            mailbox.drafts.write: Create and edit saved mailbox drafts
            mailbox.read: Read mailbox contents (folders, messages)
            mailbox.settings.update: Update own mailbox settings (signature, auto-reply)
            provider.*: All provider operations
            provider.create: Add email provider accounts (Google, Microsoft, SMTP)
            provider.delete: Remove provider accounts
            provider.read: List/view provider accounts and connection status
            provider.update: Update provider settings, refresh tokens
            routing.*: All routing operations
            routing.create: Create delivery groups
            routing.delete: Remove delivery groups
            routing.read: List/view delivery groups and routing rules
            routing.update: Update delivery group configuration
            team.*: All team operations
            team.members.invite: Invite team members
            team.members.remove: Remove team members
            team.members.roles: Change member roles
            team.read: View team settings and members
            team.update: Update team settings
            webhook.*: All webhook operations
            webhook.create: Create webhook subscriptions
            webhook.delete: Delete webhook subscriptions
            webhook.manage: Rotate signing secret + send test events
            webhook.read: List/view webhook subscriptions
            webhook.update: Update webhook URL, event types, enabled flag
          tokenUrl: https://app.sendmux.ai/oauth/token
      type: oauth2