Mapping Your Resources to Seam Resources

Learn how Seam makes it easy to tag Seam resources with your own internal IDs.

Seam enables you to set a custom unique key on each instance of resources, like Spaces, User Identities, and Access Grants. Use these keys to map your own data—such as rooms, listings, or reservations—to the corresponding Seam resources. In addition, you can link your own customers with the Connect Webviews and resulting Connected Accounts that they use to connect their devices and systems to Seam.

Resource keys make it easier to cross-reference and sync information between your systems and Seam.

Each resource includes a <resource>_key property in which you can store your own identifier. For example:

Resource keys of each type generally need to be unique within your workspace. For example, if you save a Space with the space_key room-101-id, you cannot create another Space with this key.

The one exception is with customer_key, where you can create multiple Connect Webviews using the same customer_key.

The guide describes how to add resources keys to Seam resources of various relevant types and also how to retrieve a Seam resource using a resource key.


Associating Connected Accounts with Your Customers

Connected Accounts represent connections that your customers set up with their own devices or access systems through your app. You embed a Connect Webview in your app, and your customers establish these connections by authenticating their device or system accounts through the pre-built Connect Webview flow. Each successful connection creates a Connected Account in your Seam workspace. Each Connected Account is linked to a specific customer.

When you create an instance of a Connect Webview, you can tag it with a customer key. When your customer completes the authentication flow through this Connect Webview, Seam automatically copies the customer_key to the resulting Connected Account. You can then use the customer_key to retrieve the Connected Account consistently.

Create a Connect Webview for a Specific Customer

Code:

seam.connect_webviews.create(
  accepted_providers = your_list_of_providers,
  customer_key = "customer-id" # Your unique identifier for the customer
)

Output:

ConnectWebview(
  connect_webview_id='12345678-1234-1234-1234-123456789012',
  customer_key='customer-id',
  ...
)

Retrieve All Connected Accounts for a Specific Customer

Once your customer has completed the Connect Webview authentication flow, and Seam has copied the customer_key to the resulting Connected Account, you can list all Connected Accounts associated with a specific customer_key tag. Then, you can also list all devices or systems associated with the customer, using the retrieved Connected Account ID.

Code:

connected_accounts = seam.connected_accounts.list(
  customer_key="customer-id"
)

customer_systems = []

for account in connected_accounts:
  systems = seam.acs.systems.list(
    connected_account_id=account.connected_account_id
  )
  
  customer_systems.extend(systems)
    
pprint(customer_systems)

Output:

[
  AcsSystem(
    connected_account_id="11111111-1111-1111-1111-111111111111",
    acs_system_id="22222222-2222-2222-2222-222222222222",
    name="Salto KS Site",
    ...
  ),
  AcsSystem(
    connected_account_id="11111111-1111-1111-1111-111111111111",
    acs_system_id="33333333-3333-3333-3333-333333333333",
    name="Salto Space Site",
    ...
  ),
  ...
]

Any accounts that your customer sets up also carry this customer_key, so you can associate their connected systems with their properties, Spaces, and reservations in your own database.


Associating a Seam Space with Your Own Resource

When you create a Seam space resource, you can include your own ID as the value for the space_key. Some examples of resources that you could tie to a Space include hotel rooms, apartments, or common area amenities.

Code:

seam.spaces.create(
  name = "Valley Grove - Room 104",
  acs_entrance_ids = [unit_104_entrance.acs_entrance_id],
  space_key = "room-104-id" # Your room ID
)

Output:

Space(
  space_id='44444444-4444-4444-4444-444444444444',
  name='Valley Grove - Room 104',
  space_key='room-104-id',
  ...
)

Associating a Seam User Identity with Your User

You can use the user_identity_key to link a Seam User Identity with your ID for a user, such as a hotel guest, resident, and so on.

Code:

seam.user_identities.create(
  full_name = "Jane Doe",
  user_identity_key = "user-123-id" # Your end user ID
)

Output:

UserIdentity(
  user_identity_id='55555555-5555-5555-5555-555555555555',
  full_name='Jane Doe',
  user_identity_key='user-123-id',
  ...
)

Associating a Seam Access Grant with Your Own Resource

You can add your own booking or lease reference to a Seam Access Grant as an access_grant_key. Some examples of resources that you could tie to an Access Grant include a guest booking, apartment lease, or gym day pass.

Code:

seam.access_grants.create(
  user_identity_id=user_identity.user_identity_id,
  starts_at="2025-08-13T15:00:00.000Z",
  ends_at="2025-08-16T11:00:00.000Z",
  requested_access_methods=[
    {"mode": "mobile_key"}
  ],
  space_ids=[room_104_id],
  access_grant_key="booking-789-id" # Your booking or lease reference
)

Output:

AccessGrant(
  access_grant_id="66666666-6666-6666-6666-666666666666",
  access_grant_key="booking-789-id",
  starts_at="2025-08-13T15:00:00.000Z",
  ends_at="2025-08-16T11:00:00.000Z",
  user_identity_id="55555555-5555-5555-5555-555555555555",
  space_ids=[ "44444444-4444-4444-4444-444444444444" ],
  requested_access_methods=[
    {
      "display_name": "Mobile Key",
      "mode": "mobile_key",
      "created_access_method_ids": ["77777777-7777-7777-7777-777777777777"],
      ...
    }
  ],
  instant_key_url="https://ik.seam.co/ABCXYZ",
  ...
)

Retrieving a Resource Using the <resource>_key

Once you have linked your resources to Seam resources using resource keys, you can retrieve a Seam resource using your custom unique identifier for it.

The following example retrieves a Seam Space using a space_key:

Code:

seam.spaces.get(
  space_key = "room-104-id"
)

Output:

Space(
  space_id='44444444-4444-4444-4444-444444444444',
  name='Valley Grove - Room 104',
  space_key='room-104-id',
  ...
)

The following example retrieves a Seam Access Grant using an access_grant_key:

Code:

seam.access_grants.get(
  access_grant_key = "booking-789-id"
)

Output:

AccessGrant(
  access_grant_id="66666666-6666-6666-6666-666666666666",
  access_grant_key="booking-789-id",
  starts_at="2025-08-13T15:00:00.000Z",
  ends_at="2025-08-16T11:00:00.000Z",
  user_identity_id="55555555-5555-5555-5555-555555555555",
  space_ids=[ "44444444-4444-4444-4444-444444444444" ],
  requested_access_methods=[
    {
      "display_name": "Mobile Key",
      "mode": "mobile_key",
      "created_access_method_ids": ["77777777-7777-7777-7777-777777777777"],
      ...
    }
  ],
  instant_key_url="https://ik.seam.co/ABCXYZ",
  ...
)

Last updated

Was this helpful?