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

# List Spaces

> Returns a list of all spaces.



## OpenAPI

````yaml /openapi.json post /spaces/list
openapi: 3.0.0
info:
  title: Seam Connect
  version: 1.0.0
servers:
  - url: https://connect.getseam.com
security: []
tags:
  - description: access_codes
    name: /access_codes
  - description: acs
    name: /acs
  - description: action_attempts
    name: /action_attempts
  - description: client_sessions
    name: /client_sessions
  - description: connected_accounts
    name: /connected_accounts
  - description: connect_webviews
    name: /connect_webviews
  - description: devices
    name: /devices
  - description: events
    name: /events
  - description: health
    name: /health
  - description: locks
    name: /locks
  - description: networks
    name: /networks
  - description: noise_sensors
    name: /noise_sensors
  - description: phones
    name: /phones
  - description: thermostats
    name: /thermostats
  - description: user_identities
    name: /user_identities
  - description: webhooks
    name: /webhooks
  - description: workspaces
    name: /workspaces
paths:
  /spaces/list:
    post:
      tags: []
      summary: List Spaces
      description: Returns a list of all spaces.
      operationId: spacesListPost
      requestBody:
        content:
          application/json:
            schema:
              properties:
                connected_account_id:
                  description: >-
                    Filter spaces to only include those that contain devices or
                    access control systems belonging to the specified connected
                    account.
                  format: uuid
                  type: string
                  x-draft: Needs review.
                  x-undocumented: Only used internally.
                customer_key:
                  description: Customer key for which you want to list spaces.
                  type: string
                limit:
                  default: 500
                  description: Maximum number of records to return per page.
                  format: float
                  type: number
                page_cursor:
                  description: >-
                    Identifies the specific page of results to return, obtained
                    from the previous page's `next_page_cursor`.
                  nullable: true
                  type: string
                parent_space_id:
                  description: >-
                    Filter spaces to only include those whose parent space has
                    the specified `parent_space_id`.
                  format: uuid
                  type: string
                  x-undocumented: Only used internally.
                parent_space_key:
                  description: >-
                    Filter spaces to only include those whose parent space has
                    the specified `parent_space_key`.
                  type: string
                  x-undocumented: Only used internally.
                search:
                  description: >-
                    String for which to search. Filters returned spaces to
                    include all records that satisfy a partial match using
                    `name`, `space_key`, or `customer_key`.
                  minLength: 1
                  type: string
                space_key:
                  description: Filter spaces by space_key.
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  ok:
                    type: boolean
                  pagination:
                    $ref: '#/components/schemas/pagination'
                  spaces:
                    items:
                      $ref: '#/components/schemas/space'
                    type: array
                required:
                  - spaces
                  - pagination
                  - ok
                type: object
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      security:
        - pat_with_workspace: []
        - console_session_with_workspace: []
        - api_key: []
        - client_session_with_customer: []
      x-codeSamples:
        - lang: javascript
          label: Seam SDK
          source: |-
            await seam.spaces.list();

            /*
            [
              {
                "created_at": "2025-06-16T16:54:17.946600Z",
                "display_name": "My Space",
                "name": "My Space",
                "space_id": "5afeb047-3277-4102-b8c4-99edf05b91d2",
                "workspace_id": "96bd12f9-6def-4bf4-b517-760417451ae9"
              }
            ]
            */
        - lang: bash
          label: cURL
          source: >-
            curl --include --request POST
            "https://connect.getseam.com/spaces/list" \
              --header "Authorization: Bearer $SEAM_API_KEY"

            # Response:

            # {

            #   "spaces": [

            #     {

            #       "created_at": "2025-06-16T16:54:17.946600Z",

            #       "display_name": "My Space",

            #       "name": "My Space",

            #       "space_id": "5afeb047-3277-4102-b8c4-99edf05b91d2",

            #       "workspace_id": "96bd12f9-6def-4bf4-b517-760417451ae9"

            #     }

            #   ]

            # }
        - lang: python
          label: Seam SDK
          source: |-
            seam.spaces.list()

            # [
                Space(
                    created_at="2025-06-16T16:54:17.946600Z",
                    display_name="My Space",
                    name="My Space",
                    space_id="5afeb047-3277-4102-b8c4-99edf05b91d2",
                    workspace_id="96bd12f9-6def-4bf4-b517-760417451ae9",
                )
            ]
        - lang: ruby
          label: Seam SDK
          source: |-
            seam.spaces.list()

            # => [
              {
                "created_at" => "2025-06-16T16:54:17.946600Z",
                "display_name" => "My Space",
                "name" => "My Space",
                "space_id" => "5afeb047-3277-4102-b8c4-99edf05b91d2",
                "workspace_id" => "96bd12f9-6def-4bf4-b517-760417451ae9",
              },
            ]
        - lang: php
          label: Seam SDK
          source: |-
            $seam->spaces->list();

            // [
                [
                    "created_at" => "2025-06-16T16:54:17.946600Z",
                    "display_name" => "My Space",
                    "name" => "My Space",
                    "space_id" => "5afeb047-3277-4102-b8c4-99edf05b91d2",
                    "workspace_id" => "96bd12f9-6def-4bf4-b517-760417451ae9",
                ],
            ];
        - lang: bash
          label: Seam CLI
          source: |-
            seam spaces list

            # [
            #   {
            #     "created_at": "2025-06-16T16:54:17.946600Z",
            #     "display_name": "My Space",
            #     "name": "My Space",
            #     "space_id": "5afeb047-3277-4102-b8c4-99edf05b91d2",
            #     "workspace_id": "96bd12f9-6def-4bf4-b517-760417451ae9"
            #   }
            # ]
