> ## Documentation Index
> Fetch the complete documentation index at: https://www.seam.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List Unmanaged Access Codes

> Returns a list of all [unmanaged access codes](/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes).



## OpenAPI

````yaml /openapi.json get /access_codes/unmanaged/list
openapi: 3.0.0
info:
  description: >-
    Programmable API to control locks, thermostats, noise sensors, cameras,
    access control systems, and other IoT devices.


    Prefer the official Seam SDKs over hand-written HTTP calls: they handle

    authentication, request serialization, pagination, and error handling for

    you. The official SDKs are listed in this document under

    `info.x-seam-sdks`.


    If you call the HTTP API directly, your query parameters must be

    serialized compatibly with the Seam API. There is no universal convention

    for serializing arrays, booleans, or nested objects in a query string, so

    use @seamapi/url-search-params-serializer, the language specific serializer
    module provided by each Seam SDK, or follow its specification:

    https://github.com/seamapi/url-search-params-serializer
  title: Seam Connect
  version: 1.0.0
  x-seam-query-serializer:
    description: >-
      Reference implementation and specification for query parameter
      serialization compatible with the Seam API.
    url: https://github.com/seamapi/url-search-params-serializer
  x-seam-sdks:
    - language: javascript
      url: https://github.com/seamapi/javascript
    - language: python
      url: https://github.com/seamapi/python
    - language: ruby
      url: https://github.com/seamapi/ruby
    - language: php
      url: https://github.com/seamapi/php
    - language: csharp
      url: https://github.com/seamapi/csharp
servers:
  - url: https://connect.getseam.com
security: []
tags:
  - description: access_codes
    name: /access_codes
  - description: acs
    name: /acs
  - description: action_attempts
    name: /action_attempts
  - description: client_sessions
    name: /client_sessions
  - description: connected_accounts
    name: /connected_accounts
  - description: connect_webviews
    name: /connect_webviews
  - description: devices
    name: /devices
  - description: events
    name: /events
  - description: health
    name: /health
  - description: locks
    name: /locks
  - description: networks
    name: /networks
  - description: noise_sensors
    name: /noise_sensors
  - description: phones
    name: /phones
  - description: thermostats
    name: /thermostats
  - description: user_identities
    name: /user_identities
  - description: webhooks
    name: /webhooks
  - description: workspaces
    name: /workspaces
