> ## Documentation Index
> Fetch the complete documentation index at: https://docs.seam.co/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](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes).



## OpenAPI

````yaml /openapi.json post /access_codes/unmanaged/list
openapi: 3.0.0
info:
  title: Seam Connect
  version: 1.0.0
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:
    post:
      tags:
        - /access_codes
      summary: List Unmanaged Access Codes
      description: >-
        Returns a list of all [unmanaged access
        codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes).
      operationId: accessCodesUnmanagedListPost
      requestBody:
        content:
          application/json:
            schema:
              properties:
                device_id:
                  description: >-
                    ID of the device for which you want to list unmanaged access
                    codes.
                  format: uuid
                  type: string
                limit:
                  default: 300000
                  description: >-
                    Numerical limit on the number of unmanaged access codes to
                    return.
                  format: float
                  type: number
                page_cursor:
                  description: >-
                    Identifies the specific page of results to return, obtained
                    from the previous page's `next_page_cursor`.
                  nullable: true
                  type: string
                search:
                  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
                user_identifier_key:
                  description: >-
                    Your user ID for the user by which to filter unmanaged
                    access codes.
                  type: string
              required:
                - device_id
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  access_codes:
                    items:
                      $ref: '#/components/schemas/unmanaged_access_code'
                    type: array
                  ok:
                    type: boolean
                  pagination:
                    $ref: '#/components/schemas/pagination'
                required:
                  - access_codes
                  - pagination
                  - ok
                type: object
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      security:
        - client_session: []
        - client_session_with_customer: []
        - pat_with_workspace: []
        - console_session_with_workspace: []
        - api_key: []
      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](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes).
      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
        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
          required:
            - stay_id
            - user_level_name
          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](https://docs.seam.co/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:
          description: >-
            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](https://docs.seam.co/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
      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
    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

````