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

# Push cell usage

> Cells send their usage aggregates for billing.



## OpenAPI

````yaml openapi/en/control.json POST /v1/usage
openapi: 3.1.0
info:
  title: Niadra control API
  version: '1'
  description: >-
    Tenants, projects, sources, keys, people, configuration and usage. It never
    receives customer content.
servers:
  - url: https://control.api.niadra.com
security: []
paths:
  /v1/usage:
    post:
      summary: Push cell usage
      description: >-
        Cells send their usage aggregates for billing. Used by Niadra cells.


        **Authentication.** Cell credential (`X-Niadra-Cell-Token`). Used by
        Niadra cells, not by your code.
      operationId: push_usage_v1_usage_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UsagePush'
            example:
              cell_id: cell-1
              items:
                - space_id: 0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23
                  period_start: '2026-09-01T00:00:00Z'
                  metric: session_billable
                  quantity: 182340
                  cost_micros: 0
                - space_id: 0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23
                  period_start: '2026-09-01T00:00:00Z'
                  metric: event_ingested
                  quantity: 4120775
                  cost_micros: 0
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                additionalProperties:
                  type: integer
                title: Response Push Usage V1 Usage Post
                type: object
              example:
                accepted: 2
          description: How many aggregates were accepted.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - cellToken: []
components:
  schemas:
    UsagePush:
      additionalProperties: false
      properties:
        cell_id:
          title: Cell Id
          type: string
        items:
          items:
            $ref: '#/components/schemas/UsageItem'
          maxItems: 5000
          title: Items
          type: array
      required:
        - cell_id
        - items
      title: UsagePush
      type: object
    Problem:
      additionalProperties: false
      description: RFC 9457 problem details; `code` comes from the versioned error catalog.
      properties:
        code:
          title: Code
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Detail
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Request Id
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          default: about:blank
          title: Type
          type: string
      required:
        - title
        - status
        - code
      title: Problem
      type: object
    UsageItem:
      additionalProperties: false
      properties:
        cost_micros:
          default: 0
          minimum: 0
          title: Cost Micros
          type: integer
          description: Cost in millionths of a dollar, when the metric has one.
        metric:
          maxLength: 256
          minLength: 1
          title: Metric
          type: string
        period_start:
          format: date-time
          title: Period Start
          type: string
        quantity:
          minimum: 0
          title: Quantity
          type: integer
        space_id:
          format: uuid
          title: Space Id
          type: string
      required:
        - space_id
        - period_start
        - metric
        - quantity
      title: UsageItem
      type: object
  securitySchemes:
    cellToken:
      type: apiKey
      in: header
      name: X-Niadra-Cell-Token

````