paths:
  /access_codes/unmanaged/list:
    get:
      tags:
        - /access_codes
      summary: List Unmanaged Access Codes
      description: >-
        Returns a list of all [unmanaged access
        codes](/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes).
      operationId: accessCodesUnmanagedListGet
      parameters:
        - in: query
          name: device_id
          required: true
          schema:
            description: >-
              ID of the device for which you want to list unmanaged access
              codes.
            format: uuid
            type: string
        - in: query
          name: user_identifier_key
          required: false
          schema:
            description: >-
              Your user ID for the user by which to filter unmanaged access
              codes.
            minLength: 1
            type: string
        - in: query
          name: limit
          required: false
          schema:
            default: 300000
            description: Numerical limit on the number of unmanaged access codes to return.
            format: float
            type: number
        - in: query
          name: search
          required: false
          schema:
            description: >-
              String for which to search. Filters returned access codes to
              include all records that satisfy a partial match using `name`,
              `code` or `access_code_id`.
            minLength: 1
            type: string
        - in: query
          name: page_cursor
          required: false
          schema:
            description: >-
              Identifies the specific page of results to return, obtained from
              the previous page's `next_page_cursor`.
            nullable: true
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  access_codes:
                    items:
                      $ref: '#/components/schemas/unmanaged_access_code'
                    type: array
                  pagination:
                    $ref: '#/components/schemas/pagination'
                required:
                  - access_codes
                  - pagination
                type: object
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      security:
        - client_session: []
        - client_session_with_customer: []
        - client_session_with_customer_ro: []
        - pat_with_workspace: []
        - console_session_with_workspace: []
        - api_key: []
        - support_read_only_token: []
      x-codeSamples:
        - lang: javascript
          label: Seam SDK
          source: |-
            await seam.accessCodes.unmanaged.list({
              device_id: "d885a24c-5741-49b1-85dc-ff6d5cf2f1b1",
            });

            /*
            [
              {
                "access_code_id": "88fa1812-bef8-4108-9fb4-4855376c3edf",
                "code": "1234",
                "created_at": "2025-06-16T16:54:17.946283Z",
                "device_id": "d885a24c-5741-49b1-85dc-ff6d5cf2f1b1",
                "ends_at": "2025-06-23T16:54:17.946261Z",
                "errors": [],
                "is_managed": false,
                "name": "My Unmanaged Access Code",
                "starts_at": "2025-06-21T16:54:17.946261Z",
                "status": "set",
                "type": "time_bound",
                "warnings": [],
                "workspace_id": "750fc0bc-4450-4356-8d9f-18c6a3a6b2c7"
              }
            ]
            */
        - lang: bash
          label: cURL
          source: >-
            curl --include --request POST
            "https://connect.getseam.com/access_codes/unmanaged/list" \
              --header "Authorization: Bearer $SEAM_API_KEY" \
              --json @- <<EOF
            {
              "device_id": "d885a24c-5741-49b1-85dc-ff6d5cf2f1b1"
            }

            EOF


            # Response:

            # {

            #   "access_codes": [

            #     {

            #       "access_code_id": "88fa1812-bef8-4108-9fb4-4855376c3edf",

            #       "code": "1234",

            #       "created_at": "2025-06-16T16:54:17.946283Z",

            #       "device_id": "d885a24c-5741-49b1-85dc-ff6d5cf2f1b1",

            #       "ends_at": "2025-06-23T16:54:17.946261Z",

            #       "errors": [],

            #       "is_managed": false,

            #       "name": "My Unmanaged Access Code",

            #       "starts_at": "2025-06-21T16:54:17.946261Z",

            #       "status": "set",

            #       "type": "time_bound",

            #       "warnings": [],

            #       "workspace_id": "750fc0bc-4450-4356-8d9f-18c6a3a6b2c7"

            #     }

            #   ]

            # }
        - lang: python
          label: Seam SDK
          source: >-
            seam.access_codes.unmanaged.list(device_id="d885a24c-5741-49b1-85dc-ff6d5cf2f1b1")


            # [
                UnmanagedAccessCode(
                    access_code_id="88fa1812-bef8-4108-9fb4-4855376c3edf",
                    code="1234",
                    created_at="2025-06-16T16:54:17.946283Z",
                    device_id="d885a24c-5741-49b1-85dc-ff6d5cf2f1b1",
                    ends_at="2025-06-23T16:54:17.946261Z",
                    errors=[],
                    is_managed=false,
                    name="My Unmanaged Access Code",
                    starts_at="2025-06-21T16:54:17.946261Z",
                    status="set",
                    type="time_bound",
                    warnings=[],
                    workspace_id="750fc0bc-4450-4356-8d9f-18c6a3a6b2c7",
                )
            ]
        - lang: ruby
          label: Seam SDK
          source: >-
            seam.access_codes.unmanaged.list(device_id:
            "d885a24c-5741-49b1-85dc-ff6d5cf2f1b1")


            # => [
              {
                "access_code_id" => "88fa1812-bef8-4108-9fb4-4855376c3edf",
                "code" => "1234",
                "created_at" => "2025-06-16T16:54:17.946283Z",
                "device_id" => "d885a24c-5741-49b1-85dc-ff6d5cf2f1b1",
                "ends_at" => "2025-06-23T16:54:17.946261Z",
                "errors" => [],
                "is_managed" => false,
                "name" => "My Unmanaged Access Code",
                "starts_at" => "2025-06-21T16:54:17.946261Z",
                "status" => "set",
                "type" => "time_bound",
                "warnings" => [],
                "workspace_id" => "750fc0bc-4450-4356-8d9f-18c6a3a6b2c7",
              },
            ]
        - lang: php
          label: Seam SDK
          source: |-
            $seam->access_codes->unmanaged->list(
                device_id: "d885a24c-5741-49b1-85dc-ff6d5cf2f1b1",
            );

            // [
                [
                    "access_code_id" => "88fa1812-bef8-4108-9fb4-4855376c3edf",
                    "code" => "1234",
                    "created_at" => "2025-06-16T16:54:17.946283Z",
                    "device_id" => "d885a24c-5741-49b1-85dc-ff6d5cf2f1b1",
                    "ends_at" => "2025-06-23T16:54:17.946261Z",
                    "errors" => [],
                    "is_managed" => false,
                    "name" => "My Unmanaged Access Code",
                    "starts_at" => "2025-06-21T16:54:17.946261Z",
                    "status" => "set",
                    "type" => "time_bound",
                    "warnings" => [],
                    "workspace_id" => "750fc0bc-4450-4356-8d9f-18c6a3a6b2c7",
                ],
            ];
        - lang: bash
          label: Seam CLI
          source: >-
            seam access-codes unmanaged list --device_id
            "d885a24c-5741-49b1-85dc-ff6d5cf2f1b1"


            # [

            #   {

            #     "access_code_id": "88fa1812-bef8-4108-9fb4-4855376c3edf",

            #     "code": "1234",

            #     "created_at": "2025-06-16T16:54:17.946283Z",

            #     "device_id": "d885a24c-5741-49b1-85dc-ff6d5cf2f1b1",

            #     "ends_at": "2025-06-23T16:54:17.946261Z",

            #     "errors": [],

            #     "is_managed": false,

            #     "name": "My Unmanaged Access Code",

            #     "starts_at": "2025-06-21T16:54:17.946261Z",

            #     "status": "set",

            #     "type": "time_bound",

            #     "warnings": [],

            #     "workspace_id": "750fc0bc-4450-4356-8d9f-18c6a3a6b2c7"

            #   }

            # ]
