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

# Update Feature

> Partially update a feature by feature key.



## OpenAPI

````yaml PUT /v1/features/{featureKey}
openapi: 3.1.0
info:
  title: PriceOS Public API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/features/{featureKey}:
    put:
      summary: Update Feature
      description: Partially update a feature by feature key.
      parameters:
        - schema:
            type: string
            description: Feature key.
          required: true
          description: Feature key.
          name: featureKey
          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:
                name:
                  type: string
                  description: Feature name.
                featureKey:
                  type:
                    - string
                    - 'null'
                  description: Feature key.
                type:
                  type: string
                  enum:
                    - boolean
                    - limit
                  description: Feature access type.
                description:
                  type:
                    - string
                    - 'null'
                  description: Feature description.
                tracksUsage:
                  type: boolean
                  description: Whether this limit feature tracks usage.
                usageResetInterval:
                  type: string
                  enum:
                    - never
                    - day
                    - week
                    - month
                    - year
                  description: Usage reset interval.
                usageResetAnchor:
                  type: string
                  enum:
                    - billing_period
                    - calendar
                  description: Usage reset anchor.
              additionalProperties: false
      responses:
        '200':
          description: Feature updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Feature ID.
                  featureKey:
                    type: string
                    description: Feature key.
                  name:
                    type: string
                    description: Feature name.
                  description:
                    type:
                      - string
                      - 'null'
                    description: Feature description.
                  type:
                    type: string
                    enum:
                      - boolean
                      - limit
                    description: Feature access type.
                  tracksUsage:
                    type: boolean
                    description: Whether the feature tracks usage.
                  usageResetInterval:
                    type: string
                    enum:
                      - never
                      - day
                      - week
                      - month
                      - year
                    description: Usage reset interval.
                  usageResetAnchor:
                    type: string
                    enum:
                      - billing_period
                      - calendar
                    description: Usage reset anchor.
                  isArchived:
                    type: boolean
                    description: Whether the feature is archived.
                  archivedAt:
                    type:
                      - string
                      - 'null'
                    description: When the feature was archived.
                  archivedReason:
                    type:
                      - string
                      - 'null'
                    description: Why the feature was archived.
                required:
                  - id
                  - featureKey
                  - name
                  - description
                  - type
                  - tracksUsage
                  - usageResetInterval
                  - usageResetAnchor
                  - isArchived
                  - archivedAt
                  - archivedReason
                description: Feature.
              example:
                id: feat_123
                featureKey: api_calls
                name: API Calls
                description: Monthly API request limit.
                type: limit
                tracksUsage: true
                usageResetInterval: month
                usageResetAnchor: calendar
                isArchived: false
                archivedAt: null
                archivedReason: null
        '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
        '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
      x-codeSamples:
        - lang: typescript
          label: Node.js
          source: >-
            import { PriceOS } from "priceos";

            import type { MyFeatures } from "./priceos.types";


            const priceos = new
            PriceOS<MyFeatures>(process.env.PRICEOS_API_KEY!);


            const feature = await priceos.features.update("api_calls", {
              name: "Monthly API Calls",
            });
        - lang: bash
          label: cURL
          source: |-
            curl -X PUT "https://api.priceos.com/v1/features/api_calls" \
              -H "x-api-key: PRICEOS_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                "name": "Monthly API Calls"
              }'

````