Skip to main content
POST
/
access_codes
/
update
await seam.accessCodes.update({
  access_code_id: "b854d7c9-d0d8-40a7-8a7c-cd3d167a6ce5",
  name: "My Updated Access Code",
  starts_at: "2025-06-19T08:26:41.000Z",
  ends_at: "2025-06-21T17:38:07.000Z",
  code: "4444",
});

/*
// void
*/
{
  "action_attempt": {
    "action_attempt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "result": {},
    "error": {
      "type": "<string>",
      "message": "<string>"
    }
  },
  "ok": true
}

Authorizations

Authorization
string
header
required

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

Body

application/json
access_code_id
string<uuid>
required

ID of the access code that you want to update.

allow_external_modification
boolean

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

attempt_for_offline_device
boolean
default:true
code
string

Code to be used for access.

Required string length: 4 - 9
Pattern: ^\d+$
device_id
string<uuid>

ID of the device containing the access code that you want to update.

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.

is_managed
boolean

Indicates whether the access code is managed through Seam. Note that to convert an unmanaged access code into a managed access code, use /access_codes/unmanaged/convert_to_managed.

is_offline_access_code
boolean

Indicates whether the access code is an offline access code.

is_one_time_use
boolean

Indicates whether the offline access code is a single-use access code.

max_time_rounding
enum<string>
default:1hour

Maximum rounding adjustment. To create a daily-bound offline access code for devices that support this feature, set this parameter to 1d.

Available options:
1hour,
1day,
1h,
1d
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.

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).
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. 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.

starts_at
string

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

sync
boolean
default:false
type
enum<string>

Type to which you want to convert the access code. To convert a time-bound access code to an ongoing access code, set type to ongoing. See also Changing a time-bound access code to permanent access.

Available options:
ongoing,
time_bound
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.

use_offline_access_code
boolean
deprecated

Response

OK

action_attempt
object
required

Tracks the progress of this operation. Poll using the action_attempt_id.

ok
boolean
required