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

# Create a Space

> Creates a new space.



## OpenAPI

````yaml /openapi.json post /spaces/create
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/create:
    post:
      tags: []
      summary: Create a Space
      description: Creates a new space.
      operationId: spacesCreatePost
      requestBody:
        content:
          application/json:
            schema:
              properties:
                acs_entrance_ids:
                  description: IDs of the entrances that you want to add to the new space.
                  items:
                    format: uuid
                    type: string
                  type: array
                connected_account_ids:
                  description: >-
                    IDs of connected accounts to associate with the new space.
                    Persisted on seam.location_third_party_account so the UI can
                    show which provider account(s) a space came from.
                  items:
                    format: uuid
                    type: string
                  type: array
                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 for which you want to create the space.
                  minLength: 1
                  type: string
                device_ids:
                  description: IDs of the devices that you want to add to the new space.
                  items:
                    format: uuid
                    type: string
                  type: array
                name:
                  description: Name of the space that you want to create.
                  type: string
                space_key:
                  description: Unique key for the space within the workspace.
                  type: string
              required:
                - name
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  ok:
                    type: boolean
                  space:
                    $ref: '#/components/schemas/space'
                required:
                  - space
                  - 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.create({
              name: "My Space",
              device_ids: ["b7254403-db91-4e10-bb7b-31d0615d2963"],
              acs_entrance_ids: ["46a47667-a90b-45cc-9bb6-f0917464f1f3"],
            });

            /*
            {
              "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/create" \
              --header "Authorization: Bearer $SEAM_API_KEY" \
              --json @- <<EOF
            {
              "name": "My Space",
              "device_ids": [
                "b7254403-db91-4e10-bb7b-31d0615d2963"
              ],
              "acs_entrance_ids": [
                "46a47667-a90b-45cc-9bb6-f0917464f1f3"
              ]
            }

            EOF


            # Response:

            # {

            #   "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: python
          label: Seam SDK
          source: |-
            seam.spaces.create(
                name="My Space",
                device_ids=["b7254403-db91-4e10-bb7b-31d0615d2963"],
                acs_entrance_ids=["46a47667-a90b-45cc-9bb6-f0917464f1f3"],
            )

            # 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.create(
              name: "My Space",
              device_ids: ["b7254403-db91-4e10-bb7b-31d0615d2963"],
              acs_entrance_ids: ["46a47667-a90b-45cc-9bb6-f0917464f1f3"],
            )

            # => {
              "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->create(
                name: "My Space",
                device_ids: ["b7254403-db91-4e10-bb7b-31d0615d2963"],
                acs_entrance_ids: ["46a47667-a90b-45cc-9bb6-f0917464f1f3"],
            );

            // [
                "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 create --name "My Space" --device_ids
            ["b7254403-db91-4e10-bb7b-31d0615d2963"] --acs_entrance_ids
            ["46a47667-a90b-45cc-9bb6-f0917464f1f3"]


            # {

            #   "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:
    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

````