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

# Add Requested Access Methods to Access Grant

> Adds additional requested access methods to an existing Access Grant.



## OpenAPI

````yaml /openapi.json post /access_grants/request_access_methods
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_grants/request_access_methods:
    post:
      tags: []
      summary: Add Requested Access Methods to Access Grant
      description: Adds additional requested access methods to an existing Access Grant.
      operationId: accessGrantsRequestAccessMethodsPost
      requestBody:
        content:
          application/json:
            schema:
              properties:
                access_grant_id:
                  description: ID of the Access Grant to add access methods to.
                  format: uuid
                  type: string
                requested_access_methods:
                  description: >-
                    Array of requested access methods to add to the access
                    grant.
                  items:
                    properties:
                      code:
                        description: >-
                          Specific PIN code to use for this access method. Only
                          applicable when mode is 'code'.
                        maxLength: 9
                        minLength: 4
                        pattern: ^\d+$
                        type: string
                      instant_key_max_use_count:
                        description: >-
                          Maximum number of times the instant key can be used.
                          Only applicable when mode is 'mobile_key'. Defaults to
                          1 if not specified.
                        minimum: 1
                        type: integer
                      mode:
                        description: >-
                          Access method mode. Supported values: `code`, `card`,
                          `mobile_key`, `cloud_key`.
                        enum:
                          - code
                          - card
                          - mobile_key
                          - cloud_key
                        type: string
                    required:
                      - mode
                    type: object
                  minItems: 1
                  type: array
              required:
                - access_grant_id
                - requested_access_methods
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  access_grant:
                    $ref: '#/components/schemas/access_grant'
                  ok:
                    type: boolean
                required:
                  - access_grant
                  - ok
                type: object
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      security:
        - pat_with_workspace: []
        - console_session_with_workspace: []
        - api_key: []
        - client_session_with_customer: []
