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

# Assign a Credential to an ACS User

> Assigns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).



## OpenAPI

````yaml /openapi.json post /acs/credentials/assign
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:
  /acs/credentials/assign:
    post:
      tags:
        - /acs
      summary: Assign a Credential to an ACS User
      description: >-
        Assigns a specified
        [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)
        to a specified [access system
        user](https://docs.seam.co/low-level-apis/access-systems/user-management).
      operationId: acsCredentialsAssignPost
      requestBody:
        content:
          application/json:
            schema:
              properties:
                acs_credential_id:
                  description: >-
                    ID of the credential that you want to assign to an access
                    system user.
                  format: uuid
                  type: string
                acs_user_id:
                  description: >-
                    ID of the access system user to whom you want to assign a
                    credential. You can only provide one of acs_user_id or
                    user_identity_id.
                  format: uuid
                  type: string
                user_identity_id:
                  description: >-
                    ID of the user identity to whom you want to assign a
                    credential. You can only provide one of acs_user_id or
                    user_identity_id. If the ACS system contains an ACS user
                    with the same `email_address` or `phone_number` as the user
                    identity that you specify, they are linked, and the
                    credential belongs to the ACS user. If the ACS system does
                    not have a corresponding ACS user, one is created.
                  format: uuid
                  type: string
              required:
                - acs_credential_id
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  acs_credential:
                    $ref: '#/components/schemas/acs_credential'
                  ok:
                    type: boolean
                required:
                  - acs_credential
                  - ok
                type: object
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      security:
        - pat_with_workspace: []
        - console_session_with_workspace: []
        - api_key: []
      x-codeSamples:
        - lang: javascript
          label: Seam SDK
          source: |-
            await seam.acs.credentials.assign({
              user_identity_id: "1082e2e8-ecbd-4ef1-aa61-a805f7ae2f01",
              acs_credential_id: "59c9af06-7881-46d2-8d9b-3eda964c058b",
            });

            /*
            // void
            */
        - lang: bash
          label: cURL
          source: >-
            curl --include --request POST
            "https://connect.getseam.com/acs/credentials/assign" \
              --header "Authorization: Bearer $SEAM_API_KEY" \
              --json @- <<EOF
            {
              "user_identity_id": "1082e2e8-ecbd-4ef1-aa61-a805f7ae2f01",
              "acs_credential_id": "59c9af06-7881-46d2-8d9b-3eda964c058b"
            }

            EOF


            # Response:

            # {}
        - lang: python
          label: Seam SDK
          source: |-
            seam.acs.credentials.assign(
                user_identity_id="1082e2e8-ecbd-4ef1-aa61-a805f7ae2f01",
                acs_credential_id="59c9af06-7881-46d2-8d9b-3eda964c058b",
            )

            # None
        - lang: ruby
          label: Seam SDK
          source: |-
            seam.acs.credentials.assign(
              user_identity_id: "1082e2e8-ecbd-4ef1-aa61-a805f7ae2f01",
              acs_credential_id: "59c9af06-7881-46d2-8d9b-3eda964c058b",
            )

            # => nil
        - lang: php
          label: Seam SDK
          source: |-
            $seam->acs->credentials->assign(
                user_identity_id: "1082e2e8-ecbd-4ef1-aa61-a805f7ae2f01",
                acs_credential_id: "59c9af06-7881-46d2-8d9b-3eda964c058b",
            );
        - lang: bash
          label: Seam CLI
          source: >-
            seam acs credentials assign --user_identity_id
            "1082e2e8-ecbd-4ef1-aa61-a805f7ae2f01" --acs_credential_id
            "59c9af06-7881-46d2-8d9b-3eda964c058b"


            # {}
components:
  schemas:
    acs_credential:
      description: >-
        Means by which an [access control system
        user](https://docs.seam.co/low-level-apis/access-systems/user-management)
        gains access at an
        [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
        The `acs_credential` object represents a
        [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)
        that provides an ACS user access within an [access control
        system](https://docs.seam.co/low-level-apis/access-systems).
      properties:
        access_method:
          description: >-
            Access method for the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
            Supported values: `code`, `card`, `mobile_key`, `cloud_key`.
          enum:
            - code
            - card
            - mobile_key
            - cloud_key
          type: string
        acs_credential_id:
          description: >-
            ID of the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
          format: uuid
          type: string
        acs_credential_pool_id:
          format: uuid
          type: string
        acs_system_id:
          description: >-
            ID of the [access control
            system](https://docs.seam.co/low-level-apis/access-systems) that
            contains the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
          format: uuid
          type: string
        acs_user_id:
          description: >-
            ID of the [ACS
            user](https://docs.seam.co/low-level-apis/access-systems/user-management)
            to whom the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)
            belongs.
          format: uuid
          type: string
        assa_abloy_vostio_metadata:
          description: >-
            Vostio-specific metadata for the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
          properties:
            auto_join:
              description: >-
                Indicates whether the credential should auto-join. For an
                auto-join credential, Seam automatically issues an override card
                if there are no other cards and a joiner card if there are
                existing cards on the doors.
              type: boolean
            door_names:
              description: >-
                Names of the doors to which to grant access in the Vostio access
                system.
              items:
                type: string
              type: array
            endpoint_id:
              description: Endpoint ID in the Vostio access system.
              type: string
            key_id:
              description: Key ID in the Vostio access system.
              type: string
            key_issuing_request_id:
              description: Key issuing request ID in the Vostio access system.
              type: string
            override_guest_acs_entrance_ids:
              description: >-
                IDs of the guest entrances to override in the Vostio access
                system.
              items:
                type: string
              type: array
          type: object
        card_number:
          description: >-
            Number of the card associated with the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
          nullable: true
          type: string
        code:
          description: >-
            Access (PIN) code for the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
          nullable: true
          type: string
        connected_account_id:
          description: >-
            ID of the [connected
            account](https://docs.seam.co/low-level-apis/access-systems/managing-credentials#connected-accounts)
            to which the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)
            belongs.
          format: uuid
          type: string
        created_at:
          description: >-
            Date and time at which the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)
            was created.
          format: date-time
          type: string
        display_name:
          description: >-
            Display name that corresponds to the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)
            type.
          minLength: 1
          type: string
        ends_at:
          description: >-
            Date and time at which the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)
            validity 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
        errors:
          description: >-
            Errors associated with the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
          items:
            properties:
              error_code:
                type: string
              message:
                type: string
            required:
              - error_code
              - message
            type: object
          type: array
        external_type:
          description: >-
            Brand-specific terminology for the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)
            type. Supported values: `pti_card`, `brivo_credential`,
            `hid_credential`, `visionline_card`.
          enum:
            - pti_card
            - brivo_credential
            - hid_credential
            - visionline_card
            - salto_ks_credential
            - assa_abloy_vostio_key
            - salto_space_key
            - latch_access
            - dormakaba_ambiance_credential
            - hotek_card
            - salto_ks_tag
            - avigilon_alta_credential
          type: string
        external_type_display_name:
          description: >-
            Display name that corresponds to the brand-specific terminology for
            the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)
            type.
          type: string
        is_issued:
          description: >-
            Indicates whether the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)
            has been encoded onto a card.
          type: boolean
        is_latest_desired_state_synced_with_provider:
          description: >-
            Indicates whether the latest state of the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)
            has been synced from Seam to the provider.
          nullable: true
          type: boolean
        is_managed:
          enum:
            - true
          type: boolean
        is_multi_phone_sync_credential:
          description: >-
            Indicates whether the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)
            is a [multi-phone sync
            credential](https://docs.seam.co/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials).
          type: boolean
        is_one_time_use:
          description: >-
            Indicates whether the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)
            can only be used once. If `true`, the code becomes invalid after the
            first use.
          type: boolean
        issued_at:
          description: >-
            Date and time at which the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)
            was encoded onto a card.
          format: date-time
          nullable: true
          type: string
        latest_desired_state_synced_with_provider_at:
          description: >-
            Date and time at which the state of the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)
            was most recently synced from Seam to the provider.
          format: date-time
          nullable: true
          type: string
        parent_acs_credential_id:
          description: >-
            ID of the parent
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
          format: uuid
          type: string
        starts_at:
          description: >-
            Date and time at which the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)
            validity starts, in [ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format.
          type: string
        user_identity_id:
          description: >-
            ID of the [user
            identity](https://docs.seam.co/api/user_identities/object) to whom
            the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)
            belongs.
          format: uuid
          type: string
        visionline_metadata:
          description: >-
            Visionline-specific metadata for the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
          properties:
            auto_join:
              description: >-
                Indicates whether the credential should auto-join. For an
                auto-join credential, Seam automatically issues an override card
                if there are no other cards and a joiner card if there are
                existing cards on the doors.
              type: boolean
            card_function_type:
              description: Card function type in the Visionline access system.
              enum:
                - guest
                - staff
              type: string
            card_id:
              description: ID of the card in the Visionline access system.
              type: string
            common_acs_entrance_ids:
              description: Common entrance IDs in the Visionline access system.
              items:
                format: uuid
                type: string
              type: array
            credential_id:
              description: ID of the credential in the Visionline access system.
              type: string
            guest_acs_entrance_ids:
              description: Guest entrance IDs in the Visionline access system.
              items:
                format: uuid
                type: string
              type: array
            is_valid:
              description: Indicates whether the credential is valid.
              type: boolean
            joiner_acs_credential_ids:
              description: IDs of the credentials to which you want to join.
              items:
                format: uuid
                type: string
              type: array
          required:
            - card_function_type
          type: object
        warnings:
          type: array
          description: >-
            Warnings associated with the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
          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 [workspace](https://docs.seam.co/core-concepts/workspaces)
            that contains the
            [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
          format: uuid
          type: string
      required:
        - acs_credential_id
        - connected_account_id
        - acs_system_id
        - display_name
        - access_method
        - created_at
        - workspace_id
        - errors
        - warnings
        - is_managed
      type: object
      x-route-path: /acs/credentials
  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

````