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

# Archive a Prompt

> Archives a specific prompt container, setting `status` to 'archived'. The prompt still exists in the system and people can call it and use it, so a prompt is never deleted. Requires Org Admin or Team Admin privileges (GitHub repo owner model). Team Editors and Team Members are not authorized to archive prompts.



## OpenAPI

````yaml /openapi.yaml post /v1/prompts/{id}/archive
openapi: 3.1.0
info:
  title: px0 API
  description: >
    px[0] is an open-source prompt infrastructure toolkit for managing prompts
    in production. It replaces hardcoded prompt strings with versioned
    templates, in-process caching, and OpenTelemetry observability, so teams can
    iterate on prompts without touching application code. This is the OpenAPI
    specification for all the public APIs of px0.
  version: 1.0.0
servers:
  - url: http://localhost:3000
    description: Local development server
security: []
paths:
  /v1/prompts/{id}/archive:
    post:
      tags:
        - Prompts
      summary: Archive a Prompt
      description: >-
        Archives a specific prompt container, setting `status` to 'archived'.
        The prompt still exists in the system and people can call it and use it,
        so a prompt is never deleted. Requires Org Admin or Team Admin
        privileges (GitHub repo owner model). Team Editors and Team Members are
        not authorized to archive prompts.
      operationId: archivePrompt
      parameters:
        - name: id
          in: path
          required: true
          description: The unique UUID of the prompt to archive.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Prompt successfully archived
          content:
            application/json:
              schema:
                type: object
                properties:
                  prompt:
                    $ref: '#/components/schemas/Prompt'
                required:
                  - prompt
        '400':
          description: Invalid UUID format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
              example:
                error: invalid prompt id
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
              example:
                error: unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
              example:
                error: forbidden
        '404':
          description: Prompt not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
              example:
                error: prompt not found
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
              example:
                error: internal error
      security:
        - BearerAuth: []
components:
  schemas:
    Prompt:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier.
        team_id:
          type: string
          format: uuid
          description: Unique identifier of the team.
        slug:
          type: string
          description: Unique slug within the team.
        name:
          type: string
          description: Name of the prompt container.
        description:
          type: string
          description: Brief summary explaining the prompt purpose.
        status:
          type: string
          enum:
            - active
            - archived
          description: Current status of the prompt container (active, archived).
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - team_id
        - slug
        - name
        - description
        - status
        - created_at
        - updated_at
    APIError:
      type: object
      properties:
        error:
          type: string
          example: invalid credentials
      required:
        - error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Use an access token retrieved from login (Bearer sess_...) or a
        programmatic API key (Bearer ak_...).

````