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

# List Sites

> Returns a list of sites in a workspace.

export const ReadinessBadge = ({type}) => {
  const validTags = ["beta", "alpha", "experimental"];
  const tagText = type?.trim().toLowerCase();
  if (!tagText || !validTags.includes(tagText)) return null;
  useEffect(() => {
    const titleElement = document.querySelector("#page-title, .page-title, h1");
    if (!titleElement) return;
    if (titleElement.querySelector(".badge")) return;
    const badge = document.createElement("span");
    badge.className = `badge ${tagText}-badge`;
    badge.textContent = tagText;
    badge.style.transform = "translateY(-3px)";
    titleElement.appendChild(badge);
  }, []);
  return null;
};

<ReadinessBadge type="beta" />


## OpenAPI

````yaml GET /v2/sites
openapi: 3.1.0
info:
  title: Makeswift API
  description: Documentation for the Makeswift public REST API.
  version: '1.0'
servers:
  - url: https://api.makeswift.com
    description: Production server
security:
  - Authentication: []
tags:
  - name: Authentication
    description: ''
  - name: Workspace
    description: ''
  - name: Workspace Member
    description: ''
  - name: Site
    description: ''
  - name: Locale
    description: ''
  - name: Route
    description: ''
  - name: Page
    description: ''
  - name: Webhook Management
    description: ''
paths:
  /v2/sites:
    get:
      tags:
        - Site
      summary: List Sites
      description: Returns a list of sites in a workspace.
      operationId: SiteController_listV2_v2
      parameters:
        - name: workspaceId
          in: query
          description: The workspace ID to list sites from.
          required: true
          schema:
            type: string
            format: uuid
        - name: limit
          in: query
          description: The maximum number of sites to return.
          required: false
          schema:
            type: number
            default: 20
            maximum: 100
            minimum: 1
        - name: startingAfter
          in: query
          description: >-
            The pagination cursor. This is used to indicate what ID to list
            from.
          required: false
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSiteV2ResponseBodyDto'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponseDto'
components:
  schemas:
    ListSiteV2ResponseBodyDto:
      type: object
      properties:
        object:
          type: string
          example: list
          enum:
            - list
        data:
          type: array
          items:
            type: object
            properties:
              object:
                description: The type of the object
                type: string
                example: site
                enum:
                  - site
              id:
                type: string
                format: uuid
              name:
                description: The site name.
                type: string
                example: Hearth Furniture Company
              hostOrigin:
                description: >-
                  The public URL where your site is hosted. This is the URL that
                  Makeswift uses to render your site for editing.
                type: string
                format: uri
                example: https://hearthfurniture.com
                nullable: true
              publicApiKey:
                description: >-
                  The publishable API key that a host can use to get page and
                  component data for rendering your site.
                type: string
                format: uuid
              defaultLocale:
                description: The primary locale of this site.
                type: string
                example: en-US
                examples:
                  - en
                  - es
                  - fr-FR
                  - ar-EG
                  - ja-JP
            required:
              - object
              - id
              - name
              - hostOrigin
              - publicApiKey
              - defaultLocale
        hasMore:
          description: The flag that indicates whether there are more sites available.
          type: boolean
      required:
        - object
        - data
        - hasMore
    ForbiddenResponseDto:
      type: object
      properties:
        object:
          type: string
          enum:
            - error
        code:
          type: string
          enum:
            - forbidden
        message:
          type: string
      required:
        - object
        - code
        - message
  securitySchemes:
    Authentication:
      type: apiKey
      in: header
      name: x-api-key
      description: |-
        API key authentication. Accepts either:
        - App API key (e.g. sk_eczMHVBY9fV6GYFhvs53qcnxq7yptlXL3ABKOZtn6dQ)
        - Site API key (UUID format, e.g. 550e8400-e29b-41d4-a716-446655440000)

````