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

# Create Custom Product

> Create a custom product, optionally with its complete feature access configuration and as the default product.



## OpenAPI

````yaml POST /v1/custom-products
openapi: 3.1.0
info:
  title: PriceOS Public API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/custom-products:
    post:
      summary: Create Custom Product
      description: >-
        Create a custom product, optionally with its complete feature access
        configuration and as the default product.
      parameters:
        - schema:
            type: string
            description: API key from your PriceOS dashboard.
          required: true
          description: API key from your PriceOS dashboard.
          name: x-api-key
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Custom product name.
                productKey:
                  type: string
                  description: Stable custom product key.
                metadata:
                  type: object
                  additionalProperties:
                    type: string
                  description: Custom product metadata.
                isDefault:
                  type: boolean
                  description: Whether to make this the default custom product.
                featureAccess:
                  type: array
                  items:
                    type: object
                    properties:
                      featureKey:
                        type: string
                        description: Feature key.
                      hasAccess:
                        type: boolean
                        description: Whether the product grants access.
                      limit:
                        type: number
                        minimum: 0
                        description: Limit for limit features.
                      isUnlimited:
                        type: boolean
                        enum:
                          - true
                        description: Whether a limit feature is unlimited.
                    required:
                      - featureKey
                      - hasAccess
                    additionalProperties: false
                  description: >-
                    Complete desired feature access configuration for the
                    product.
              required:
                - name
                - productKey
              additionalProperties: false
      responses:
        '201':
          description: Custom product created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Product ID.
                  key:
                    type: string
                    description: Product key.
                  name:
                    type: string
                    description: Product name.
                  type:
                    type: string
                    enum:
                      - stripe
                      - custom
                    description: Product type.
                  isDefault:
                    type: boolean
                    description: Whether this is the default custom product.
                  version:
                    type: number
                    description: Product version number.
                  stripeProductId:
                    type:
                      - string
                      - 'null'
                    description: Stripe product ID (Stripe products only).
                  metadata:
                    type: object
                    additionalProperties:
                      type: string
                    description: Custom product metadata (custom products only).
                  prices:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Price ID.
                        stripePriceId:
                          type: string
                          description: Stripe price ID.
                        currency:
                          type:
                            - string
                            - 'null'
                          description: ISO currency code.
                        unitAmount:
                          type:
                            - number
                            - 'null'
                          description: Unit amount in the smallest currency unit.
                        recurringInterval:
                          type:
                            - string
                            - 'null'
                          description: Recurring interval, if any.
                        recurringIntervalCount:
                          type:
                            - number
                            - 'null'
                          description: Recurring interval count, if any.
                        isActive:
                          type: boolean
                          description: Whether the price is active.
                        isDefault:
                          type: boolean
                          description: Whether this is the default price.
                      required:
                        - id
                        - stripePriceId
                        - currency
                        - unitAmount
                        - recurringInterval
                        - recurringIntervalCount
                        - isActive
                        - isDefault
                    description: Stripe prices linked to the product.
                  featureAccess:
                    type: array
                    items:
                      type: object
                      properties:
                        featureKey:
                          type: string
                          description: Feature key.
                        name:
                          type: string
                          description: Feature name.
                        type:
                          type: string
                          enum:
                            - boolean
                            - limit
                          description: Feature access type.
                        hasAccess:
                          type: boolean
                          description: Whether the product grants access to the feature.
                        limit:
                          type:
                            - number
                            - 'null'
                          description: Configured limit value for limit features.
                        isUnlimited:
                          type: boolean
                          description: Whether the limit feature is unlimited.
                      required:
                        - featureKey
                        - name
                        - type
                        - hasAccess
                    description: Feature access entries configured for this product.
                required:
                  - id
                  - key
                  - name
                  - type
                  - isDefault
                  - version
                  - stripeProductId
                  - metadata
                  - prices
                  - featureAccess
                description: Product.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message.
                required:
                  - error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message.
                required:
                  - error
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message.
                required:
                  - error
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message.
                required:
                  - error

````