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

# Update an Individual File

> Updates an individual file inside a draft version.



## OpenAPI

````yaml /openapi.yaml put /v1/skills/{id}/versions/{version}/files
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/skills/{id}/versions/{version}/files:
    put:
      tags:
        - Skill Files
      summary: Update an Individual File
      description: Updates an individual file inside a draft version.
      operationId: updateSkillFile
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The ID or slug of the skill.
        - name: version
          in: path
          required: true
          schema:
            type: integer
          description: The version number.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertFileRequest'
      responses:
        '200':
          description: File saved successfully
      security:
        - BearerAuth: []
components:
  schemas:
    UpsertFileRequest:
      type: object
      properties:
        file_path:
          type: string
        content:
          type: string
      required:
        - file_path
        - content
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Use an access token retrieved from login (Bearer sess_...) or a
        programmatic API key (Bearer ak_...).

````