---
title: "Create a Connect Webview"
method: POST
path: "/connect_webviews/create"
tags: ["/connect_webviews"]
---

# Create a Connect Webview

`POST /connect_webviews/create`

Creates a new [Connect Webview](/core-concepts/connect-webviews).

To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview.

You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users.

See also: [Connect Webview Process](/core-concepts/connect-webviews/connect-webview-process).

## Request body

- object
  - `accepted_capabilities` string[] — List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. If not provided, defaults will be determined based on the accepted providers.
  - `accepted_providers` string[] — Accepted device provider keys as an alternative to `provider_category`. Use this parameter to specify accepted providers explicitly. See [Customize the Brands to Display in Your Connect Webviews](/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). To list all provider keys, use [`/devices/list_device_providers`](/api/devices/list_device_providers) with no filters.
  - `automatically_manage_new_devices` boolean — Indicates whether newly-added devices should appear as [managed devices](/core-concepts/devices/managed-and-unmanaged-devices). See also: [Customize the Behavior Settings of Your Connect Webviews](/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-behavior-settings-of-your-connect-webviews).
  - `custom_metadata` object — Custom metadata that you want to associate with the Connect Webview. Supports up to 50 JSON key:value pairs. [Adding custom metadata to a Connect Webview](/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview) enables you to store custom information, like customer details or internal IDs from your application. The custom metadata is then transferred to any [connected accounts](/core-concepts/connected-accounts) that were connected using the Connect Webview, making it easy to find and filter these resources in your [workspace](/core-concepts/workspaces). You can also [filter Connect Webviews by custom metadata](/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata).
  - `custom_redirect_failure_url` string — Alternative URL that you want to redirect the user to on an error. If you do not set this parameter, the Connect Webview falls back to the `custom_redirect_url`.
  - `custom_redirect_url` string — URL that you want to redirect the user to after the provider login is complete.
  - `customer_key` string — Associate the Connect Webview, the connected account, and all resources under the connected account with a customer. If the connected account already exists, it will be associated with the customer. If the connected account already exists, but is already associated with a customer, the Connect Webview will show an error.
  - `excluded_providers` string[] — List of provider keys to exclude from the Connect Webview. These providers will not be shown when the user tries to connect an account.
  - `provider_category` 'stable' | 'consumer_smartlocks' | 'beta' | 'thermostats' | 'noise_sensors' | 'access_control_systems' | 'cameras' | 'connectors' | 'internal_beta' — Specifies the category of providers that you want to include. To list all providers within a category, use [`/devices/list_device_providers`](/api/devices/list_device_providers) with the desired `provider_category` filter.
  - `wait_for_device_creation` boolean — Indicates whether Seam should finish syncing all devices in a newly-connected account before completing the associated Connect Webview. See also: [Customize the Behavior Settings of Your Connect Webviews](/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-behavior-settings-of-your-connect-webviews).

## Response `200`

OK

- object
  - `connect_webview` ConnectWebview, required — Represents a [Connect Webview](/core-concepts/connect-webviews). See the [connect_webview object](/api/connect_webviews/object).
    - `accepted_capabilities` string[], required — High-level device capabilities that the Connect Webview can accept. When creating a Connect Webview, you can specify the types of devices that it can connect to Seam. If you do not set custom `accepted_capabilities`, Seam uses a default set of `accepted_capabilities` for each provider. For example, if you create a Connect Webview that accepts SmartThing devices, without specifying `accepted_capabilities`, Seam accepts only SmartThings locks. To connect SmartThings thermostats and locks to Seam, create a Connect Webview and include both `thermostat` and `lock` in the `accepted_capabilities`.
    - `accepted_providers` string[], required — List of accepted [provider keys](/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews).
    - `any_provider_allowed` boolean, required — Indicates whether any provider is allowed.
    - `authorized_at` string, date-time, nullable, required — Date and time at which the user authorized (through the Connect Webview) the management of their devices.
    - `automatically_manage_new_devices` boolean, required — Indicates whether Seam should [import all new devices](/core-concepts/connect-webviews/customizing-connect-webviews#automatically_manage_new_devices) for the connected account to make these devices available for use and management by the Seam API.
    - `connect_webview_id` string, uuid, required — ID of the Connect Webview.
    - `connected_account_id` string, uuid, nullable, required — ID of the connected account associated with the Connect Webview.
    - `created_at` string, date-time, required — Date and time at which the Connect Webview was created.
    - `custom_metadata` object, required — Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application.
    - `custom_redirect_failure_url` string, uri, nullable, required — URL to which the Connect Webview should redirect when an unexpected error occurs.
    - `custom_redirect_url` string, uri, nullable, required — URL to which the Connect Webview should redirect when the user successfully pairs a device or system. If you do not set the `custom_redirect_failure_url`, the Connect Webview redirects to the `custom_redirect_url` when an unexpected error occurs.
    - `customer_key` string — The customer key associated with this webview, if any.
    - `device_selection_mode` 'none' | 'single' | 'multiple', required — Device selection mode of the Connect Webview. Supported values: `none`, `single`, `multiple`.
    - `login_successful` boolean, required — Indicates whether the user logged in successfully using the Connect Webview.
    - `selected_provider` string, nullable, required — Selected provider of the Connect Webview, one of the [provider keys](/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews).
    - `status` 'pending' | 'failed' | 'authorized', required — Status of the Connect Webview. `authorized` indicates that the user has successfully logged into their device or system account, thereby completing the Connect Webview.
    - `url` string, uri, required — URL for the Connect Webview. You use the URL to display the Connect Webview flow to your user.
    - `wait_for_device_creation` boolean, required — Indicates whether Seam should [finish syncing all devices](/core-concepts/connect-webviews/customizing-connect-webviews#wait_for_device_creation) in a newly-connected account before completing the associated Connect Webview.
    - `workspace_id` string, uuid, required — ID of the workspace that contains the Connect Webview.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized

---

[API](https://skmtc.net/seam/apis/seam-connect.md) · [All operations](https://skmtc.net/seam/apis/seam-connect/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/seam/seam-connect/versions/00c35395ce12/schema)
