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

# Fetch project blocks

> Returns the blocks in a Ditto project, in display order. Blocks group text items within a project.



## OpenAPI

````yaml openapi.json get /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:
    get:
      tags:
        - Project Blocks
      summary: Fetch project blocks
      description: >-
        Returns the blocks in a Ditto project, in display order. Blocks group
        text items within a project.
      parameters:
        - schema:
            type: string
            description: Developer ID of the project to list blocks for
          required: true
          description: Developer ID of the project to list blocks for
          name: projectId
          in: query
      responses:
        '200':
          description: Returns an array of blocks in the project, in display order
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: The Developer ID of the block
                    name:
                      type: string
                      description: The name of the block
                  required:
                    - id
                    - name
                example:
                  - id: header
                    name: Header
                  - id: footer
                    name: Footer
        '400':
          description: >-
            Returned when the project id does not match any project in the
            workspace
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message describing the validation failure
                required:
                  - message
              example:
                message: Project with ID my-project not found
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````