> ## 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.

# Create Multiple Linked Access Codes

> Creates new [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices.

Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock.

If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes.

If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`.

See also [Creating and Updating Multiple Linked Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes).

For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes.



## OpenAPI

````yaml /openapi.json post /access_codes/create_multiple
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/create_multiple:
    post:
      tags:
        - /access_codes
      summary: Create Multiple Linked Access Codes
      description: >-
        Creates new [access
        codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes)
        that share a common code across multiple devices.


        Users with more than one door lock in a property may want to create
        groups of linked access codes, all of which have the same code (PIN).
        For example, a short-term rental host may want to provide guests the
        same PIN for both a front door lock and a back door lock.


        If you specify a custom code, Seam assigns this custom code to each of
        the resulting access codes. However, in this case, Seam does not link
        these access codes together with a `common_code_key`. That is,
        `common_code_key` remains null for these access codes.


        If you want to change these access codes that are not linked by a
        `common_code_key`, you cannot use `/access_codes/update_multiple`.
        However, you can update each of these access codes individually, using
        `/access_codes/update`.


        See also [Creating and Updating Multiple Linked Access
        Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes).


        For granting a person access to a space, [Access
        Grants](https://docs.seam.co/use-cases/granting-access) are the default
        and recommended approach and work across both standalone smart locks and
        access systems. Use the lower-level Access Codes API directly only when
        you specifically need to manage individual PIN codes.
      operationId: accessCodesCreateMultiplePost
      requestBody:
        content:
          application/json:
            schema:
              properties:
                allow_external_modification:
                  description: >-
                    Indicates whether [external
                    modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification)
                    of the code is allowed. Default: `false`.
                  type: boolean
                attempt_for_offline_device:
                  default: true
                  type: boolean
                behavior_when_code_cannot_be_shared:
                  default: throw
                  description: >-
                    Desired behavior if any device cannot share a code. If
                    `throw` (default), no access codes will be created if any
                    device cannot share a code. If `create_random_code`, a
                    random code will be created on devices that cannot share a
                    code.
                  enum:
                    - throw
                    - create_random_code
                  type: string
                code:
                  description: Code to be used for access.
                  maxLength: 12
                  minLength: 4
                  pattern: ^\d+$
                  type: string
                device_ids:
                  description: >-
                    IDs of the devices for which you want to create the new
                    access codes.
                  items:
                    format: uuid
                    type: string
                  type: array
                ends_at:
                  description: >-
                    Date and time at which the validity of the new access code
                    ends, in [ISO
                    8601](https://www.iso.org/iso-8601-date-and-time-format.html)
                    format. Must be a time in the future and after `starts_at`.
                  type: string
                is_external_modification_allowed:
                  description: >-
                    Indicates whether [external
                    modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification)
                    of the code is allowed. Default: `false`.
                  type: boolean
                name:
                  description: >-
                    Name of the new 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).
                  type: string
                prefer_native_scheduling:
                  description: >-
                    Indicates whether [native
                    scheduling](https://docs.seam.co/low-level-apis/smart-locks/access-codes#native-scheduling)
                    should be used for time-bound codes when supported by the
                    provider. Default: `true`.
                  type: boolean
                preferred_code_length:
                  description: >-
                    Preferred code length. If the affected devices do not
                    support the preferred code length, Seam reverts to using the
                    shortest supported code length.
                  format: float
                  type: number
                starts_at:
                  description: >-
                    Date and time at which the validity of the new access code
                    starts, in [ISO
                    8601](https://www.iso.org/iso-8601-date-and-time-format.html)
                    format.
                  type: string
                use_backup_access_code_pool:
                  description: >-
                    Indicates whether to use a [backup access code
                    pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes#backup-access-codes)
                    provided by Seam. If `true`, you can use
                    [`/access_codes/pull_backup_access_code`](https://docs.seam.co/api/access_codes/pull_backup_access_code).
                  type: boolean
              required:
                - device_ids
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  access_codes:
                    items:
                      $ref: '#/components/schemas/access_code'
                    type: array
                  ok:
                    type: boolean
                required:
                  - access_codes
                  - 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.createMultiple({
              device_ids: [
                "d9717800-fa73-401a-b66b-03f0ef950e2a",
                "550e8400-e29b-41d4-a716-446655440000",
              ],
              behavior_when_code_cannot_be_shared: "throw",
              preferred_code_length: 4,
              name: "My Linked Access Code",
              starts_at: "2025-06-19T01:41:56.000Z",
              ends_at: "2025-06-22T16:40:40.000Z",
            });

            /*
            [
              {
                "access_code_id": "e9cf6dd6-89aa-477f-a701-c08f3de13c1f",
                "code": "1234",
                "common_code_key": "auto_set_by_create_multiple_550e8400-e29b-41d4-a716-446655440000",
                "created_at": "2025-06-14T16:54:17.946242Z",
                "device_id": "c9cd621d-ef0c-45c8-b608-026ebdb74615",
                "ends_at": "2025-07-04T16:54:17.946049Z",
                "errors": [],
                "is_backup": false,
                "is_backup_access_code_available": false,
                "is_external_modification_allowed": false,
                "is_managed": true,
                "is_offline_access_code": false,
                "is_one_time_use": false,
                "is_scheduled_on_device": true,
                "is_waiting_for_code_assignment": false,
                "name": "My Linked Access Code",
                "pulled_backup_access_code_id": null,
                "starts_at": "2025-07-02T16:54:17.946049Z",
                "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/create_multiple" \
              --header "Authorization: Bearer $SEAM_API_KEY" \
              --json @- <<EOF
            {
              "device_ids": [
                "d9717800-fa73-401a-b66b-03f0ef950e2a",
                "550e8400-e29b-41d4-a716-446655440000"
              ],
              "behavior_when_code_cannot_be_shared": "throw",
              "preferred_code_length": 4,
              "name": "My Linked Access Code",
              "starts_at": "2025-06-19T01:41:56.000Z",
              "ends_at": "2025-06-22T16:40:40.000Z"
            }

            EOF


            # Response:

            # {

            #   "access_codes": [

            #     {

            #       "access_code_id": "e9cf6dd6-89aa-477f-a701-c08f3de13c1f",

            #       "code": "1234",

            #       "common_code_key":
            "auto_set_by_create_multiple_550e8400-e29b-41d4-a716-446655440000",

            #       "created_at": "2025-06-14T16:54:17.946242Z",

            #       "device_id": "c9cd621d-ef0c-45c8-b608-026ebdb74615",

            #       "ends_at": "2025-07-04T16:54:17.946049Z",

            #       "errors": [],

            #       "is_backup": false,

            #       "is_backup_access_code_available": false,

            #       "is_external_modification_allowed": false,

            #       "is_managed": true,

            #       "is_offline_access_code": false,

            #       "is_one_time_use": false,

            #       "is_scheduled_on_device": true,

            #       "is_waiting_for_code_assignment": false,

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

            #       "pulled_backup_access_code_id": null,

            #       "starts_at": "2025-07-02T16:54:17.946049Z",

            #       "status": "set",

            #       "type": "time_bound",

            #       "warnings": [],

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

            #     }

            #   ]

            # }
        - lang: python
          label: Seam SDK
          source: |-
            seam.access_codes.create_multiple(
                device_ids=[
                    "d9717800-fa73-401a-b66b-03f0ef950e2a",
                    "550e8400-e29b-41d4-a716-446655440000",
                ],
                behavior_when_code_cannot_be_shared="throw",
                preferred_code_length=4,
                name="My Linked Access Code",
                starts_at="2025-06-19T01:41:56.000Z",
                ends_at="2025-06-22T16:40:40.000Z",
            )

            # [
                AccessCode(
                    access_code_id="e9cf6dd6-89aa-477f-a701-c08f3de13c1f",
                    code="1234",
                    common_code_key="auto_set_by_create_multiple_550e8400-e29b-41d4-a716-446655440000",
                    created_at="2025-06-14T16:54:17.946242Z",
                    device_id="c9cd621d-ef0c-45c8-b608-026ebdb74615",
                    ends_at="2025-07-04T16:54:17.946049Z",
                    errors=[],
                    is_backup=false,
                    is_backup_access_code_available=false,
                    is_external_modification_allowed=false,
                    is_managed=true,
                    is_offline_access_code=false,
                    is_one_time_use=false,
                    is_scheduled_on_device=true,
                    is_waiting_for_code_assignment=false,
                    name="My Linked Access Code",
                    pulled_backup_access_code_id=None,
                    starts_at="2025-07-02T16:54:17.946049Z",
                    status="set",
                    type="time_bound",
                    warnings=[],
                    workspace_id="750fc0bc-4450-4356-8d9f-18c6a3a6b2c7",
                )
            ]
        - lang: ruby
          label: Seam SDK
          source: |-
            seam.access_codes.create_multiple(
              device_ids: %w[d9717800-fa73-401a-b66b-03f0ef950e2a 550e8400-e29b-41d4-a716-446655440000],
              behavior_when_code_cannot_be_shared: "throw",
              preferred_code_length: 4,
              name: "My Linked Access Code",
              starts_at: "2025-06-19T01:41:56.000Z",
              ends_at: "2025-06-22T16:40:40.000Z",
            )

            # => [
              {
                "access_code_id" => "e9cf6dd6-89aa-477f-a701-c08f3de13c1f",
                "code" => "1234",
                "common_code_key" => "auto_set_by_create_multiple_550e8400-e29b-41d4-a716-446655440000",
                "created_at" => "2025-06-14T16:54:17.946242Z",
                "device_id" => "c9cd621d-ef0c-45c8-b608-026ebdb74615",
                "ends_at" => "2025-07-04T16:54:17.946049Z",
                "errors" => [],
                "is_backup" => false,
                "is_backup_access_code_available" => false,
                "is_external_modification_allowed" => false,
                "is_managed" => true,
                "is_offline_access_code" => false,
                "is_one_time_use" => false,
                "is_scheduled_on_device" => true,
                "is_waiting_for_code_assignment" => false,
                "name" => "My Linked Access Code",
                "pulled_backup_access_code_id" => nil,
                "starts_at" => "2025-07-02T16:54:17.946049Z",
                "status" => "set",
                "type" => "time_bound",
                "warnings" => [],
                "workspace_id" => "750fc0bc-4450-4356-8d9f-18c6a3a6b2c7",
              },
            ]
        - lang: php
          label: Seam SDK
          source: |-
            $seam->access_codes->create_multiple(
                device_ids: [
                    "d9717800-fa73-401a-b66b-03f0ef950e2a",
                    "550e8400-e29b-41d4-a716-446655440000",
                ],
                behavior_when_code_cannot_be_shared: "throw",
                preferred_code_length: 4,
                name: "My Linked Access Code",
                starts_at: "2025-06-19T01:41:56.000Z",
                ends_at: "2025-06-22T16:40:40.000Z",
            );

            // [
                [
                    "access_code_id" => "e9cf6dd6-89aa-477f-a701-c08f3de13c1f",
                    "code" => "1234",
                    "common_code_key" =>
                        "auto_set_by_create_multiple_550e8400-e29b-41d4-a716-446655440000",
                    "created_at" => "2025-06-14T16:54:17.946242Z",
                    "device_id" => "c9cd621d-ef0c-45c8-b608-026ebdb74615",
                    "ends_at" => "2025-07-04T16:54:17.946049Z",
                    "errors" => [],
                    "is_backup" => false,
                    "is_backup_access_code_available" => false,
                    "is_external_modification_allowed" => false,
                    "is_managed" => true,
                    "is_offline_access_code" => false,
                    "is_one_time_use" => false,
                    "is_scheduled_on_device" => true,
                    "is_waiting_for_code_assignment" => false,
                    "name" => "My Linked Access Code",
                    "pulled_backup_access_code_id" => null,
                    "starts_at" => "2025-07-02T16:54:17.946049Z",
                    "status" => "set",
                    "type" => "time_bound",
                    "warnings" => [],
                    "workspace_id" => "750fc0bc-4450-4356-8d9f-18c6a3a6b2c7",
                ],
            ];
        - lang: bash
          label: Seam CLI
          source: >-
            seam access-codes create-multiple --device_ids
            ["d9717800-fa73-401a-b66b-03f0ef950e2a","550e8400-e29b-41d4-a716-446655440000"]
            --behavior_when_code_cannot_be_shared "throw"
            --preferred_code_length 4 --name "My Linked Access Code" --starts_at
            "2025-06-19T01:41:56.000Z" --ends_at "2025-06-22T16:40:40.000Z"


            # [

            #   {

            #     "access_code_id": "e9cf6dd6-89aa-477f-a701-c08f3de13c1f",

            #     "code": "1234",

            #     "common_code_key":
            "auto_set_by_create_multiple_550e8400-e29b-41d4-a716-446655440000",

            #     "created_at": "2025-06-14T16:54:17.946242Z",

            #     "device_id": "c9cd621d-ef0c-45c8-b608-026ebdb74615",

            #     "ends_at": "2025-07-04T16:54:17.946049Z",

            #     "errors": [],

            #     "is_backup": false,

            #     "is_backup_access_code_available": false,

            #     "is_external_modification_allowed": false,

            #     "is_managed": true,

            #     "is_offline_access_code": false,

            #     "is_one_time_use": false,

            #     "is_scheduled_on_device": true,

            #     "is_waiting_for_code_assignment": false,

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

            #     "pulled_backup_access_code_id": null,

            #     "starts_at": "2025-07-02T16:54:17.946049Z",

            #     "status": "set",

            #     "type": "time_bound",

            #     "warnings": [],

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

            #   }

            # ]
components:
  schemas:
    access_code:
      description: >-
        Represents a smart lock [access
        code](https://docs.seam.co/low-level-apis/smart-locks/access-codes).
      properties:
        access_code_id:
          description: Unique identifier for the access code.
          format: uuid
          type: string
        code:
          description: Code used for access. Typically, a numeric or alphanumeric string.
          nullable: true
          type: string
        common_code_key:
          description: >-
            Unique identifier for a group of access codes that share the same
            code.
          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 managed access code. Only present
            for 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_backup:
          description: Indicates whether the access code is a backup code.
          type: boolean
        is_backup_access_code_available:
          description: >-
            Indicates whether a backup access code is available for use if the
            primary access code is lost or compromised.
          type: boolean
        is_external_modification_allowed:
          description: >-
            Indicates whether changes to the access code from external sources
            are permitted.
          type: boolean
        is_managed:
          description: Indicates whether Seam manages the access code.
          enum:
            - true
          type: boolean
        is_offline_access_code:
          description: >-
            Indicates whether the access code is intended for use in offline
            scenarios. If `true`, this code can be created on a device without a
            network connection.
          type: boolean
        is_one_time_use:
          description: >-
            Indicates whether the access code can only be used once. If `true`,
            the code becomes invalid after the first use.
          type: boolean
        is_scheduled_on_device:
          description: >-
            Indicates whether the code is set on the device according to a
            preconfigured schedule.
          type: boolean
        is_waiting_for_code_assignment:
          description: Indicates whether the access code is waiting for a code assignment.
          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
        pending_mutations:
          description: >-
            Collection of pending mutations for the access code. Indicates
            changes that Seam is in the process of pushing to the device.
          items:
            discriminator:
              propertyName: mutation_code
            oneOf:
              - description: >-
                  Seam is in the process of setting an access code on the
                  device.
                properties:
                  created_at:
                    description: Date and time at which the mutation was created.
                    format: date-time
                    type: string
                  message:
                    description: Detailed description of the mutation.
                    type: string
                  mutation_code:
                    description: >-
                      Mutation code to indicate that Seam is in the process of
                      setting an access code on the device.
                    enum:
                      - creating
                    type: string
                required:
                  - created_at
                  - message
                  - mutation_code
                type: object
              - description: >-
                  Seam is waiting until closer to the access code's start time
                  before programming it on the device.
                properties:
                  created_at:
                    description: Date and time at which the mutation was created.
                    format: date-time
                    type: string
                  message:
                    description: Detailed description of the mutation.
                    type: string
                  mutation_code:
                    description: >-
                      Mutation code to indicate that Seam is waiting until
                      closer to the access code's start time before programming
                      it on the device.
                    enum:
                      - deferring_creation
                    type: string
                  scheduled_at:
                    description: >-
                      Date and time at which Seam will attempt to program this
                      access code on the device.
                    format: date-time
                    type: string
                required:
                  - created_at
                  - message
                  - mutation_code
                  - scheduled_at
                type: object
              - description: >-
                  Seam is in the process of removing an access code from the
                  device.
                properties:
                  created_at:
                    description: Date and time at which the mutation was created.
                    format: date-time
                    type: string
                  message:
                    description: Detailed description of the mutation.
                    type: string
                  mutation_code:
                    description: >-
                      Mutation code to indicate that Seam is in the process of
                      removing an access code from the device.
                    enum:
                      - deleting
                    type: string
                required:
                  - created_at
                  - message
                  - mutation_code
                type: object
              - description: >-
                  Seam is in the process of pushing an updated PIN code to the
                  device.
                properties:
                  created_at:
                    description: Date and time at which the mutation was created.
                    format: date-time
                    type: string
                  from:
                    description: Previous code configuration.
                    properties:
                      code:
                        description: Previous PIN code.
                        nullable: true
                        type: string
                    required:
                      - code
                    type: object
                  message:
                    description: Detailed description of the mutation.
                    type: string
                  mutation_code:
                    description: >-
                      Mutation code to indicate that Seam is in the process of
                      pushing an updated PIN code to the device.
                    enum:
                      - updating_code
                    type: string
                  to:
                    description: New code configuration.
                    properties:
                      code:
                        description: New PIN code.
                        nullable: true
                        type: string
                    required:
                      - code
                    type: object
                required:
                  - created_at
                  - message
                  - mutation_code
                  - from
                  - to
                type: object
              - description: >-
                  Seam is in the process of pushing an updated access code name
                  to the device.
                properties:
                  created_at:
                    description: Date and time at which the mutation was created.
                    format: date-time
                    type: string
                  from:
                    description: Previous name configuration.
                    properties:
                      name:
                        description: Previous access code name.
                        nullable: true
                        type: string
                    required:
                      - name
                    type: object
                  message:
                    description: Detailed description of the mutation.
                    type: string
                  mutation_code:
                    description: >-
                      Mutation code to indicate that Seam is in the process of
                      pushing an updated access code name to the device.
                    enum:
                      - updating_name
                    type: string
                  to:
                    description: New name configuration.
                    properties:
                      name:
                        description: New access code name.
                        nullable: true
                        type: string
                    required:
                      - name
                    type: object
                required:
                  - created_at
                  - message
                  - mutation_code
                  - from
                  - to
                type: object
              - description: >-
                  Seam is in the process of pushing an updated time frame to the
                  device.
                properties:
                  created_at:
                    description: Date and time at which the mutation was created.
                    format: date-time
                    type: string
                  from:
                    description: Previous time frame configuration.
                    properties:
                      ends_at:
                        description: Previous end time for the access code.
                        format: date-time
                        nullable: true
                        type: string
                      starts_at:
                        description: Previous start time for the access code.
                        format: date-time
                        nullable: true
                        type: string
                    required:
                      - starts_at
                      - ends_at
                    type: object
                  message:
                    description: Detailed description of the mutation.
                    type: string
                  mutation_code:
                    description: >-
                      Mutation code to indicate that Seam is in the process of
                      pushing updated access code time frame to the device.
                    enum:
                      - updating_time_frame
                    type: string
                  to:
                    description: New time frame configuration.
                    properties:
                      ends_at:
                        description: New end time for the access code.
                        format: date-time
                        nullable: true
                        type: string
                      starts_at:
                        description: New start time for the access code.
                        format: date-time
                        nullable: true
                        type: string
                    required:
                      - starts_at
                      - ends_at
                    type: object
                required:
                  - created_at
                  - message
                  - mutation_code
                  - from
                  - to
                type: object
          type: array
        pulled_backup_access_code_id:
          description: >-
            Identifier of the pulled backup access code. Used to associate the
            pulled backup access code with the original access code.
          format: uuid
          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.
            Values are `setting`, a transitional phase that indicates that the
            code is being configured or activated; `set`, which indicates that
            the code is active and operational; `unset`, which indicates a
            deactivated or unused state, either before activation or after
            deliberate deactivation; `removing`, which indicates a transitional
            period in which the code is being deleted or made inactive; and
            `unknown`, which indicates an indeterminate state, due to reasons
            such as system errors or incomplete data, that highlights a
            potential need for system review or troubleshooting. See also
            [Lifecycle of Access
            Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/lifecycle-of-access-codes).
          enum:
            - setting
            - set
            - unset
            - removing
            - unknown
          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
        - common_code_key
        - type
        - access_code_id
        - device_id
        - name
        - code
        - created_at
        - errors
        - warnings
        - is_managed
        - status
        - is_backup_access_code_available
        - is_external_modification_allowed
        - is_one_time_use
        - is_offline_access_code
        - pending_mutations
      type: object
      x-route-path: /access_codes
  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

````