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

# Move a prompt to a folder

> Move a prompt family into a folder path, or to the root by passing `null`. The folder is applied to every version of the named prompt.




## OpenAPI

````yaml /api-reference/openapi.yaml patch /v1/prompts/{name}/folder
openapi: 3.1.0
info:
  title: Zespan Public API
  version: 1.0.0
  description: >
    The Zespan Public API covers the endpoints that customers call directly or
    through the Zespan SDKs: trace ingestion (native and OpenTelemetry), prompt
    management, datasets and dataset runs, and the runtime guardrails check.

    All endpoints authenticate with a project API key sent in the `x-api-key`
    header. Create and manage API keys from the project settings in the Zespan
    dashboard.
servers:
  - url: https://api.zespan.com
    description: Zespan production API
security:
  - ApiKeyAuth: []
tags:
  - name: Ingestion
    description: Send traces and events to Zespan.
  - name: OpenTelemetry
    description: OTLP-compatible ingestion endpoints.
  - name: Prompts
    description: Manage versioned prompts and their labels, tags, and folders.
  - name: Datasets
    description: Read datasets and manage dataset runs used for experiments and scoring.
  - name: Guardrails
    description: Runtime guardrail evaluation.
paths:
  /v1/prompts/{name}/folder:
    patch:
      tags:
        - Prompts
      summary: Move a prompt to a folder
      description: >
        Move a prompt family into a folder path, or to the root by passing
        `null`. The folder is applied to every version of the named prompt.
      operationId: movePromptToFolder
      parameters:
        - $ref: '#/components/parameters/PromptName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - folder
              properties:
                folder:
                  type: string
                  nullable: true
                  description: Folder path, or `null` for the root.
                  example: support/inbound
                projectId:
                  type: string
                  format: uuid
                  description: Optional when authenticating with an API key.
      responses:
        '200':
          description: Move result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  folder:
                    type: string
                    nullable: true
                    example: support/inbound
                  updatedCount:
                    type: integer
                    example: 3
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    PromptName:
      name: name
      in: path
      required: true
      schema:
        type: string
      description: Prompt name.
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
          example: Unauthorized
        code:
          type: string
          description: Machine-readable error code, when present.
          example: rate_limit_exceeded
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Project API key. Manage keys in the Zespan dashboard under project
        settings.

````