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

# Update project blocks

> Updates a set of blocks in a Ditto project. Each block is identified by its developer ID. Only provided fields are modified — omitted fields remain unchanged. To rename a block's developer ID, set newDeveloperId.



## OpenAPI

````yaml openapi.json patch /projectBlocks
openapi: 3.0.0
info:
  version: 1.0.0
  title: Ditto API
  description: Programmatically read and write data in your Ditto workspace.
servers:
  - url: https://api.dittowords.com/v2
security: []
paths:
  /projectBlocks:
    patch:
      tags:
        - Project Blocks
      summary: Update project blocks
      description: >-
        Updates a set of blocks in a Ditto project. Each block is identified by
        its developer ID. Only provided fields are modified — omitted fields
        remain unchanged. To rename a block's developer ID, set newDeveloperId.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                projectId:
                  type: string
                  description: Developer ID of the project the blocks belong to
                updates:
                  type: array
                  items:
                    type: object
                    properties:
                      developerId:
                        type: string
                        description: The block's current developer ID
                      name:
                        type: string
                        description: >-
                          New name for the block. If not provided, name remains
                          unchanged.
                      newDeveloperId:
                        type: string
                        description: >-
                          A new developer ID for this block. Must be unique
                          within the project. Can be set alongside a name change
                          in the same update object.
                    required:
                      - developerId
                  minItems: 1
                  description: Array of updates to blocks
              required:
                - projectId
                - updates
              example:
                projectId: my-project
                updates:
                  - developerId: hero-section
                    name: Hero
            examples:
              update_name:
                summary: Rename a block
                value:
                  projectId: my-project
                  updates:
                    - developerId: hero-section
                      name: Hero
              update_developer_id:
                summary: Change a block's developer ID
                value:
                  projectId: my-project
                  updates:
                    - developerId: hero-section
                      newDeveloperId: hero
      responses:
        '200':
          description: Returns success status of the update operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates whether the update was successful
                required:
                  - success
                example:
                  success: true
        '400':
          description: >-
            Returned when the request body fails validation. Common causes
            include: the project id not matching any project in the workspace, a
            developer ID that does not match any existing block in the project,
            or a newDeveloperId that already exists in the project.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message describing the validation failure
                required:
                  - message
              example:
                message: Block id not found
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````