Skip to main content
PIN codes are the simplest access method. When you request a code access method in an Access Grant, Seam programs a PIN code onto the lock. Your user enters the code on the lock’s keypad to unlock the door. PIN codes work with:
  • Standalone smart locks — August, Yale, Schlage, Lockly, TTLock, Tedee, igloohome, and other connected locks. Specify the locks with device_ids.
  • Access control systems — Salto KS, Salto Space, Brivo, dormakaba, and other ACS platforms that support PIN-based credentials. Specify entrances with acs_entrance_ids or group access points into spaces and use space_ids.

Before You Begin

To use PIN codes, you need:
  • A Seam API key
  • One or more connected devices or ACS entrances that support PIN codes
  • For standalone smart locks: confirm that can_program_online_access_codes is true on the device
  • For ACS entrances: confirm that can_unlock_with_code is true on the entrance

Step 1: Verify Device or Entrance Support

Standalone Smart Locks

List your devices and confirm that can_program_online_access_codes is true.
const devices = await seam.devices.list()

const pinCapableDevices = devices.filter(
  (d) => d.can_program_online_access_codes
)

ACS Entrances

List the entrances for your ACS and confirm that can_unlock_with_code is true.
const entrances = await seam.acs.entrances.list({
  acs_system_id: 'c359cba2-8ef2-47fc-bee0-1c7c2a886339',
})

const codeEntrances = entrances.filter(
  (e) => e.can_unlock_with_code
)

Step 2: Create an Access Grant with a PIN Code

Create an Access Grant specifying code as the requested access method mode. You can target devices, entrances, or spaces.
const accessGrant = await seam.accessGrants.create({
  user_identity_id: '22222222-2222-2222-2222-222222222222',
  device_ids: ['6ba7b811-9dad-11d1-80b4-00c04fd430c8'],
  requested_access_methods: [
    { mode: 'code' }
  ],
  starts_at: '2025-07-13T15:00:00.000Z',
  ends_at: '2025-07-16T11:00:00.000Z',
})
In a sandbox workspace, PIN codes are issued almost instantly. On real devices, issuance can take a few moments. Poll the access method until is_issued is true or watch for the access_method.issued event.

Step 3: Retrieve the PIN Code

Once the access method is issued, list the access methods for the Access Granlist the access methods for the Access Grant to get the code. Share the code with your user through text, email, or your application.
const accessMethods = await seam.accessMethods.list({
  access_grant_id: accessGrant.access_grant_id,
})

const pinCode = accessMethods[0]
console.log(pinCodes = await seam.accessMethods.list({
  access_grant_id: accessGrant.access_grant_id,
})

const pinCode = accessMethods[0]
console.log(pinCode.code) // => "1234"
Output:
{
  "access_method_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "display_name": "PIN Code",
  "mode": "code",
  "is_issued": true,
  "issued_at": "2025-06-16T16:55:03.924353Z",
  "code": "1234",
  ...
}

Step 4: See Which Doors an Access Method Covers

An access method can cover multiple doors — for example, if the Access Grant includes several devices or entrances. To see which doors a PIN code is programmed on, call /access_methods/get_related.
const related = await seam.accessMethods.getRelated({
  access_method_ids: [accessMethod.access_method_id],
})

console.log(related.devices) // devices this PIN code is programmed on
console.log(related.acs_entrances) // ACS entrances this PIN code unlocks

Next Steps