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

# Get portfolio usage

> Returns charges recorded for this project across the portfolio's accounts, broken down
by usage kind. Other partners' activity on the same portfolio is not included.




## OpenAPI

````yaml /api/platform/v1/openapi-platform.yaml get /whatsapp/portfolios/{portfolio_id}/usage
openapi: 3.1.0
info:
  title: Kapso Platform API
  version: 0.2.0
  description: >
    Build WhatsApp messaging into your product. Manage customers, connect phone
    numbers, send broadcasts, and handle conversations.
servers:
  - url: https://api.kapso.ai/platform/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Customers
    description: Manage customer accounts
  - name: Setup Links
    description: WhatsApp onboarding via embedded signup
  - name: Phone Numbers
    description: Connect and manage WhatsApp numbers
  - name: Webhooks
    description: Subscribe to WhatsApp events
  - name: Display Names
    description: Update WhatsApp business display names
  - name: Broadcasts
    description: |
      Send template messages at scale

      **Alpha**: This API is in alpha and subject to change
  - name: Conversations
    description: Manage conversation state
  - name: Media
    description: Upload media files for WhatsApp messaging
  - name: Users
    description: Manage project team members
  - name: Inbox Embeds
    description: Create and manage embeddable inbox access links
  - name: Webhook Deliveries
    description: View webhook delivery attempts and their status
  - name: External API Logs
    description: View logs of external API calls made by the project
  - name: Log Search
    description: Search log events across API, Meta, workflow, and webhook sources
  - name: Events
    description: Emit and query project-scoped events
  - name: Provider Models
    description: List available AI provider models
  - name: WhatsApp Flows
    description: Build interactive WhatsApp Flows for surveys and forms
  - name: Contacts
    description: Manage WhatsApp contacts
  - name: Findings
    description: Detect recurring problems in conversations and investigate them with AI
  - name: Notifications
    description: >-
      Route project alerts to shared inboxes and Slack channels connected from
      the Kapso app
  - name: WhatsApp Funding
    description: >-
      Read Kapso funding status and recorded messaging and calling usage, and
      stop portfolio funding
paths:
  /whatsapp/portfolios/{portfolio_id}/usage:
    get:
      tags:
        - WhatsApp Funding
      summary: Get portfolio usage
      description: >
        Returns charges recorded for this project across the portfolio's
        accounts, broken down

        by usage kind. Other partners' activity on the same portfolio is not
        included.
      operationId: getWhatsappPortfolioUsage
      parameters:
        - name: portfolio_id
          in: path
          required: true
          description: Meta Business Portfolio ID.
          schema:
            type: string
        - name: start_time
          in: query
          required: true
          description: Inclusive start of the window, ISO 8601 with an offset or `Z`.
          schema:
            type: string
            format: date-time
        - name: end_time
          in: query
          required: true
          description: Exclusive end of the window. At most 31 days after `start_time`.
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Recorded usage
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsappBillingUsageResponse'
        '400':
          description: Invalid or missing time range
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  schemas:
    WhatsappBillingUsageResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/WhatsappBillingUsage'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    WhatsappBillingUsage:
      type: object
      required:
        - start_time
        - end_time
        - time_basis
        - currency
        - charge_scope
        - totals
        - breakdown
      properties:
        start_time:
          type: string
          format: date-time
        end_time:
          type: string
          format: date-time
        time_basis:
          type: string
          description: >-
            The window measures when charges were recorded, not when Meta
            delivered the original messages.
          const: recorded_at
        currency:
          type: string
          example: USD
        charge_scope:
          type: string
          description: >-
            Charges recorded by Kapso, not Meta's complete invoice or
            native-currency costs.
          const: kapso_recorded_charges
        totals:
          type: object
          required:
            - customer_charge_micro_usd
          properties:
            customer_charge_micro_usd:
              type: integer
              description: >-
                Sum of every `breakdown` charge, in micro-USD (`1000000` is USD
                1). Signed corrections are included, so a correction-only window
                can be negative.
              example: 115000
        breakdown:
          type: array
          description: >-
            One entry per recorded usage kind, each with its own freshness. New
            kinds can be added; do not rely on array order, and handle unknown
            `usage_kind` values. Use `totals` for the overall recorded amount.
          items:
            $ref: '#/components/schemas/WhatsappBillingUsageBreakdownItem'
    WhatsappBillingUsageBreakdownItem:
      type: object
      required:
        - usage_kind
        - customer_charge_micro_usd
        - sync
      properties:
        usage_kind:
          type: string
          description: Extensible machine-readable kind of recorded charge.
          example: messaging
        customer_charge_micro_usd:
          type: integer
          description: Recorded charge for this kind, in micro-USD.
          example: 90000
        billable_messages:
          type: integer
          description: >-
            Messaging only. Calling reports aggregate fees, not call counts or
            minutes.
          example: 1
        coverage:
          type: object
          description: >-
            Calling only. Current active-attachment currency support. Support
            does not promise billing activation, working credentials or complete
            observations, and historical charges stay in the total after support
            is lost.
          required:
            - status
            - reason
          properties:
            status:
              type: string
              description: >
                - `supported`: every active attachment is a USD WABA.

                - `partial`: mixed USD and non-USD attachments. Fresh USD
                observations do
                  not establish zero calling cost for the non-USD WABAs.
                - `unsupported`: no USD attachment.

                - `not_available`: no active attachment.
              enum:
                - supported
                - partial
                - unsupported
                - not_available
            reason:
              type: string
              nullable: true
              description: >-
                `calling_requires_usd_waba` for `partial`/`unsupported`,
                `no_active_attachment` for `not_available`, null for
                `supported`.
              example: calling_requires_usd_waba
        sync:
          $ref: '#/components/schemas/WhatsappBillingUsageSync'
    WhatsappBillingUsageSync:
      type: object
      description: >-
        Current observation health for this usage kind, not completeness of the
        requested range.
      required:
        - status
        - last_synced_at
        - usage_through
      properties:
        status:
          type: string
          description: >
            - `synced`: every relevant account is fresh. Messaging settles
            within 15
              minutes; calling coverage is under one hour old.
            - `delayed`: evidence exists but at least one account is older than
            that
              boundary. The boundary labels freshness, not a calling authorization
              cutoff or a promise that every cold account is polled on that cadence.
            - `unknown`: at least one relevant account has no successful
            observation.

            - `not_available`: no coverage applies, for example a direct
            managed-billing
              account for messaging, or no active USD attachment for calling. Totals are
              still returned.
          enum:
            - synced
            - delayed
            - unknown
            - not_available
        last_synced_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            Messaging - oldest latest successful settlement across the relevant
            accounts. Always null for calling, which stores a coverage watermark
            instead of a settlement completion timestamp.
        usage_through:
          type: string
          format: date-time
          nullable: true
          description: >-
            Conservative common end of processed coverage. For messaging, the
            common end of the processed query windows capped at fetch
            completion; for calling, the oldest reconciled coverage watermark
            across USD attachments. Not a guarantee that Meta has reported
            everything for that period.
  responses:
    UnauthorizedError:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````