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

# Actualizar diapositiva

> Actualiza los archivos fuente de una diapositiva. Valida antes de guardar.



## OpenAPI

````yaml PUT /projects/{slug}/slides/{slideId}
openapi: 3.1.0
info:
  title: Faces API
  version: '1.0'
  description: >-
    Faces API for creating and managing presentations. Generate presentations
    from prompts, or read and write individual slides. Each slide is a React
    component (face.tsx) with content blocks (face.content.json) and editor
    controls (face.controls.json).
servers:
  - url: https://faces.app/api/v1
    description: API v1
security:
  - bearerAuth: []
paths:
  /projects/{slug}/slides/{slideId}:
    put:
      tags:
        - Slides
      summary: Update slide files
      description: >-
        Update a slide's source files. Only provided files are changed. The code
        is compiled and validated before saving — returns 400 with detailed
        errors if it doesn't compile. Workflow: start_slide_editing → get_slide
        → updateSlide → finish_slide_editing.
      operationId: updateSlide
      parameters:
        - schema:
            type: string
          required: true
          name: slug
          in: path
        - schema:
            type: string
          required: true
          name: slideId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                files:
                  type: object
                  properties:
                    face.tsx:
                      type: string
                      description: >-
                        React component. Must default-export a component with
                        w-full h-full outer div. MUST import content/controls
                        from sibling JSON files. Can import any npm package
                        (auto-resolved). Use Tailwind CSS and container queries
                        for desktop sizing per the slide authoring guide.
                        Base/mobile typography must fit the 9:16 canvas; use
                        moderate mobile headings and scale up behind the
                        project's desktop container breakpoint for presentation
                        sizes. Google Fonts via: import { Inter } from
                        'next/font/google'. Custom CSS via: import './face.css'.
                    face.content.json:
                      type: string
                      description: >-
                        Editable content blocks. ALL visible text must go here —
                        never hardcode text in face.tsx. Structure: { "blocks":
                        { "key": { "type": "text"|"image"|"icon"|"table", ... }
                        } }. Text: { "type": "text", "content": "HTML" }
                        rendered with <TextContent>. Image: { "type": "image",
                        "src": "url" }. Icon: { "type": "icon", "name":
                        "lucide-icon-name" } rendered with <Icon>. Table: {
                        "type": "table", "columns": [...], "rows": [...] }.
                    face.controls.json:
                      type: string
                      description: >-
                        Editor controls. Always add controls for sizes, spacing,
                        visibility, layout. Structure: { "controls": { "key": {
                        "type": "slider"|"switch"|"selector", ... } } }. Slider:
                        { "type": "slider", "min": 0, "max": 100, "step": 1,
                        "value": 50 }. Switch: { "type": "switch", "value": true
                        }. Selector: { "type": "selector", "options": ["A",
                        "B"], "value": "A" }. Access: controls.key?.value ??
                        default.
                  description: Slide source files. Only include files you want to update.
              required:
                - files
      responses:
        '200':
          description: Slide updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  slideId:
                    type: string
                  versionId:
                    type: string
                    description: The new project version ID.
                  files:
                    type: object
                    properties:
                      face.tsx:
                        type: string
                        description: >-
                          React component. Must default-export a component with
                          w-full h-full outer div. MUST import content/controls
                          from sibling JSON files. Can import any npm package
                          (auto-resolved). Use Tailwind CSS and container
                          queries for desktop sizing per the slide authoring
                          guide. Base/mobile typography must fit the 9:16
                          canvas; use moderate mobile headings and scale up
                          behind the project's desktop container breakpoint for
                          presentation sizes. Google Fonts via: import { Inter }
                          from 'next/font/google'. Custom CSS via: import
                          './face.css'.
                      face.content.json:
                        type: string
                        description: >-
                          Editable content blocks. ALL visible text must go here
                          — never hardcode text in face.tsx. Structure: {
                          "blocks": { "key": { "type":
                          "text"|"image"|"icon"|"table", ... } } }. Text: {
                          "type": "text", "content": "HTML" } rendered with
                          <TextContent>. Image: { "type": "image", "src": "url"
                          }. Icon: { "type": "icon", "name": "lucide-icon-name"
                          } rendered with <Icon>. Table: { "type": "table",
                          "columns": [...], "rows": [...] }.
                      face.controls.json:
                        type: string
                        description: >-
                          Editor controls. Always add controls for sizes,
                          spacing, visibility, layout. Structure: { "controls":
                          { "key": { "type": "slider"|"switch"|"selector", ... }
                          } }. Slider: { "type": "slider", "min": 0, "max": 100,
                          "step": 1, "value": 50 }. Switch: { "type": "switch",
                          "value": true }. Selector: { "type": "selector",
                          "options": ["A", "B"], "value": "A" }. Access:
                          controls.key?.value ?? default.
                    description: Slide source files. Only include files you want to update.
                required:
                  - slideId
                  - versionId
                  - files
        '400':
          description: >-
            Validation or compilation error. Returns detailed errors if the
            slide code doesn't compile.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          description: Error description.
                        file:
                          type: string
                          description: File path where the error occurred.
                        type:
                          type: string
                          description: >-
                            Error type (e.g. build_error,
                            invalid_content_schema, missing_face_files).
                      required:
                        - message
                        - type
                required:
                  - error
                  - errors
        '404':
          description: Project or slide not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        hint:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key with "faces_" prefix. Create one at Settings > Developers.

````