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

# Archive Feature

> Archive or unarchive a feature by feature key.



## OpenAPI

````yaml POST /v1/features/{featureKey}/archive
openapi: 3.1.0
info:
  title: PriceOS Public API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/features/{featureKey}/archive:
    post:
      summary: Archive Feature
      description: Archive or unarchive 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:
                archived:
                  type: boolean
                  default: true
                  description: Whether the feature should be archived.
              additionalProperties: false
      responses:
        '200':
          description: Feature archived
          content:
            application/json:
              schema:
                type: object
                properties:
                  feature:
                    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: Archived feature.
                required:
                  - feature
                description: Feature archive result.
              example:
                feature:
                  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
        '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 result = await priceos.features.archive("api_calls");
        - lang: bash
          label: cURL
          source: >-
            curl -X POST "https://api.priceos.com/v1/features/api_calls/archive"
            \
              -H "x-api-key: PRICEOS_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                "archived": true
              }'

````