openapi: 3.0.3 info: title: Amberflo Billing Customers Event Ingestion API description: The Amberflo Billing API manages customers, pricing plans, invoices, prepaid orders, promotions, commitments, and billing analysis for usage-based monetization workflows. version: 1.0.0 contact: name: Amberflo Support url: https://www.amberflo.io/company/contact x-generated-from: documentation x-last-validated: '2026-04-19' servers: - url: https://app.amberflo.io description: Amberflo Production API security: - ApiKeyAuth: [] tags: - name: Event Ingestion description: Ingest meter events for usage tracking paths: /ingest: post: operationId: ingestMeterEvents summary: Amberflo Ingest Meter Events description: Ingest one or more meter events for usage tracking. Supports both single event objects and arrays of events with idempotency via uniqueId. tags: - Event Ingestion requestBody: required: true content: application/json: schema: oneOf: - $ref: '#/components/schemas/MeterEvent' - type: array items: $ref: '#/components/schemas/MeterEvent' examples: IngestMeterEventsRequestExample: summary: Default ingestMeterEvents request x-microcks-default: true value: meterApiName: api-calls customerId: customer-123456 meterValue: 1 meterTimeInMillis: 1718153645993 uniqueId: evt-a1b2c3d4 dimensions: region: us-east-1 tier: premium responses: '200': description: Successful request — events accepted for ingestion content: application/json: schema: type: string examples: IngestMeterEvents200Example: summary: Default ingestMeterEvents 200 response x-microcks-default: true value: OK '400': description: Bad request — invalid event data content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized — invalid or missing API key content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' x-microcks-operation: delay: 0 dispatcher: FALLBACK components: schemas: MeterEvent: type: object description: A single meter event representing a unit of usage required: - meterTimeInMillis properties: meterApiName: type: string description: The API name of the meter to ingest to example: api-calls customerId: type: string description: Unique identifier for the customer example: customer-123456 meterValue: type: number description: The usage amount for this event example: 1.0 meterTimeInMillis: type: integer format: int64 description: Event timestamp in Unix time (milliseconds) example: 1718153645993 uniqueId: type: string description: Custom identifier for event deduplication example: evt-a1b2c3d4 dimensions: type: object additionalProperties: type: string description: Key-value pairs for event categorization example: region: us-east-1 tier: premium values: type: object additionalProperties: type: number description: Map of meterApiName to meterValue for multi-meter ingestion ErrorResponse: type: object description: Error response returned by the API properties: message: type: string description: Human-readable error message example: Invalid API key provided code: type: string description: Error code for programmatic handling example: UNAUTHORIZED details: type: string description: Additional error details securitySchemes: ApiKeyAuth: type: apiKey in: header name: X-API-KEY description: API key for authentication