components:
  schemas:
    unmanaged_access_code:
      description: >-
        Represents an [unmanaged smart lock access
        code](/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes).
        See the [unmanaged_access_code
        object](/api/access_codes/unmanaged/object).
      properties:
        access_code_id:
          description: Unique identifier for the access code.
          format: uuid
          type: string
        cannot_be_managed:
          description: >-
            Indicates that Seam cannot convert this unmanaged access code to a
            managed access code. Some providers do not support management of
            unmanaged access codes through API integrations.
          enum:
            - true
          type: boolean
        cannot_delete_unmanaged_access_code:
          description: >-
            Indicates that Seam cannot delete this unmanaged access code through
            the provider. If this access code needs to be deleted, it will only
            be possible from the manufacturer app.
          enum:
            - true
          type: boolean
        code:
          description: Code used for access. Typically, a numeric or alphanumeric string.
          nullable: true
          type: string
        created_at:
          description: Date and time at which the access code was created.
          format: date-time
          type: string
        device_id:
          description: Unique identifier for the device associated with the access code.
          format: uuid
          type: string
        display_status:
          description: >-
            Human-readable label for the code's state: `Active` or `Not active`,
            based on whether the code is set on the device. For display only.
            The wording is not stable and is not an enumeration — never compare
            against or branch on it.
          type: string
        dormakaba_oracode_metadata:
          description: >-
            Metadata for a dormakaba Oracode unmanaged access code. Only present
            for unmanaged access codes from dormakaba Oracode devices.
          nullable: true
          properties:
            is_cancellable:
              description: >-
                Indicates whether the stay can be cancelled via the Dormakaba
                Oracode API.
              type: boolean
            is_early_checkin_able:
              description: Indicates whether early check-in is available for this stay.
              type: boolean
            is_extendable:
              description: >-
                Indicates whether the stay can be extended via the Dormakaba
                Oracode API.
              type: boolean
            is_overridable:
              description: >-
                Indicates whether the access code can be overridden. When false,
                the maximum number of overrides has been reached.
              type: boolean
            site_name:
              description: Dormakaba Oracode site name associated with this access code.
              type: string
            stay_id:
              description: Dormakaba Oracode stay ID associated with this access code.
              format: float
              type: number
            user_level_id:
              description: >-
                Dormakaba Oracode user level ID associated with this access
                code.
              type: string
            user_level_name:
              description: >-
                Dormakaba Oracode user level name associated with this access
                code.
              nullable: true
              type: string
          type: object
        ends_at:
          description: >-
            Date and time after which the time-bound access code becomes
            inactive.
          format: date-time
          nullable: true
          type: string
        errors:
          type: array
          description: >-
            Errors associated with the [access
            code](/low-level-apis/smart-locks/access-codes).
          items:
            type: object
            properties:
              error_code:
                type: string
                description: Error or warning code.
              message:
                type: string
                description: Human-readable description.
              created_at:
                type: string
                format: date-time
                description: When this error or warning was generated.
        is_managed:
          description: Indicates that Seam does not manage the access code.
          enum:
            - false
          type: boolean
        name:
          description: >-
            Name of the 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).
          nullable: true
          type: string
        starts_at:
          description: Date and time at which the time-bound access code becomes active.
          format: date-time
          nullable: true
          type: string
        status:
          deprecated: true
          description: >-
            Deprecated. Use `display_status` to show a person the code's state.


            Current status of the access code within the operational lifecycle.
            `set` indicates that the code is active and operational. `unset`
            indicates that the code exists on the provider but is not usable on
            the device.
          enum:
            - set
            - unset
          type: string
        type:
          description: >-
            Type of the access code. `ongoing` access codes are active
            continuously until deactivated manually. `time_bound` access codes
            have a specific duration.
          enum:
            - time_bound
            - ongoing
          type: string
        warnings:
          type: array
          description: >-
            Warnings associated with the [access
            code](/low-level-apis/smart-locks/access-codes).
          items:
            type: object
            properties:
              error_code:
                type: string
                description: Error or warning code.
              message:
                type: string
                description: Human-readable description.
              created_at:
                type: string
                format: date-time
                description: When this error or warning was generated.
        workspace_id:
          description: >-
            Unique identifier for the Seam workspace associated with the access
            code.
          format: uuid
          type: string
      required:
        - workspace_id
        - type
        - access_code_id
        - device_id
        - name
        - code
        - created_at
        - errors
        - warnings
        - is_managed
        - status
        - display_status
      type: object
      x-route-path: /access_codes/unmanaged
    pagination:
      description: Information about the current page of results.
      properties:
        has_next_page:
          description: Indicates whether there is another page of results after this one.
          type: boolean
        next_page_cursor:
          description: >-
            Opaque value that can be used to select the next page of results via
            the `page_cursor` parameter.
          nullable: true
          type: string
        next_page_url:
          description: URL to get the next page of results.
          format: uri
          nullable: true
          type: string
      required:
        - next_page_cursor
        - has_next_page
        - next_page_url
      type: object
  securitySchemes:
    client_session:
      bearerFormat: Client Session Token
      scheme: bearer
      type: http
    client_session_with_customer:
      bearerFormat: Customer Client Session Token
      scheme: bearer
      type: http
    client_session_with_customer_ro:
      bearerFormat: Customer Client Session Token (Read-Only)
      scheme: bearer
      type: http
    pat_with_workspace:
      bearerFormat: API Token
      scheme: bearer
      type: http
    console_session_with_workspace:
      bearerFormat: Console Session Token
      scheme: bearer
      type: http
    api_key:
      bearerFormat: API Key
      scheme: bearer
      type: http
    support_read_only_token:
      bearerFormat: Support Read-Only Token
      scheme: bearer
      type: http

````