---
title: "Scan to Assign a Credential"
method: POST
path: "/acs/encoders/scan_to_assign_credential"
tags: ["/acs"]
---

# Scan to Assign a Credential

`POST /acs/encoders/scan_to_assign_credential`

## Request

- Base URL: `https://connect.getseam.com`
- URL: `https://connect.getseam.com/acs/encoders/scan_to_assign_credential`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
- TypeScript: <https://skmtc.dev/seam/apis/seam-connect/docs/acs/encoders/scan_to_assign_credential/post.ts> (a function with typed inputs; its response is checked against the schema)

Scans a physical card placed on the specified [encoder](/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`.

## Request body

- object
  - `acs_encoder_id` string, uuid, required: ID of the `acs_encoder` to use to scan the credential.
  - `acs_user_id` string, uuid: ID of the `acs_user` to assign the scanned credential to.
  - `salto_ks_metadata` object: Salto KS-specific metadata for the scan action.
    - `detect_new_tags` boolean: When true, activates tag registration mode on the encoder to detect new, unregistered tags. When false, only detects existing tags already registered in the system. Defaults to false.
  - `user_identity_id` string, uuid: ID of the `user_identity` to assign the scanned credential to. If the ACS system contains an ACS user linked to this user identity, it is used. Otherwise, one is created.

## Response `200`

OK

- object
  - `action_attempt` object, required: Tracks the progress of this operation. Poll using the action_attempt_id. See the [action_attempt object](/api/action_attempts/object).
    - `action_attempt_id` string, uuid, required: ID of the action attempt.
    - `action_type` 'SCAN_TO_ASSIGN_CREDENTIAL', required: Type of action being tracked.
    - `status` 'pending' | 'success' | 'error', required: Current status of the action.
    - `result` object, nullable: Result payload on success.
    - `error` object, nullable: Error details on failure.
      - `type` string
      - `message` string

## Other responses

- `400`: Bad Request
- `401`: Unauthorized

---

[API](https://skmtc.dev/seam/apis/seam-connect.md) - [All operations](https://skmtc.dev/seam/apis/seam-connect/llms.txt) - [OpenAPI document](https://skmtc.dev/seam/apis/seam-connect/revisions/00c35395ce12?raw)
