Skip to main content
PUT
Creates new access codes that share a common code across multiple devices. Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a common_code_key. That is, common_code_key remains null for these access codes. If you want to change these access codes that are not linked by a common_code_key, you cannot use /access_codes/update_multiple. However, you can update each of these access codes individually, using /access_codes/update. See also Creating and Updating Multiple Linked Access Codes. For granting a person access to a space, Access Grants are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
device_ids
string<uuid>[]
required

IDs of the devices for which you want to create the new access codes.

allow_external_modification
boolean

Indicates whether external modification of the code is allowed. Default: false.

attempt_for_offline_device
boolean
default:true
behavior_when_code_cannot_be_shared
enum<string>
default:throw

Desired behavior if any device cannot share a code. If throw (default), no access codes will be created if any device cannot share a code. If create_random_code, a random code will be created on devices that cannot share a code.

Available options:
throw,
create_random_code
code
string

Code to be used for access.

Required string length: 4 - 12
Pattern: ^\d+$
ends_at
string

Date and time at which the validity of the new access code ends, in ISO 8601 format. Must be a time in the future and after starts_at.

is_external_modification_allowed
boolean

Indicates whether external modification of the code is allowed. Default: false.

name
string

Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes.

prefer_native_scheduling
boolean

Indicates whether native scheduling should be used for time-bound codes when supported by the provider. Default: true.

preferred_code_length
number<float>

Preferred code length. If the affected devices do not support the preferred code length, Seam reverts to using the shortest supported code length.

starts_at
string

Date and time at which the validity of the new access code starts, in ISO 8601 format.

use_backup_access_code_pool
boolean

Indicates whether to use a backup access code pool provided by Seam. If true, you can use /access_codes/pull_backup_access_code.

Response

OK

access_codes
object[]
required