Get Started with Tedee Locks
Learn how to connect and control your Tedee locks with the Seam API.

Overview
Seam provides a universal API to connect and control many brands of locks, including Tedee. This guide provides a rapid introduction to connecting and controlling your Tedee locks using the Seam API. To learn more about other device brands supported by the Seam API, such as Yale, Schlage, and August, head over to our integration page.
For more details about the Seam Tedee integration, see the Tedee locks device integration guide.
1 — Install Seam SDK
Seam provides client libraries for many languages, such as JavaScript, Python, Ruby, PHP, and others, as well as a Postman collection and OpenAPI spec.
npm i seam
Once installed, sign up for Seam to get your API key and export it as an environment variable.
$ export SEAM_API_KEY=seam_test2ZTo_0mEYQW2TvNDCxG5Atpj85Ffw
2 — Link Your Tedee Account with Seam
To control your Tedee locks using the Seam API, you must first authorize your Seam workspace against your Tedee account. To do so, Seam provides Connect Webviews: pre-built UX flows that walk you through authorizing your application to control your Tedee sites.
Request a Connect Webview
// Use Seam SDK to create a Connect Webview with tedee as the provider
const createdConnectWebview = await seam.connectWebviews.create({
accepted_providers: ["tedee"]
});
// Print the created webview URL
console.log(createdConnectWebview.url);
Authorize Your Workspace
Navigate to the URL returned by the Webview object. Since you are using a sandbox workspace, complete the login flow by entering the Tedee sandbox test accounts credentials below:
email: [email protected]
password: 1234

Confirm the Connect Webview was successful by querying its status:
updated_webview = seam.connect_webviews.get(connect_webview_id: webview.connect_webview_id)
assert updated_webview.login_successful # true
3 — Retrieve Tedee Devices
After a Tedee account is linked with Seam, you can retrieve devices for this Tedee account. The Seam API exposes most of the device's properties such as battery level.
all_locks = seam.locks.list()
some_lock = all_locks[0]
assert some_lock.properties["online"] is True
assert some_lock.properties["battery_level"] is True
print(some_lock)
# Device(device_id='ffc4d67f-e3a6-4ef8-ac84-f3770750422a', device_type='tedee_lock', location=None, properties={'locked': True, 'online': True, 'manufacturer': 'tedee', 'battery_level': 1, 'tedee_metadata': {'bridge_id': 1, 'device_id': 1, 'bridge_name': "Jane's Bridge", 'device_name': 'Front Door', 'device_model': 'Lock PRO', 'serial_number': '111111-11111'}, 'supported_code_lengths': [5, 6, 7, 8], 'online_access_codes_enabled': True, 'offline_access_codes_enabled': True, 'supports_offline_access_codes': True, 'name': 'Front Door', 'model': {'display_name': 'Lock PRO', 'manufacturer_display_name': 'Tedee', 'accessory_keypad_supported': False, 'offline_access_codes_supported': False, 'online_access_codes_supported': True}, 'battery': {'level': 1, 'status': 'full'}, 'image_url': 'https://connect.getseam.com/assets/images/devices/unknown-lock.png', 'image_alt_text': 'Placeholder Lock Image', 'code_constraints': [{'constraint_type': 'no_ascending_or_descending_sequence'}, {'constraint_type': 'at_least_three_unique_digits'}], 'supports_backup_access_code_pool': True}, capabilities_supported=['access_code', 'battery', 'lock'], errors=[], warnings=[], connected_account_id='f1e093d9-7a11-4d04-8c7e-619a037bd11a', workspace_id='398d80b7-3f96-47c2-b85a-6f8ba21d07be', created_at='2024-02-08T19:47:43.810Z', is_managed=True)
4 — Locking & Unlocking a Door
Next, you can perform the basic action of locking and unlocking a door.
Lock a Door
POST /locks/lock_door HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"device_id": "text"
}
Returns a pending action result
No content
Unlock a door
POST
https://connect.getseam.com/locks/unlock_door
Request Body
device_id
String
# lock the door
seam.locks.lock_door(device_id: some_lock.device_id)
updated_lock = seam.locks.get(device_id: some_lock.device_id)
assert updated_lock.properties["locked"] is True
# Now unlock the door
seam.locks.unlock_door(device_id: some_lock.device_id)
updated_lock = seam.locks.get(device_id: some_lock.device_id)
assert updated_lock.properties["locked"] is False
5 — Setting Access Code on Tedee Lock
Some Tedee locks also have a keypad paired to them to program access codes. These codes can then be entered to unlock a Tedee lock.
The Seam API makes it easy to program both ongoing
codes and timebound
codes on a Tedee lock. You can find out more about Tedee lock access code in our core concept section on access codes.
# create an ongoing code
seam.access_codes.create(
device=some_lock,
code="492332",
name="Personal Access Code")
# create a timebound code
seam.access_codes.create(
device=some_lock,
code="498882",
name="My Temp Access Code",
starts_at="2028-08-12T19:23:42+0000",
ends_at="2028-08-13T19:23:42+0000")
# you can use a device or a device_id as the "device" parameter
seam.access_codes.list(device=some_lock)
Next Steps
Now that you've completed this guide, you can try to connect a real Tedee device. To do so, make sure to switch to a non-sandbox workspace and API key as real devices cannot be connected to sandbox workspaces.
In addition, if you'd like to explore other aspects of Seam, here is a list of helpful resources:
If you have any questions or want to report an issue, email us at [email protected].
Last updated
Was this helpful?