Viam Billing API

Retrieve current-month usage, billing tier metadata, invoice summaries, invoice PDFs, and organization billing information. Supports custom billing tiers and the location-level billing organization assignment used by Viam's "build a robotics business" features.

OpenAPI Specification

viam-billing-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Viam Billing API
  description: |
    REST/JSON transcoding of the Viam BillingService gRPC API. Retrieve current-month
    usage, invoice summaries, invoice PDFs, billing tiers, and the location-level billing
    organization assignment used by Viam's "build a robotics business" features.

    Canonical contract: https://github.com/viamrobotics/api/blob/main/proto/viam/app/v1/billing.proto
  version: '2026.05'
  contact:
    name: Viam Support
    url: https://www.viam.com/contact
servers:
  - url: https://app.viam.com
    description: Viam production cloud.
security:
  - ApiKeyAuth: []
tags:
  - name: Usage
    description: Current-month usage reporting.
  - name: Invoices
    description: Invoices and invoice PDFs.
  - name: Billing Tiers
    description: Available billing tiers for end-customer billing.
  - name: Charges
    description: Charge an organization or create-and-charge an invoice.
paths:
  /viam.app.v1.BillingService/GetCurrentMonthUsage:
    post:
      summary: Viam Get Current Month Usage
      description: Retrieve current-month usage and projected cost for an organization.
      operationId: getCurrentMonthUsage
      tags: [Usage]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [org_id]
              properties:
                org_id: { type: string }
      responses:
        '200':
          description: Successful response.
  /viam.app.v1.BillingService/GetOrgBillingInformation:
    post:
      summary: Viam Get Org Billing Information
      description: Retrieve billing information for an organization.
      operationId: getOrgBillingInformation
      tags: [Usage]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [org_id]
              properties:
                org_id: { type: string }
      responses:
        '200':
          description: Successful response.
  /viam.app.v1.BillingService/GetInvoicesSummary:
    post:
      summary: Viam Get Invoices Summary
      description: Summarize invoices for an organization.
      operationId: getInvoicesSummary
      tags: [Invoices]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [org_id]
              properties:
                org_id: { type: string }
      responses:
        '200':
          description: Successful response.
  /viam.app.v1.BillingService/GetInvoicePdf:
    post:
      summary: Viam Get Invoice Pdf
      description: Retrieve an invoice PDF by id.
      operationId: getInvoicePdf
      tags: [Invoices]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [id, org_id]
              properties:
                id: { type: string }
                org_id: { type: string }
      responses:
        '200':
          description: Successful response.
  /viam.app.v1.BillingService/SendPaymentRequiredEmail:
    post:
      summary: Viam Send Payment Required Email
      description: Send a payment-required notification email to an organization owner.
      operationId: sendPaymentRequiredEmail
      tags: [Invoices]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [customer_org_id]
              properties:
                customer_org_id: { type: string }
      responses:
        '200':
          description: Successful response.
  /viam.app.v1.BillingService/GetAvailableBillingTiers:
    post:
      summary: Viam Get Available Billing Tiers
      description: List billing tiers available for end-customer subscription.
      operationId: getAvailableBillingTiers
      tags: [Billing Tiers]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [org_id]
              properties:
                org_id: { type: string }
      responses:
        '200':
          description: Successful response.
  /viam.app.v1.BillingService/UpdateOrganizationBillingTier:
    post:
      summary: Viam Update Organization Billing Tier
      description: Move an organization onto a new billing tier.
      operationId: updateOrganizationBillingTier
      tags: [Billing Tiers]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [org_id, billing_tier]
              properties:
                org_id: { type: string }
                billing_tier: { type: string }
      responses:
        '200':
          description: Successful response.
  /viam.app.v1.BillingService/GetLocationBillingOrganization:
    post:
      summary: Viam Get Location Billing Organization
      description: Retrieve the organization billed for a location's usage.
      operationId: getLocationBillingOrganization
      tags: [Billing Tiers]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [location_id]
              properties:
                location_id: { type: string }
      responses:
        '200':
          description: Successful response.
  /viam.app.v1.BillingService/UpdateLocationBillingOrganization:
    post:
      summary: Viam Update Location Billing Organization
      description: Reassign a location to a different billing organization.
      operationId: updateLocationBillingOrganization
      tags: [Billing Tiers]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [location_id, billing_organization_id]
              properties:
                location_id: { type: string }
                billing_organization_id: { type: string }
      responses:
        '200':
          description: Successful response.
  /viam.app.v1.BillingService/ChargeOrganization:
    post:
      summary: Viam Charge Organization
      description: Charge an end-customer organization for usage outside the standard billing cycle.
      operationId: chargeOrganization
      tags: [Charges]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [org_id, amount_owed]
              properties:
                org_id: { type: string }
                amount_owed: { type: number, format: double }
                description: { type: string }
      responses:
        '200':
          description: Successful response.
  /viam.app.v1.BillingService/CreateInvoiceAndChargeImmediately:
    post:
      summary: Viam Create Invoice And Charge Immediately
      description: Create an invoice and charge the customer immediately.
      operationId: createInvoiceAndChargeImmediately
      tags: [Charges]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [org_id, amount]
              properties:
                org_id: { type: string }
                amount: { type: number, format: double }
                description: { type: string }
      responses:
        '200':
          description: Successful response.
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: key
      description: Viam API key.