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

# Create a Workspace

> Creates a new [workspace](/core-concepts/workspaces).



## OpenAPI

````yaml /openapi.json post /workspaces/create
openapi: 3.0.0
info:
  description: >-
    Programmable API to control locks, thermostats, noise sensors, cameras,
    access control systems, and other IoT devices.


    Prefer the official Seam SDKs over hand-written HTTP calls: they handle

    authentication, request serialization, pagination, and error handling for

    you. The official SDKs are listed in this document under

    `info.x-seam-sdks`.


    If you call the HTTP API directly, your query parameters must be

    serialized compatibly with the Seam API. There is no universal convention

    for serializing arrays, booleans, or nested objects in a query string, so

    use @seamapi/url-search-params-serializer, the language specific serializer
    module provided by each Seam SDK, or follow its specification:

    https://github.com/seamapi/url-search-params-serializer
  title: Seam Connect
  version: 1.0.0
  x-seam-query-serializer:
    description: >-
      Reference implementation and specification for query parameter
      serialization compatible with the Seam API.
    url: https://github.com/seamapi/url-search-params-serializer
  x-seam-sdks:
    - language: javascript
      url: https://github.com/seamapi/javascript
    - language: python
      url: https://github.com/seamapi/python
    - language: ruby
      url: https://github.com/seamapi/ruby
    - language: php
      url: https://github.com/seamapi/php
    - language: csharp
      url: https://github.com/seamapi/csharp
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:
  /workspaces/create:
    post:
      tags:
        - /workspaces
      summary: Create a Workspace
      description: Creates a new [workspace](/core-concepts/workspaces).
      operationId: workspacesCreatePost
      requestBody:
        content:
          application/json:
            schema:
              properties:
                company_name:
                  deprecated: true
                  description: |-
                    Deprecated. Use `connect_partner_name` instead.

                    Company name for the new workspace.
                  type: string
                connect_partner_name:
                  description: Connect partner name for the new workspace.
                  nullable: true
                  type: string
                connect_webview_customization:
                  description: >-
                    [Connect Webview](/core-concepts/connect-webviews)
                    customizations for the new workspace. See also [Customize
                    the Look and Feel of Your Connect
                    Webviews](/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
                  properties:
                    logo_shape:
                      description: >-
                        Logo shape for [Connect
                        Webviews](/core-concepts/connect-webviews) in the new
                        workspace. See also [Customize the Look and Feel of Your
                        Connect
                        Webviews](/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
                      enum:
                        - circle
                        - square
                      nullable: true
                      type: string
                    primary_button_color:
                      description: >-
                        Primary button color for [Connect
                        Webviews](/core-concepts/connect-webviews) in the new
                        workspace. See also [Customize the Look and Feel of Your
                        Connect
                        Webviews](/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
                      nullable: true
                      type: string
                    primary_button_text_color:
                      description: >-
                        Primary button text color for [Connect
                        Webviews](/core-concepts/connect-webviews) in the new
                        workspace. See also [Customize the Look and Feel of Your
                        Connect
                        Webviews](/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
                      nullable: true
                      type: string
                    success_message:
                      description: >-
                        Success message for [Connect
                        Webviews](/core-concepts/connect-webviews) in the new
                        workspace. See also [Customize the Look and Feel of Your
                        Connect
                        Webviews](/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
                      nullable: true
                      type: string
                  type: object
                is_sandbox:
                  default: false
                  description: >-
                    Indicates whether the new workspace is a [sandbox
                    workspace](/core-concepts/workspaces#sandbox-workspaces).
                  type: boolean
                name:
                  description: Name of the new workspace.
                  type: string
                organization_id:
                  description: >-
                    ID of the organization to associate with the new workspace.
                    If omitted, the new workspace is associated with the
                    organization that you administer, if you administer exactly
                    one. If you administer no organization, Seam creates one for
                    you and associates the new workspace with it.
                  format: uuid
                  type: string
                webview_logo_shape:
                  deprecated: true
                  enum:
                    - circle
                    - square
                  type: string
                  description: >-
                    Deprecated. Use
                    `connect_webview_customization.webview_logo_shape` instead.
                webview_primary_button_color:
                  deprecated: true
                  type: string
                  description: >-
                    Deprecated. Use
                    `connect_webview_customization.webview_primary_button_color`
                    instead.
                webview_primary_button_text_color:
                  deprecated: true
                  type: string
                  description: >-
                    Deprecated. Use
                    `connect_webview_customization.webview_primary_button_text_color`
                    instead.
                webview_success_message:
                  deprecated: true
                  type: string
                  description: >-
                    Deprecated. Use
                    `connect_webview_customization.webview_success_message`
                    instead.
              required:
                - name
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  workspace:
                    $ref: '#/components/schemas/workspace'
                required:
                  - workspace
                type: object
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      security:
        - pat_without_workspace: []
        - console_session_with_workspace: []
        - console_session_without_workspace: []
      x-codeSamples:
        - lang: javascript
          label: Seam SDK
          source: |-
            await seam.workspaces.create({
              name: "My Sandbox Workspace",
              company_name: "Acme",
              connect_partner_name: "Acme",
              is_sandbox: true,
              is_publishable_key_auth_enabled: true,
              publishable_key: "seam_pk1fGd41X_zKs0ZELRTEc8nWxiBsEXAMPLE",
              webview_primary_button_color: "#232426",
              webview_primary_button_text_color: "#FFFDE7",
              webview_logo_shape: "circle",
              webview_success_message:
                "Your account has been successfully connected to Acme!",
              connect_webview_customization: {
                inviter_logo_url:
                  "https://connect.getseam.com/internal/images/view?image_id=1de135fa-f0c2-4e57-90d0-6b9a7d090a0c",
                logo_shape: "circle",
                primary_button_color: "#232426",
                primary_button_text_color: "#FFFDE7",
                success_message: "Your account has been successfully connected to Acme!",
              },
            });

            /*
            {
              "company_name": "Acme",
              "connect_partner_name": "Acme",
              "connect_webview_customization": {
                "inviter_logo_url": "https://connect.getseam.com/internal/images/view?image_id=1de135fa-f0c2-4e57-90d0-6b9a7d090a0c",
                "logo_shape": "circle",
                "primary_button_color": "#232426",
                "primary_button_text_color": "#FFFDE7",
                "success_message": "Your account has been successfully connected to Acme!"
              },
              "is_sandbox": true,
              "is_publishable_key_auth_enabled": true,
              "publishable_key": "seam_pk1fGd41X_zKs0ZELRTEc8nWxiBsEXAMPLE",
              "is_suspended": false,
              "name": "My Sandbox Workspace",
              "workspace_id": "6a0b6282-6a98-4fef-811e-0904c485ac7a"
            }
            */
        - lang: bash
          label: cURL
          source: >-
            curl --include --request POST
            "https://connect.getseam.com/workspaces/create" \
              --header "Authorization: Bearer $SEAM_API_KEY" \
              --json @- <<EOF
            {
              "name": "My Sandbox Workspace",
              "company_name": "Acme",
              "connect_partner_name": "Acme",
              "is_sandbox": true,
              "is_publishable_key_auth_enabled": true,
              "publishable_key": "seam_pk1fGd41X_zKs0ZELRTEc8nWxiBsEXAMPLE",
              "webview_primary_button_color": "#232426",
              "webview_primary_button_text_color": "#FFFDE7",
              "webview_logo_shape": "circle",
              "webview_success_message": "Your account has been successfully connected to Acme!",
              "connect_webview_customization": {
                "inviter_logo_url": "https://connect.getseam.com/internal/images/view?image_id=1de135fa-f0c2-4e57-90d0-6b9a7d090a0c",
                "logo_shape": "circle",
                "primary_button_color": "#232426",
                "primary_button_text_color": "#FFFDE7",
                "success_message": "Your account has been successfully connected to Acme!"
              }
            }

            EOF


            # Response:

            # {

            #   "workspace": {

            #     "company_name": "Acme",

            #     "connect_partner_name": "Acme",

            #     "connect_webview_customization": {

            #       "inviter_logo_url":
            "https://connect.getseam.com/internal/images/view?image_id=1de135fa-f0c2-4e57-90d0-6b9a7d090a0c",

            #       "logo_shape": "circle",

            #       "primary_button_color": "#232426",

            #       "primary_button_text_color": "#FFFDE7",

            #       "success_message": "Your account has been successfully
            connected to Acme!"

            #     },

            #     "is_sandbox": true,

            #     "is_publishable_key_auth_enabled": true,

            #     "publishable_key": "seam_pk1fGd41X_zKs0ZELRTEc8nWxiBsEXAMPLE",

            #     "is_suspended": false,

            #     "name": "My Sandbox Workspace",

            #     "workspace_id": "6a0b6282-6a98-4fef-811e-0904c485ac7a"

            #   }

            # }
        - lang: python
          label: Seam SDK
          source: |-
            seam.workspaces.create(
                name="My Sandbox Workspace",
                company_name="Acme",
                connect_partner_name="Acme",
                is_sandbox=true,
                is_publishable_key_auth_enabled=true,
                publishable_key="seam_pk1fGd41X_zKs0ZELRTEc8nWxiBsEXAMPLE",
                webview_primary_button_color="#232426",
                webview_primary_button_text_color="#FFFDE7",
                webview_logo_shape="circle",
                webview_success_message="Your account has been successfully connected to Acme!",
                connect_webview_customization={
                    "inviter_logo_url": "https://connect.getseam.com/internal/images/view?image_id=1de135fa-f0c2-4e57-90d0-6b9a7d090a0c",
                    "logo_shape": "circle",
                    "primary_button_color": "#232426",
                    "primary_button_text_color": "#FFFDE7",
                    "success_message": "Your account has been successfully connected to Acme!",
                },
            )

            # Workspace(
                company_name="Acme",
                connect_partner_name="Acme",
                connect_webview_customization={
                    "inviter_logo_url": "https://connect.getseam.com/internal/images/view?image_id=1de135fa-f0c2-4e57-90d0-6b9a7d090a0c",
                    "logo_shape": "circle",
                    "primary_button_color": "#232426",
                    "primary_button_text_color": "#FFFDE7",
                    "success_message": "Your account has been successfully connected to Acme!",
                },
                is_sandbox=true,
                is_publishable_key_auth_enabled=true,
                publishable_key="seam_pk1fGd41X_zKs0ZELRTEc8nWxiBsEXAMPLE",
                is_suspended=false,
                name="My Sandbox Workspace",
                workspace_id="6a0b6282-6a98-4fef-811e-0904c485ac7a",
            )
        - lang: ruby
          label: Seam SDK
          source: |-
            seam.workspaces.create(
              name: "My Sandbox Workspace",
              company_name: "Acme",
              connect_partner_name: "Acme",
              is_sandbox: true,
              is_publishable_key_auth_enabled: true,
              publishable_key: "seam_pk1fGd41X_zKs0ZELRTEc8nWxiBsEXAMPLE",
              webview_primary_button_color: "#232426",
              webview_primary_button_text_color: "#FFFDE7",
              webview_logo_shape: "circle",
              webview_success_message: "Your account has been successfully connected to Acme!",
              connect_webview_customization: {
                inviter_logo_url:
                  "https://connect.getseam.com/internal/images/view?image_id=1de135fa-f0c2-4e57-90d0-6b9a7d090a0c",
                logo_shape: "circle",
                primary_button_color: "#232426",
                primary_button_text_color: "#FFFDE7",
                success_message: "Your account has been successfully connected to Acme!",
              },
            )

            # => {
              "company_name" => "Acme",
              "connect_partner_name" => "Acme",
              "connect_webview_customization" => {
                inviter_logo_url:
                  "https://connect.getseam.com/internal/images/view?image_id=1de135fa-f0c2-4e57-90d0-6b9a7d090a0c",
                logo_shape: "circle",
                primary_button_color: "#232426",
                primary_button_text_color: "#FFFDE7",
                success_message: "Your account has been successfully connected to Acme!",
              },
              "is_sandbox" => true,
              "is_publishable_key_auth_enabled" => true,
              "publishable_key" => "seam_pk1fGd41X_zKs0ZELRTEc8nWxiBsEXAMPLE",
              "is_suspended" => false,
              "name" => "My Sandbox Workspace",
              "workspace_id" => "6a0b6282-6a98-4fef-811e-0904c485ac7a",
            }
        - lang: php
          label: Seam SDK
          source: |-
            $seam->workspaces->create(
                name: "My Sandbox Workspace",
                company_name: "Acme",
                connect_partner_name: "Acme",
                is_sandbox: true,
                is_publishable_key_auth_enabled: true,
                publishable_key: "seam_pk1fGd41X_zKs0ZELRTEc8nWxiBsEXAMPLE",
                webview_primary_button_color: "#232426",
                webview_primary_button_text_color: "#FFFDE7",
                webview_logo_shape: "circle",
                webview_success_message: "Your account has been successfully connected to Acme!",
                connect_webview_customization: [
                    "inviter_logo_url" =>
                        "https://connect.getseam.com/internal/images/view?image_id=1de135fa-f0c2-4e57-90d0-6b9a7d090a0c",
                    "logo_shape" => "circle",
                    "primary_button_color" => "#232426",
                    "primary_button_text_color" => "#FFFDE7",
                    "success_message" =>
                        "Your account has been successfully connected to Acme!",
                ],
            );

            // [
                "company_name" => "Acme",
                "connect_partner_name" => "Acme",
                "connect_webview_customization" => [
                    "inviter_logo_url" =>
                        "https://connect.getseam.com/internal/images/view?image_id=1de135fa-f0c2-4e57-90d0-6b9a7d090a0c",
                    "logo_shape" => "circle",
                    "primary_button_color" => "#232426",
                    "primary_button_text_color" => "#FFFDE7",
                    "success_message" =>
                        "Your account has been successfully connected to Acme!",
                ],
                "is_sandbox" => true,
                "is_publishable_key_auth_enabled" => true,
                "publishable_key" => "seam_pk1fGd41X_zKs0ZELRTEc8nWxiBsEXAMPLE",
                "is_suspended" => false,
                "name" => "My Sandbox Workspace",
                "workspace_id" => "6a0b6282-6a98-4fef-811e-0904c485ac7a",
            ];
        - lang: bash
          label: Seam CLI
          source: >-
            seam workspaces create --name "My Sandbox Workspace" --company_name
            "Acme" --connect_partner_name "Acme" --is_sandbox true
            --is_publishable_key_auth_enabled true --publishable_key
            "seam_pk1fGd41X_zKs0ZELRTEc8nWxiBsEXAMPLE"
            --webview_primary_button_color "#232426"
            --webview_primary_button_text_color "#FFFDE7" --webview_logo_shape
            "circle" --webview_success_message "Your account has been
            successfully connected to Acme!" --connect_webview_customization
            {"inviter_logo_url":"https://connect.getseam.com/internal/images/view?image_id=1de135fa-f0c2-4e57-90d0-6b9a7d090a0c","logo_shape":"circle","primary_button_color":"#232426","primary_button_text_color":"#FFFDE7","success_message":"Your
            account has been successfully connected to Acme!"}


            # {

            #   "company_name": "Acme",

            #   "connect_partner_name": "Acme",

            #   "connect_webview_customization": {

            #     "inviter_logo_url":
            "https://connect.getseam.com/internal/images/view?image_id=1de135fa-f0c2-4e57-90d0-6b9a7d090a0c",

            #     "logo_shape": "circle",

            #     "primary_button_color": "#232426",

            #     "primary_button_text_color": "#FFFDE7",

            #     "success_message": "Your account has been successfully
            connected to Acme!"

            #   },

            #   "is_sandbox": true,

            #   "is_publishable_key_auth_enabled": true,

            #   "publishable_key": "seam_pk1fGd41X_zKs0ZELRTEc8nWxiBsEXAMPLE",

            #   "is_suspended": false,

            #   "name": "My Sandbox Workspace",

            #   "workspace_id": "6a0b6282-6a98-4fef-811e-0904c485ac7a"

            # }
components:
  schemas:
    workspace:
      description: >-
        Represents a Seam [workspace](/core-concepts/workspaces). A workspace is
        a top-level entity that encompasses all other resources below it, such
        as devices, connected accounts, and Connect Webviews. Seam provides two
        types of workspaces. A [sandbox
        workspace](/core-concepts/workspaces#sandbox-workspaces) is a special
        type of workspace designed for testing code. See the [workspace
        object](/api/workspaces/object).
      properties:
        company_name:
          deprecated: true
          description: >-
            Deprecated. Use `connect_partner_name` instead.


            Company name associated with the
            [workspace](/core-concepts/workspaces).
          type: string
        connect_partner_name:
          description: >-
            Seam Connect partner name associated with the
            [workspace](/core-concepts/workspaces).
          nullable: true
          type: string
        connect_webview_customization:
          properties:
            inviter_logo_url:
              description: >-
                URL of the inviter logo for [Connect
                Webviews](/core-concepts/connect-webviews) in the workspace. See
                also [Customize the Look and Feel of Your Connect
                Webviews](/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
              type: string
            logo_shape:
              description: >-
                Logo shape for [Connect
                Webviews](/core-concepts/connect-webviews) in the workspace. See
                also [Customize the Look and Feel of Your Connect
                Webviews](/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
              enum:
                - circle
                - square
              type: string
            primary_button_color:
              description: >-
                Primary button color for [Connect
                Webviews](/core-concepts/connect-webviews) in the workspace. See
                also [Customize the Look and Feel of Your Connect
                Webviews](/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
              type: string
            primary_button_text_color:
              description: >-
                Primary button text color for [Connect
                Webviews](/core-concepts/connect-webviews) in the workspace. See
                also [Customize the Look and Feel of Your Connect
                Webviews](/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
              type: string
            success_message:
              description: >-
                Success message for [Connect
                Webviews](/core-concepts/connect-webviews) in the workspace. See
                also [Customize the Look and Feel of Your Connect
                Webviews](/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
              type: string
          type: object
        is_publishable_key_auth_enabled:
          description: >-
            Indicates whether publishable key authentication is enabled for this
            workspace.
          type: boolean
        is_sandbox:
          description: >-
            Indicates whether the workspace is a [sandbox
            workspace](/core-concepts/workspaces#sandbox-workspaces).
          type: boolean
        is_suspended:
          description: >-
            Indicates whether the [sandbox
            workspace](/core-concepts/workspaces#sandbox-workspaces) is
            suspended. Seam suspends sandbox workspaces that have not been
            accessed in 14 days.
          type: boolean
        name:
          description: Name of the [workspace](/core-concepts/workspaces).
          type: string
        organization_id:
          description: >-
            ID of the organization to which the workspace belongs, or `null` if
            the workspace is not assigned to an organization.
          format: uuid
          nullable: true
          type: string
        publishable_key:
          description: >-
            Publishable key for the [workspace](/core-concepts/workspaces). This
            key is used to identify the workspace in client-side applications.
          type: string
        workspace_id:
          description: ID of the workspace.
          format: uuid
          type: string
      required:
        - workspace_id
        - name
        - company_name
        - is_sandbox
        - connect_webview_customization
        - is_suspended
        - connect_partner_name
        - is_publishable_key_auth_enabled
        - organization_id
      type: object
      x-route-path: /workspaces
  securitySchemes:
    pat_without_workspace:
      bearerFormat: API Token
      scheme: bearer
      type: http
    console_session_with_workspace:
      bearerFormat: Console Session Token
      scheme: bearer
      type: http
    console_session_without_workspace:
      bearerFormat: Console Session Token
      scheme: bearer
      type: http

````