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

# Create a product

> Creates a new product. Products are the billable unit on subscription items and define whether pricing is fixed or metered, the payment terms, the billing frequency, the SKU for downstream ERP systems, and the revenue allocation method. Metered products must be associated with one or more metrics.



## OpenAPI

````yaml /api-reference/v2/specs/2026-04-01.json post /products
openapi: 3.1.0
info:
  title: Alguna Public API
  version: '2026-04-01'
servers:
  - url: https://api.alguna.io
security:
  - bearerAuth: []
tags:
  - name: Billing Events and Metrics
  - name: Credit Notes
  - name: Credits
  - name: Customer Portal Sessions
  - name: Customers
  - name: Insights
  - name: Invoices
  - name: Payments
  - name: Plans
  - name: Product Bundles
  - name: Products
  - name: Refunds
  - name: Revenue Schedules
  - name: Subscription Changes
  - name: Subscription Versions
  - name: Subscriptions
  - name: Wallet Grants
  - name: Wallets
paths:
  /products:
    post:
      tags:
        - Products
      summary: Create a product
      description: >-
        Creates a new product. Products are the billable unit on subscription
        items and define whether pricing is fixed or metered, the payment terms,
        the billing frequency, the SKU for downstream ERP systems, and the
        revenue allocation method. Metered products must be associated with one
        or more metrics.
      operationId: create-product
      parameters:
        - in: header
          name: Alguna-Version
          required: true
          schema:
            enum:
              - '2026-04-01'
            type: string
        - in: header
          name: Idempotency-Key
          schema:
            description: >-
              A unique string used to ensure the request is processed exactly
              once. If you retry a request with the same idempotency key within
              24 hours, the original response is returned without re-executing
              the operation.
            example: ik_a1b2c3d4e5f6
            maxLength: 255
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProductRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductResponse'
          description: Success
          headers:
            Idempotency-Key:
              description: Echo of the idempotency key provided in the request
              schema:
                type: string
            Idempotent-Replayed:
              description: >-
                Whether this response was replayed from a previous request
                (true) or freshly executed (false)
              schema:
                type: boolean
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: >-
            Conflict — a request with this idempotency key is currently being
            processed
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
components:
  schemas:
    CreateProductRequest:
      properties:
        billing_frequency:
          description: >-
            How often the product is billed. Required for fixed products;
            metered products are always recurring
          enum:
            - recurring
            - one-off
          example: recurring
          nullable: true
          type: string
        description:
          description: A brief description of the product
          example: Monthly platform access fee
          type: string
        fee_type:
          description: Whether the product is fixed-price or usage-based
          enum:
            - fixed
            - metered
          example: fixed
          type: string
        metric_ids:
          description: Identifiers for metrics to associate with a metered product
          items:
            type: string
          type: array
        name:
          description: The name of the product
          example: Platform Fee
          type: string
        payment_terms:
          description: When the product is billed relative to the billing period
          enum:
            - advance
            - arrears
          example: arrears
          type: string
        revenue_allocation_method:
          description: How revenue is allocated across time periods within a billing cycle
          enum:
            - straight_line
            - usage_based
            - contract_level_straight_line
          example: straight_line
          nullable: true
          type: string
        sku:
          description: >-
            Stock keeping unit code used in external ERP or revenue recognition
            systems
          example: PLATFORM_FEE
          nullable: true
          type: string
        tag_ids:
          description: Identifiers for tags to associate with this product
          items:
            type: string
          type: array
        unit_label_plural:
          description: >-
            Custom plural term for multiple units of the product (e.g. 'API
            calls'). Falls back to 'units' when omitted
          example: API calls
          nullable: true
          type: string
        unit_label_singular:
          description: >-
            Custom singular term for one unit of the product (e.g. 'API call').
            Falls back to 'unit' when omitted
          example: API call
          nullable: true
          type: string
      required:
        - fee_type
        - name
        - payment_terms
      type: object
    ProductResponse:
      properties:
        billing_frequency:
          description: How often the product is billed
          enum:
            - recurring
            - one-off
          example: recurring
          nullable: true
          type: string
        created_at:
          description: Timestamp when the product was created
          example: '2026-04-01T10:00:00Z'
          format: date-time
          type: string
        description:
          description: A brief description of the product
          example: Monthly platform access fee
          type: string
        fee_type:
          description: Whether the product is fixed-price or usage-based
          enum:
            - fixed
            - metered
          example: fixed
          type: string
        id:
          description: Unique identifier for the product
          example: prod_01H1VECT
          type: string
        metric_ids:
          description: Identifiers for associated metrics. Applicable for metered products
          example:
            - mtr_01H2ABC
          items:
            type: string
          type: array
        name:
          description: The name of the product
          example: Platform Fee
          type: string
        payment_terms:
          description: When the product is billed relative to the billing period
          enum:
            - advance
            - arrears
          example: arrears
          type: string
        revenue_allocation_method:
          description: How revenue is allocated across time periods within a billing cycle
          enum:
            - straight_line
            - usage_based
            - contract_level_straight_line
          example: straight_line
          type: string
        sku:
          description: >-
            Stock keeping unit code used in external ERP or revenue recognition
            systems
          example: PLATFORM_FEE
          nullable: true
          type: string
        tag_ids:
          description: Identifiers for tags associated with this product
          example:
            - tag_01H3DEF
          items:
            type: string
          type: array
        unit_label_plural:
          description: >-
            Custom plural term for multiple units of the product (e.g. 'API
            calls'). Falls back to 'units' when omitted
          example: API calls
          nullable: true
          type: string
        unit_label_singular:
          description: >-
            Custom singular term for one unit of the product (e.g. 'API call').
            Falls back to 'unit' when omitted
          example: API call
          nullable: true
          type: string
        updated_at:
          description: Timestamp when the product was last updated
          example: '2026-04-01T12:30:00Z'
          format: date-time
          type: string
      required:
        - created_at
        - description
        - fee_type
        - id
        - name
        - payment_terms
        - revenue_allocation_method
        - updated_at
      type: object
    ErrorResponse:
      properties:
        detail:
          type: string
        status:
          format: int64
          type: integer
      required:
        - status
        - detail
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: API Key
      description: API key authentication. Pass your API key as a Bearer token.
      scheme: bearer
      type: http

````