components:
  schemas:
    pagination:
      description: Information about the current page of results.
      properties:
        has_next_page:
          description: Indicates whether there is another page of results after this one.
          type: boolean
        next_page_cursor:
          description: >-
            Opaque value that can be used to select the next page of results via
            the `page_cursor` parameter.
          nullable: true
          type: string
        next_page_url:
          description: URL to get the next page of results.
          format: uri
          nullable: true
          type: string
      required:
        - next_page_cursor
        - has_next_page
        - next_page_url
      type: object
    space:
      description: >-
        Represents a space that is a logical grouping of devices and entrances.
        You can assign access to an entire space, thereby making granting access
        more efficient.
      properties:
        acs_entrance_count:
          description: Number of entrances in the space.
          format: float
          type: number
        created_at:
          description: Date and time at which the space was created.
          format: date-time
          type: string
        customer_data:
          description: Reservation/stay-related defaults for the space.
          properties:
            address:
              description: Postal address for the space.
              nullable: true
              type: string
            default_checkin_time:
              description: >-
                Default check-in time for reservations at the space, as HH:mm or
                HH:mm:ss.
              nullable: true
              pattern: ^([01]\d|2[0-3]):[0-5]\d(:[0-5]\d)?$
              type: string
            default_checkout_time:
              description: >-
                Default check-out time for reservations at the space, as HH:mm
                or HH:mm:ss.
              nullable: true
              pattern: ^([01]\d|2[0-3]):[0-5]\d(:[0-5]\d)?$
              type: string
            time_zone:
              description: IANA time zone for the space, e.g. America/Los_Angeles.
              nullable: true
              type: string
          type: object
        customer_key:
          description: Customer key associated with the space.
          type: string
        device_count:
          description: Number of devices in the space.
          format: float
          type: number
        display_name:
          description: Display name for the space.
          type: string
        geolocation:
          description: Geographic coordinates (latitude and longitude) of the space.
          nullable: true
          properties:
            latitude:
              description: Latitude of the space, in decimal degrees.
              format: float
              type: number
            longitude:
              description: Longitude of the space, in decimal degrees.
              format: float
              type: number
          required:
            - latitude
            - longitude
          type: object
        name:
          description: Name of the space.
          type: string
        parent_space_id:
          format: uuid
          type: string
          x-undocumented: Only used internally.
        parent_space_key:
          type: string
          x-undocumented: Only used internally.
        space_id:
          description: ID of the space.
          format: uuid
          type: string
        space_key:
          description: Unique key for the space within the workspace.
          type: string
        workspace_id:
          description: >-
            ID of the [workspace](https://docs.seam.co/core-concepts/workspaces)
            associated with the space.
          format: uuid
          type: string
      required:
        - space_id
        - workspace_id
        - name
        - display_name
        - created_at
        - device_count
        - acs_entrance_count
      type: object
      x-draft: Early access.
      x-route-path: /spaces
  securitySchemes:
    pat_with_workspace:
      bearerFormat: API Token
      scheme: bearer
      type: http
    console_session_with_workspace:
      bearerFormat: Console Session Token
      scheme: bearer
      type: http
    api_key:
      bearerFormat: API Key
      scheme: bearer
      type: http
    client_session_with_customer:
      bearerFormat: Customer Client Session Token
      scheme: bearer
      type: http

````