> ## 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.

# Set Product Feature Access

> Replace the complete feature access configuration for the latest product version.



## OpenAPI

````yaml PUT /v1/products/{productKey}/feature-access
openapi: 3.1.0
info:
  title: PriceOS Public API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/products/{productKey}/feature-access:
    put:
      summary: Set Product Feature Access
      description: >-
        Replace the complete feature access configuration for the latest product
        version.
      parameters:
        - schema:
            type: string
            description: Product key.
          required: true
          description: Product key.
          name: productKey
          in: path
        - 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:
                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:
                - featureAccess
              additionalProperties: false
      responses:
        '200':
          description: Product feature access updated
          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
        '404':
          description: Not found
          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

````