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

# Update folder

> All fields are optional. Omitted fields stay as-is. Renaming a folder updates its slug and runs the same uniqueness check as create. The workspace's default folder cannot be edited.



## OpenAPI

````yaml /openapi.json patch /v1/folders/{id}
openapi: 3.1.0
info:
  title: Lora API
  version: 1.0.0
  description: Internal API for managing company short links
servers:
  - url: https://api.uselora.com
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/folders/{id}:
    patch:
      tags:
        - Folders
      summary: Update folder
      description: >-
        All fields are optional. Omitted fields stay as-is. Renaming a folder
        updates its slug and runs the same uniqueness check as create. The
        workspace's default folder cannot be edited.
      operationId: updateFolder
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9abcdefghjkmnpqrstvwxyz]{8}$
            example: a1b2c3d4
          description: The folder's unique ID.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  description: Optional description for the folder
                  type:
                    - string
                    - 'null'
                name:
                  type: string
                  minLength: 3
                  maxLength: 190
                  description: >-
                    The folder name (3..190 chars). The slug is derived from
                    this server-side.
                  examples:
                    - Marketing
              additionalProperties: false
              title: UpdateFolderRequest
              description: Payload to update a folder
      responses:
        '200':
          description: The updated folder.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    pattern: ^[0-9abcdefghjkmnpqrstvwxyz]{8}$
                    description: The folder's unique ID.
                    examples:
                      - a1b2c3d4
                  name:
                    type: string
                  slug:
                    type: string
                  description:
                    type:
                      - string
                      - 'null'
                  isSystem:
                    type: boolean
                    description: >-
                      True for built-in folders such as the workspace default.
                      Folders you create are always false.
                  workspaceId:
                    type: string
                    description: ID of the workspace the folder belongs to.
                  creatorId:
                    type: string
                    description: ID of the user who created the folder.
                  createdAt:
                    type: string
                    description: ISO 8601 creation timestamp.
                  updatedAt:
                    type: string
                    description: ISO 8601 timestamp of the last update.
                required:
                  - createdAt
                  - creatorId
                  - description
                  - isSystem
                  - name
                  - slug
                  - updatedAt
                  - workspaceId
                  - id
                additionalProperties: false
                title: Folder
                description: A folder.
        '400':
          description: The request body failed validation or wasn't valid JSON.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  fieldErrors:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type: array
                      items:
                        type: string
                  requestId:
                    type: string
                    description: >-
                      Correlation identifier for support/debugging. Equals the
                      `X-Lora-Request-Id` response header.
                  traceId:
                    description: >-
                      Sentry trace ID when available for this request.
                      32-character lowercase hex string.
                    type: string
                    pattern: ^[0-9a-f]{32}$
                required:
                  - error
                  - requestId
                additionalProperties: false
          headers:
            X-Lora-Request-Id:
              description: >-
                Request correlation identifier. Matches the `requestId` field in
                the JSON error body.
              schema:
                type: string
        '401':
          description: Missing, malformed, unknown, or workspace-unscoped Bearer token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  requestId:
                    type: string
                    description: >-
                      Correlation identifier for support/debugging. Equals the
                      `X-Lora-Request-Id` response header.
                  traceId:
                    description: >-
                      Sentry trace ID when available for this request.
                      32-character lowercase hex string.
                    type: string
                    pattern: ^[0-9a-f]{32}$
                required:
                  - error
                  - requestId
                additionalProperties: false
          headers:
            X-Lora-Request-Id:
              description: >-
                Request correlation identifier. Matches the `requestId` field in
                the JSON error body.
              schema:
                type: string
        '403':
          description: >-
            The key lacks the required scope (`insufficient_scope`), the caller
            is no longer a workspace member (`no_permission`), or the target is
            the workspace's default folder (`system_folder`).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  requestId:
                    type: string
                    description: >-
                      Correlation identifier for support/debugging. Equals the
                      `X-Lora-Request-Id` response header.
                  traceId:
                    description: >-
                      Sentry trace ID when available for this request.
                      32-character lowercase hex string.
                    type: string
                    pattern: ^[0-9a-f]{32}$
                  required_scope:
                    description: >-
                      Set when `code` is `insufficient_scope`. The exact scope
                      name the route required, e.g. `shortcuts.write`.
                    type: string
                required:
                  - error
                  - requestId
                additionalProperties: false
          headers:
            X-Lora-Request-Id:
              description: >-
                Request correlation identifier. Matches the `requestId` field in
                the JSON error body.
              schema:
                type: string
        '404':
          description: Folder not found in this workspace.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  requestId:
                    type: string
                    description: >-
                      Correlation identifier for support/debugging. Equals the
                      `X-Lora-Request-Id` response header.
                  traceId:
                    description: >-
                      Sentry trace ID when available for this request.
                      32-character lowercase hex string.
                    type: string
                    pattern: ^[0-9a-f]{32}$
                required:
                  - error
                  - requestId
                additionalProperties: false
          headers:
            X-Lora-Request-Id:
              description: >-
                Request correlation identifier. Matches the `requestId` field in
                the JSON error body.
              schema:
                type: string
        '409':
          description: >-
            Another folder in the workspace already has this name
            (`folder_name_exists`).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  requestId:
                    type: string
                    description: >-
                      Correlation identifier for support/debugging. Equals the
                      `X-Lora-Request-Id` response header.
                  traceId:
                    description: >-
                      Sentry trace ID when available for this request.
                      32-character lowercase hex string.
                    type: string
                    pattern: ^[0-9a-f]{32}$
                required:
                  - error
                  - requestId
                additionalProperties: false
          headers:
            X-Lora-Request-Id:
              description: >-
                Request correlation identifier. Matches the `requestId` field in
                the JSON error body.
              schema:
                type: string
        '429':
          description: Rate limit exceeded. Wait `Retry-After` seconds before retrying.
          headers:
            Retry-After:
              schema:
                type: integer
                minimum: 1
              description: Seconds until the rate-limit window resets.
            X-Lora-Request-Id:
              description: >-
                Request correlation identifier. Matches the `requestId` field in
                the JSON error body.
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  requestId:
                    type: string
                    description: >-
                      Correlation identifier for support/debugging. Equals the
                      `X-Lora-Request-Id` response header.
                  traceId:
                    description: >-
                      Sentry trace ID when available for this request.
                      32-character lowercase hex string.
                    type: string
                    pattern: ^[0-9a-f]{32}$
                required:
                  - error
                  - requestId
                additionalProperties: false
        '500':
          description: >-
            An unexpected failure on the server. The body is `{ error:
            <message>, code: "internal_error", requestId: <id> }`, plus
            `traceId` when available. Idempotent operations (GET, DELETE) and
            writes that carry an `Idempotency-Key` header are safe to retry with
            exponential backoff. Other writes may have partially applied;
            surface the error to the caller instead of retrying blindly.
          headers:
            X-Lora-Request-Id:
              description: >-
                Request correlation identifier. Matches the `requestId` field in
                the JSON error body.
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    const: internal_error
                  requestId:
                    type: string
                    description: >-
                      Correlation identifier for support/debugging. Equals the
                      `X-Lora-Request-Id` response header.
                  traceId:
                    description: >-
                      Sentry trace ID when available for this request.
                      32-character lowercase hex string.
                    type: string
                    pattern: ^[0-9a-f]{32}$
                required:
                  - error
                  - code
                  - requestId
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````