Create an Access Code
Create an access code for a device by ID
Creates a new access code.
ID of the device for which you want to create the new access code.
Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes.
Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`.
To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints.
To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components).
Date and time at which the validity of the new access code starts, in ISO 8601 format.
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.
Code to be used for access.
^\d+$falsetrueKey to identify access codes that should have the same code. Any two access codes with the same common_code_key are guaranteed to have the same code. See also Creating and Updating Multiple Linked Access Codes.
Indicates whether native scheduling should be used for time-bound codes when supported by the provider. Default: true.
Indicates whether to use a backup access code pool provided by Seam. If true, you can use /access_codes/pull_backup_access_code.
Indicates whether external modification of the code is allowed. Default: false.
Indicates whether external modification of the code is allowed. Default: false.
Preferred code length. Only applicable if you do not specify a code. If the affected device does not support the preferred code length, Seam reverts to using the shortest supported code length.
Indicates whether the access code is an offline access code.
Indicates whether the offline access code is a single-use access code.
Maximum rounding adjustment. To create a daily-bound offline access code for devices that support this feature, set this parameter to 1d.
1hourPossible values: OK
Bad Request
Unauthorized
Code Examples
Creating an Ongoing Access Code
Creating a Time-Bound Access Code
Creating an Hourly-Bound Offline Access Code
Creating a Daily-Bound Offline Access Code
Creating a One-Time-Use Offline Access Code
Parameters
Response
JSON format
Last updated
Was this helpful?

