Get started with 4SUITES locks

Learn how to connect and control 4SUITES locks with the Seam API.


Seam provides a universal API to connect and control many brands of IoT devices and systems, including smart locks, access control systems (ACSs), thermostats, and noise sensors.

This guide gives you a rapid introduction to connecting and controlling your 4SUITES lock using the Seam API. For application developers, you can use the Seam API in your app, and your users can authorize your app to control their devices using Seam.

Seam supports the following 4SUITES locks:

To learn more about other IoT device and system brands that Seam supportsโ€”such as Yale, Schlage, Google Nest, and many moreโ€”visit our integration page.

This guide shows you how to install a Seam SDK and then control your 4SUITES lock using the Seam API.

Another easy way to learn about what you can do with the Seam API is to explore the interactive Seam CLI, which you can access from directly within the Seam Console.

โ–ถ๏ธ Go to the Seam Console!

Step 1: Install a Seam SDK

Seam provides client libraries for many languages, including JavaScript, Python, Ruby, PHP, and others, as well as a Postman collection and an OpenAPI spec.

First, install a Seam SDK, as follows:

npm i seam

Next, go to and sign up for Seam to get your API key.

Then, export your API key as an environment variable.

$ export SEAM_API_KEY=my_seam_api_key

Where my_seam_api_key is your API key.

This guide uses a sandbox workspace. You can only connect virtual devices and systems in this type of workspace. If you want to connect a real 4SUITES lock, use a non-sandbox workspace and API key.

To control your 4SUITES lock using the Seam API, you must first authorize your Seam workspace to connect to your 4SUITES account. If your application needs to connect to your users' 4SUITES accounts, Seam provides fully-embedded, customizable client-side Connect Webviews to collect their authorization securely. These user-friendly pre-built authorization flows walk your users through the process of granting your Seam workspace permission to control their 4SUITES locks. The Connect Webview presents a flow that prompts your users to enter their credentials for their 4SUITES account.

In this guide, you create a Connect Webview object. Then, you display the graphical component of the created Connect Webview and enter a set of sample credentials to connect a sandbox 4SUITES account.

This guide shows you how to create a Connect Webview programmatically using the Seam API.

The Seam Console provides another easy way to connect devices to your Seam workspace.

Go to On the Devices page, click + Add Devices. Then, see Authorize your workspace in this guide to complete the Connect Webview authorization flow.

Create a Connect Webview

Create a connect_webview object and then note the returned URL.


from seam import Seam

seam = Seam()  # Seam automatically uses your exported SEAM_API_KEY.

connect_webview = seam.connect_webviews.create(accepted_providers=["four_suites"])

assert connect_webview.login_successful is False

# Use the returned Connect Webview URL to display
# the Connect Webview authorization flow to your user.


Authorize your workspace

In a web browser, go to the URL that the Connect Webview object returned.

For application developers, you can redirect your user to this Connect Webview URL so that they can authorize your app to control their devices using Seam. We even provide a prebuilt Connect Account Button within our suite of Seam Components that help you build your device management flow.

Because you're using a sandbox workspace, you can connect Seam's test 4SUITES account. We provide virtual devices for each of the brands that we support. These sandbox devices and systems enable you to test your app with devices from multiple brands without the need to own all the corresponding physical devices.

Complete the Connect Webview authorization flow by entering the following 4SUITES sandbox account credentials:

  • Email:

  • Password: 1234

Confirm that authorization through the Connect Webview was successful by querying its status.


updated_connect_webview = seam.connect_webviews.get(connect_webview.connect_webview_id)

assert updated_connect_webview.login_successful is True # True



Step 3: Retrieve 4SUITES lock devices

When you link a 4SUITES account with Seam, we create a device object to represent each 4SUITES lock in your account. You can then retrieve these 4SUITES devices using the List Devices and Get Device endpoints.

The Seam API exposes each device's properties, such as the door lock status, power status, capabilities, and so on.


# Retrieve all devices, filtered by manufacturer,
# which is one of several filters that list() supports.
all_four_suites_locks = seam.devices.list(manufacturer="four_suites")

# Select the first device as an example.
front_door = all_four_suites_locks[0]

# Inspect specific properties.
assert["online"] is True # True
assert["locked"] is True # True

# View the entire returned device object.


  display_name='Lock 1',
    'manufacturer': 'four_suites',
    'online': True,
    'locked': True,
    'has_direct_power': True,

Step 4: Control your 4SUITES lock

Next, you can use the Seam API to control your lock.

Each device that you connect to Seam has a specific set of capabilities. These capabilities define the Seam API actions that you can use, such as remote unlock actions, programming access codes, and so on. Seam's intuitive and granular capability flags inform your application about what features and behaviors each device supports. Notice the capability flags within the code samples in this guide.

Try out the following actions on your 4SUITES lock:

Unlock your lock

To unlock a door, use the Unlock Door endpoint. Specify the device that you want to unlock by including the device_id in the request body. This endpoint returns an action attempt to track the progress of the unlock operation.


# Confirm that the device can remotely unlock.
# You're using a capability flag here!
if front_door.can_remotely_unlock:
  # Perform the unlock operation
  # and return an action attempt.



You can track the status of the unlock operation to confirm that the device unlocked successfully. Query the locked status of the device, retrieve the action attempt by ID, or look for a lock.unlocked event.

To query the locked status of the device:


# Get the device by ID.
updated_front_door = seam.devices.get(device_id=front_door.device_id)

# Inspect the locked property to confirm
# that the unlock operation was successful.
assert["locked"] is False # False