List Access Codes

Get all access codes

Returns a list of all access codes.

/access_codes/list

post

Returns a list of all access codes.

Specify either device_id or access_code_ids.

Authorizations
Body
customer_idsstring · uuid[]Optional
device_idstring · uuidOptional

ID of the device for which you want to list access codes. Specify either device_id or access_code_ids.

access_code_idsstring · uuid[]Optional

IDs of the access codes that you want to retrieve. Specify either device_id or access_code_ids.

user_identifier_keystringOptional

Your user ID for the user by which to filter access codes.

limitnumber · floatOptional

Numerical limit on the number of access codes to return.

Default: 55000
page_cursorstring | nullableOptional

Identifies the specific page of results to return, obtained from the previous page's next_page_cursor.

Responses
200
OK
application/json
post
POST /access_codes/list HTTP/1.1
Host: connect.getseam.com
Authorization: Bearer Client Session Token
Content-Type: application/json
Accept: */*
Content-Length: 231

{
  "customer_ids": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "device_id": "123e4567-e89b-12d3-a456-426614174000",
  "access_code_ids": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "user_identifier_key": "text",
  "limit": 55000,
  "page_cursor": "text"
}
{
  "access_codes": [
    {
      "common_code_key": "text",
      "is_scheduled_on_device": true,
      "type": "time_bound",
      "is_waiting_for_code_assignment": true,
      "access_code_id": "123e4567-e89b-12d3-a456-426614174000",
      "device_id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "code": "text",
      "created_at": "2025-07-01T03:08:32.832Z",
      "errors": [
        {
          "message": "text",
          "is_access_code_error": true,
          "created_at": "2025-07-01T03:08:32.832Z",
          "error_code": "smartthings_failed_to_set_access_code"
        }
      ],
      "warnings": [
        {
          "message": "text",
          "created_at": "2025-07-01T03:08:32.832Z",
          "warning_code": "smartthings_failed_to_set_access_code"
        }
      ],
      "is_managed": true,
      "starts_at": "2025-07-01T03:08:32.832Z",
      "ends_at": "2025-07-01T03:08:32.832Z",
      "status": "setting",
      "is_backup_access_code_available": true,
      "is_backup": true,
      "pulled_backup_access_code_id": "123e4567-e89b-12d3-a456-426614174000",
      "is_external_modification_allowed": true,
      "is_one_time_use": true,
      "is_offline_access_code": true
    }
  ],
  "pagination": {
    "next_page_cursor": "text",
    "has_next_page": true,
    "next_page_url": "https://example.com"
  },
  "ok": true
}

Request

Filter the list of returned access codes by device ID or access code IDs. You can also filter by user identifier key. You must include at least device_id or access_code_ids.

Request Body Parameters

Parameter
Type
Description

device_id

String (UUID) Optional

ID of the devices for which to retrieve access codes.

access_code_ids

Array of strings (UUIDs) Optional

IDs of the access codes to retrieve.

user_identifier_key

String Optional

Your own internal user ID for the user by which to filter access codes.

Sample Request

seam.access_codes.list(
  device_id="11111111-1111-1111-1111-444444444444"
)

Response

Returns an access_codes array, in which each returned access code (access_code) contains the set of applicable access code properties. For details, see Access Codes.

Sample Response

[
  AccessCode(
    access_code_id='1bbd1eba-e4a2-4f96-b1b9-8498a5405b2b',
    device_id='11111111-1111-1111-1111-444444444444',
    type='time_bound',
    code='2345',
    created_at='2023-10-19T02:21:58.738Z',
    errors=[],
    warnings=[],
    starts_at='2025-01-01T16:00:00.000Z',
    ends_at='2025-01-22T12:00:00.000Z',
    name='my time-bound code',
    status='unset',
    common_code_key=None,
    is_managed=True,
    is_waiting_for_code_assignment=None,
    is_scheduled_on_device=False,
    pulled_backup_access_code_id=None,
    is_backup_access_code_available=False,
    is_backup=None,
    appearance=None,
    is_external_modification_allowed=False
  ),
  ...
]

Last updated

Was this helpful?

Revision created

Merge branch 'main' into beta