components:
  schemas:
    access_grant:
      description: >-
        Represents an Access Grant. Access Grants enable you to grant a user
        identity access to spaces, entrances, and devices through one or more
        access methods, such as mobile keys, plastic cards, and PIN codes. You
        can create an Access Grant for an existing user identity, or you can
        create a new user identity *while* creating the new Access Grant.
      properties:
        access_grant_id:
          description: ID of the Access Grant.
          format: uuid
          type: string
        access_grant_key:
          description: Unique key for the access grant within the workspace.
          type: string
        access_method_ids:
          description: IDs of the access methods created for the Access Grant.
          items:
            format: uuid
            type: string
          type: array
        client_session_token:
          description: >-
            Client Session Token. Only returned if the Access Grant has a
            mobile_key access method.
          type: string
        created_at:
          description: Date and time at which the Access Grant was created.
          format: date-time
          type: string
        customization_profile_id:
          description: ID of the customization profile associated with the Access Grant.
          format: uuid
          type: string
        display_name:
          description: Display name of the Access Grant.
          type: string
        ends_at:
          description: Date and time at which the Access Grant ends.
          format: date-time
          nullable: true
          type: string
        errors:
          description: >-
            Errors associated with the [access
            grant](https://docs.seam.co/use-cases/granting-access).
          items:
            discriminator:
              propertyName: error_code
            oneOf:
              - properties:
                  created_at:
                    description: Date and time at which Seam created the error.
                    format: date-time
                    type: string
                  error_code:
                    description: >-
                      Unique identifier of the type of error. Enables quick
                      recognition and categorization of the issue.
                    enum:
                      - cannot_create_requested_access_methods
                    type: string
                  message:
                    description: >-
                      Detailed description of the error. Provides insights into
                      the issue and potentially how to rectify it.
                    type: string
                  missing_device_ids:
                    description: >-
                      IDs of the devices that did not receive an access code at
                      grant creation. Use these to identify which specific
                      devices failed when the message reports a partial failure.
                    items:
                      format: uuid
                      type: string
                    type: array
                required:
                  - created_at
                  - message
                  - error_code
                type: object
          type: array
        instant_key_url:
          description: >-
            Instant Key URL. Only returned if the Access Grant has a single
            mobile_key access_method. 
          format: uri
          type: string
        location_ids:
          deprecated: true
          items:
            format: uuid
            type: string
          type: array
          x-deprecated: Use `space_ids`.
        name:
          description: >-
            Name of the Access Grant. If not provided, the display name will be
            computed.
          nullable: true
          type: string
        pending_mutations:
          description: >-
            List of pending mutations for the access grant. This shows updates
            that are in progress.
          items:
            discriminator:
              propertyName: mutation_code
            oneOf:
              - description: >-
                  Seam is in the process of updating the devices/spaces
                  associated with this access grant.
                properties:
                  created_at:
                    description: Date and time at which the mutation was created.
                    format: date-time
                    type: string
                  from:
                    description: Previous location configuration.
                    properties:
                      device_ids:
                        description: Previous device IDs where access codes existed.
                        items:
                          format: uuid
                          type: string
                        type: array
                    required:
                      - device_ids
                    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
                      updating the spaces (devices) associated with this access
                      grant.
                    enum:
                      - updating_spaces
                    type: string
                  to:
                    description: New location configuration.
                    properties:
                      common_code_key:
                        description: >-
                          Common code key to ensure PIN code reuse across
                          devices.
                        nullable: true
                        type: string
                      device_ids:
                        description: New device IDs where access codes should be created.
                        items:
                          format: uuid
                          type: string
                        type: array
                    required:
                      - device_ids
                    type: object
                required:
                  - created_at
                  - message
                  - mutation_code
                  - from
                  - to
                type: object
              - description: >-
                  Seam is in the process of updating the access times for this
                  access grant.
                properties:
                  access_method_ids:
                    description: IDs of the access methods being updated.
                    items:
                      format: uuid
                      type: string
                    type: array
                  created_at:
                    description: Date and time at which the mutation was created.
                    format: date-time
                    type: string
                  from:
                    description: Previous access time configuration.
                    properties:
                      ends_at:
                        description: Previous end time for access.
                        format: date-time
                        nullable: true
                        type: string
                      starts_at:
                        description: Previous start time for access.
                        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
                      updating the access times for this access grant.
                    enum:
                      - updating_access_times
                    type: string
                  to:
                    description: New access time configuration.
                    properties:
                      ends_at:
                        description: New end time for access.
                        format: date-time
                        nullable: true
                        type: string
                      starts_at:
                        description: New start time for access.
                        format: date-time
                        nullable: true
                        type: string
                    required:
                      - starts_at
                      - ends_at
                    type: object
                required:
                  - created_at
                  - message
                  - mutation_code
                  - access_method_ids
                  - from
                  - to
                type: object
          type: array
        requested_access_methods:
          description: Access methods that the user requested for the Access Grant.
          items:
            properties:
              code:
                description: >-
                  Specific PIN code to use for this access method. Only
                  applicable when mode is 'code'.
                maxLength: 9
                minLength: 4
                pattern: ^\d+$
                type: string
              created_access_method_ids:
                description: >-
                  IDs of the access methods created for the requested access
                  method.
                items:
                  format: uuid
                  type: string
                type: array
              created_at:
                description: >-
                  Date and time at which the requested access method was added
                  to the Access Grant.
                format: date-time
                type: string
              display_name:
                description: Display name of the access method.
                type: string
              instant_key_max_use_count:
                description: >-
                  Maximum number of times the instant key can be used. Only
                  applicable when mode is 'mobile_key'. Defaults to 1 if not
                  specified.
                minimum: 1
                type: integer
              mode:
                description: >-
                  Access method mode. Supported values: `code`, `card`,
                  `mobile_key`, `cloud_key`.
                enum:
                  - code
                  - card
                  - mobile_key
                  - cloud_key
                type: string
            required:
              - display_name
              - mode
              - created_at
              - created_access_method_ids
            type: object
          type: array
        reservation_key:
          description: Reservation key for the access grant.
          type: string
        space_ids:
          description: IDs of the spaces to which the Access Grant gives access.
          items:
            format: uuid
            type: string
          type: array
        starts_at:
          description: Date and time at which the Access Grant starts.
          format: date-time
          type: string
        user_identity_id:
          description: ID of user identity to which the Access Grant gives access.
          format: uuid
          type: string
        warnings:
          type: array
          description: >-
            Warnings associated with the [access
            grant](https://docs.seam.co/use-cases/granting-access).
          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: ID of the Seam workspace associated with the Access Grant.
          format: uuid
          type: string
      required:
        - workspace_id
        - access_grant_id
        - user_identity_id
        - location_ids
        - space_ids
        - requested_access_methods
        - access_method_ids
        - name
        - display_name
        - created_at
        - starts_at
        - ends_at
        - warnings
        - errors
        - pending_mutations
      type: object
      x-draft: Early access.
      x-route-path: /access_grants
  securitySchemes:
    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
    client_session_with_customer:
      bearerFormat: Customer Client Session Token
      scheme: bearer
      type: http

````