SendGuard Billing API

The Billing API from SendGuard — 5 operation(s) for billing.

GitHub OpenAPI

Operations 5

GET /v1/billing/catalog List plans and top-up packages #
GET /v1/billing/account Get plan, balance and auto-recharge settings #
POST /v1/billing/topups/auto-recharge Charge the saved card for the owner-configured auto-recharge package #
POST /v1/billing/topups/x402/{package_id} Buy a top-up package with an x402 USDC payment #

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/sendguard-ai:sendguard-ai-billing-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

sendguard-ai-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SendGuard Billing API
  version: '2026-11-14'
  description: 'SendGuard is the pre-send decision layer for AI agents. Its hosted Email Preflight API returns allow, delay, requires_approval or block with reasons. Call POST /v1/preflight/email before each send; your existing sender or workflow must enforce the decision. Send only on allow; hold requires_approval for human review, retry delay after delay_seconds, and do not send on block. SendGuard never sends email. Guardrails for customer-operated or self-hosted email workflows are one use case; the SendGuard API is hosted.


    Email preflight uses non-SMTP recipient signals, sender checks, pattern-based content checks and outbound policy. It does not fact-check content or guarantee delivery. A completed authenticated preflight uses one credit, including when recipient signals are cached or the recipient status is unknown. The separate Email Validation API has different charging rules; consult response billing fields.


    Agents without an API key can request one with the device flow (POST /v1/agent/signup, then poll POST /v1/agent/token) after a human approves it.'
  contact:
    email: support@sendguard.ai
    url: https://sendguard.ai/docs/
servers:
- url: https://api.sendguard.ai
security:
- bearerAuth: []
tags:
- name: Billing
paths:
  /v1/billing/catalog:
    get:
      tags:
      - Billing
      operationId: getPricing
      summary: List plans and top-up packages
      responses:
        '200':
          description: Catalog
          content:
            application/json:
              schema:
                type: object
                properties:
                  plans:
                    type: array
                    items:
                      type: object
                  top_ups:
                    type: array
                    items:
                      $ref: '#/components/schemas/TopUpPackage'
        '401':
          description: Missing or invalid API key. Body includes next_action=start_agent_signup.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: insufficient_scope (body names required_scope).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/billing/account:
    get:
      tags:
      - Billing
      operationId: getAccount
      summary: Get plan, balance and auto-recharge settings
      responses:
        '200':
          description: Account
          content:
            application/json:
              schema:
                type: object
                properties:
                  plan:
                    type: string
                  plan_name:
                    type: string
                  credit_balance:
                    type: integer
                  top_up_credit_balance:
                    type: integer
                  free_credits_remaining:
                    type: integer
                  subscription_credits_remaining:
                    type: integer
                  monthly_credits_included:
                    type: integer
                  monthly_credits_reset_at:
                    type: string
                    format: date-time
                  total_balance:
                    type: integer
                  stripe_subscription_status:
                    type: string
                  subscription_current_period_end:
                    type: string
                    format: date-time
                  has_managed_subscription:
                    type: boolean
                  can_purchase_topups:
                    type: boolean
                  auto_recharge:
                    type: object
                description: Over MCP (get_account) Stripe customer and subscription IDs are omitted.
        '401':
          description: Missing or invalid API key. Body includes next_action=start_agent_signup.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: insufficient_scope (body names required_scope).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/billing/topups/checkout-link:
    post:
      tags:
      - Billing
      operationId: createTopUpLink
      summary: Create a hosted checkout link for a top-up
      description: Requires a live API key with scope billing:topup. A human opens checkout_url and pays; credits are added when payment completes. Counts toward the key's monthly spend cap.
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - package_id
              properties:
                package_id:
                  type: string
                  examples:
                  - pilot
      responses:
        '200':
          description: Checkout link
          content:
            application/json:
              schema:
                type: object
                properties:
                  checkout_url:
                    type: string
                    format: uri
                  package_id:
                    type: string
                  credits:
                    type: integer
                  price_usd_cents:
                    type: integer
                  expires_at:
                    type: string
                    format: date-time
        '400':
          description: Unknown package.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: A request with this Idempotency-Key is still in progress.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Idempotency-Key reused with a different body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key. Body includes next_action=start_agent_signup.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: insufficient_scope (body names required_scope).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/billing/topups/auto-recharge:
    post:
      tags:
      - Billing
      operationId: runAutoRecharge
      summary: Charge the saved card for the owner-configured auto-recharge package
      description: Requires a live API key with scope billing:autorecharge and auto-recharge enabled by the owner. Counts toward the key's monthly spend cap.
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: Result
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  reason:
                    type: string
                  credits_added:
                    type: integer
                  total_balance:
                    type: integer
        '409':
          description: A request with this Idempotency-Key is still in progress.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key. Body includes next_action=start_agent_signup.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: insufficient_scope (body names required_scope).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/billing/topups/x402/{package_id}:
    post:
      tags:
      - Billing
      operationId: buyTopUpWithX402
      summary: Buy a top-up package with an x402 USDC payment
      description: Only available when the server enables x402 top-ups (currently Base Sepolia testnet, so not in production). Requires a live API key with scope billing:topup and counts toward the key's monthly spend cap. Call once without payment to get the 402 PAYMENT-REQUIRED header (price = package price in USDC), then retry with a PAYMENT-SIGNATURE header. Credits are only added after the payment settles; the PAYMENT-RESPONSE header carries the settlement proof.
      parameters:
      - name: package_id
        in: path
        required: true
        schema:
          type: string
          enum:
          - pilot
          - starter
          - growth
      - name: PAYMENT-SIGNATURE
        in: header
        required: false
        description: Base64 x402 v2 payment payload for the package price.
        schema:
          type: string
      responses:
        '200':
          description: Payment settled and credits added. PAYMENT-RESPONSE header contains the settlement.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    const: credited
                  package_id:
                    type: string
                  credits:
                    type: integer
                  price_usd_cents:
                    type: integer
                  network:
                    type: string
                    examples:
                    - eip155:84532
                  total_balance:
                    type: integer
        '400':
          description: Unknown package.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key. Body includes next_action=start_agent_signup.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Payment required, rejected, or failed to settle. The PAYMENT-REQUIRED header lists the accepted payment (scheme exact, USDC).
        '403':
          description: live_api_key_required, insufficient_scope (required_scope=billing:topup) or spend_cap_exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: x402 top-ups are not enabled on this server.
        '500':
          description: 'credit_failed: the payment settled but credits were not added. Body includes transaction; email support@sendguard.ai.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: 'Optional, up to 255 characters. Retries with the same key and body replay the first response with header Idempotent-Replayed: true.'
      schema:
        type: string
        maxLength: 255
  schemas:
    TopUpPackage:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        credits:
          type: integer
        price_usd_cents:
          type: integer
        per_check:
          type: string
        best_for:
          type: string
        recommended:
          type: boolean
        purchase_type:
          type: string
    Scope:
      type: string
      enum:
      - preflight:read
      - verify:create
      - billing:topup
      - billing:autorecharge
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: string
        message:
          type: string
        next_action:
          type: string
        required_scope:
          $ref: '#/components/schemas/Scope'
        signup_endpoint:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: SendGuard API key (sk_live_... or sk_test_...).