openapi: 3.0.3 info: title: Amberflo Billing Customers 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: Customers description: Manage customer accounts and lifecycle paths: /customers: get: operationId: listCustomers summary: Amberflo List All Customers description: Retrieve a list of all customers in the account. tags: - Customers responses: '200': description: Array of customer records content: application/json: schema: type: array items: $ref: '#/components/schemas/Customer' examples: ListCustomers200Example: summary: Default listCustomers 200 response x-microcks-default: true value: - customerId: customer-123456 customerName: Acme Corp customerEmail: billing@acme.com lifecycleStage: ACTIVE createTime: 1718153645993 updateTime: 1718153645993 test: false '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' x-microcks-operation: delay: 0 dispatcher: FALLBACK post: operationId: createCustomer summary: Amberflo Create a Customer description: Create a new customer account in Amberflo. tags: - Customers parameters: - name: autoCreateCustomerInStripe in: query required: false description: Whether to auto-create the customer in Stripe schema: type: string enum: - if_payment_provider example: if_payment_provider requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CustomerRequest' examples: CreateCustomerRequestExample: summary: Default createCustomer request x-microcks-default: true value: customerId: customer-123456 customerName: Acme Corp customerEmail: billing@acme.com lifecycleStage: ACTIVE test: false responses: '200': description: Created customer record content: application/json: schema: $ref: '#/components/schemas/Customer' examples: CreateCustomer200Example: summary: Default createCustomer 200 response x-microcks-default: true value: customerId: customer-123456 customerName: Acme Corp customerEmail: billing@acme.com lifecycleStage: ACTIVE createTime: 1718153645993 updateTime: 1718153645993 '400': description: Bad request — invalid data or duplicate customerId content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' x-microcks-operation: delay: 0 dispatcher: FALLBACK put: operationId: updateCustomer summary: Amberflo Update a Customer description: Update an existing customer's details. tags: - Customers requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Customer' responses: '200': description: Updated customer record content: application/json: schema: $ref: '#/components/schemas/Customer' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' x-microcks-operation: delay: 0 dispatcher: FALLBACK /customers/{customerId}: get: operationId: getCustomerById summary: Amberflo Get Customer by ID description: Retrieve a specific customer by their unique identifier. tags: - Customers parameters: - name: customerId in: path required: true description: Unique identifier of the customer schema: type: string example: customer-123456 responses: '200': description: Customer record content: application/json: schema: $ref: '#/components/schemas/Customer' '404': description: Customer not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' x-microcks-operation: delay: 0 dispatcher: FALLBACK delete: operationId: deleteCustomer summary: Amberflo Delete Customer by ID description: Delete a customer account by their unique identifier. tags: - Customers parameters: - name: customerId in: path required: true description: Unique identifier of the customer to delete schema: type: string example: customer-123456 responses: '200': description: Customer deleted successfully '404': description: Customer not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' x-microcks-operation: delay: 0 dispatcher: FALLBACK components: schemas: Address: type: object description: Tax address for a customer required: - line1 - city - country properties: verified: type: boolean description: Whether the address has been verified line1: type: string description: Address line 1 example: 123 Main Street state: type: string description: State or province example: CA city: type: string description: City example: San Francisco postalCode: type: string description: Postal or ZIP code example: '94105' country: type: string description: ISO country code example: US CustomerRequest: type: object description: Request body for creating or updating a customer required: - customerId - customerName properties: customerId: type: string description: Unique customer identifier example: customer-123456 customerName: type: string description: Customer display name example: Acme Corp customerEmail: type: string format: email description: Customer email address example: billing@acme.com description: type: string description: Customer description test: type: boolean description: Marks customer as test example: false lifecycleStage: type: string description: Lifecycle stage enum: - ONBOARDING - TRAIL - ACTIVE - OFFBOARDED example: ACTIVE traits: type: object additionalProperties: type: string description: Custom metadata address: $ref: '#/components/schemas/Address' Customer: type: object description: A customer account in Amberflo required: - customerId - customerName properties: createTime: type: integer format: int64 description: Creation timestamp in Unix milliseconds example: 1718153645993 updateTime: type: integer format: int64 description: Last update timestamp in Unix milliseconds example: 1718153645993 deleteTime: type: integer format: int64 description: Deletion timestamp in Unix milliseconds example: 1718153645993 customerId: type: string description: Unique customer identifier from your system example: customer-123456 customerName: type: string description: Customer display name example: Acme Corp customerEmail: type: string format: email description: Customer contact email example: billing@acme.com description: type: string description: Customer description example: Enterprise customer account for Acme Corporation enabled: type: boolean description: Deprecated — use lifecycleStage instead deprecated: true test: type: boolean description: Whether this is a test customer account example: false lifecycleStage: type: string description: Customer lifecycle stage enum: - ONBOARDING - TRAIL - ACTIVE - OFFBOARDED example: ACTIVE deactivateTimeStamp: type: integer format: int64 description: Last deactivation timestamp in Unix milliseconds traits: type: object additionalProperties: type: string description: Custom metadata for external system integration address: $ref: '#/components/schemas/Address' ErrorResponse: type: object description: Error response properties: message: type: string description: Human-readable error message example: Customer not found code: type: string description: Error code example: NOT_FOUND securitySchemes: ApiKeyAuth: type: apiKey in: header name: X-API-KEY description: API key for authentication