Pull Backup Access Code

Pull a backup access code from Seam's backup access code pool

If you've opted-in to Seam's backup access code pool when creating an access code, you can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the the access code ends.

Code Examples

Pull a Backup Access Code

POST https://connect.getseam.com/access_codes/pull_backup_access_code

Pull a backup access code from Seam's backup access code pool for this access code. You can only pull backup access codes for time_bound codes. The pulled backup access code will be removed at the same time as the original access code.

Headers

NameTypeDescription

Authorization*

String

Bearer <API_KEY>

Request Body

NameTypeDescription

access_code_id*

String

Access Code ID

{
	"backup_access_code": {
		"access_code_id": "12525e70-9474-4bb6-a7f6-12bbe4166f36",
		"device_id": "1c459b4c-0008-4752-befc-bc18521247d4",
		"name": "Backup 12525e70 (Seam)",
		"code": "1970",
		"common_code_key": null,
		"type": "time_bound",
		"starts_at": "2023-05-11T11:16:10.359Z",
    "ends_at": "2022-08-13T19:23:42+0000"
		"status": "set",
		"created_at": "2023-05-11T11:16:10.359Z",
		"errors": [],
		"warnings": [],
		"is_managed": true,
    "is_backup": true
	},
	"ok": true
}

Pulling a Backup Access Code

seam.access_codes.pull_backup_access_code(
  access_code_id: "123e4567-e89b-12d3-a456-426614174000",
)

# <Seam::AccessCode:0x007cd58
#   code="669781"
#   name="Backup 123e4567 (Seam)"
#   type="time_bound"
#   starts_at="2022-08-12T19:23:42+0000"
#   ends_at="2022-08-13T19:23:42+0000"
#   is_backup=true
#   status="set"
#   created_at="2022-07-06T23:26:42.223Z"
#   access_code_id="f19bc8cb-15be-43af-bb52-f1a417e0ff09">

Parameters

access_code_id

type: string

ID of the Access Code

Response

This section shows the JSON response returned by the API. Since each language encapsulates this response inside objects specific to that language and/or implementation, the actual type in your language might differ from what’s written here.

JSON format

{
  "backup_access_code": {
    "access_code_id": "12525e70-9474-4bb6-a7f6-12bbe4166f36",
    "device_id": "1c459b4c-0008-4752-befc-bc18521247d4",
    "name": "Backup 12525e70 (Seam)",
    "code": "1988",
    "common_code_key": null,
    "type": "time_bound",
    "status": "set",
    "starts_at": "2022-08-12T19:23:42+0000",
    "ends_at": "2022-08-13T19:23:42+0000",
    "created_at": "2023-05-11T11:16:10.359Z",
    "errors": [],
    "warnings": [],
    "is_managed": true,
    "is_backup": true
  },
  "ok": true
}

Last updated

Logo

© Seam Labs, Inc. All rights reserved.