---
title: "Assign a card"
method: PUT
path: "/v1/access-control/credentials/{id}/card"
tags: ["credentials"]
---

# Assign a card

`PUT /v1/access-control/credentials/{id}/card`

## Request

- Base URL: `https://developer.coram.ai`
- URL: `https://developer.coram.ai/v1/access-control/credentials/{id}/card`
- Auth: API key in header `X-Auth-Token`

Assign or replace a user's card. A card can belong to only one user.

## Path parameters

- `id` integer, required

## Request body

- object
  - `card_id` integer, required: Physical card identifier.

## Response `200`

The resulting user credential

- Credential
  - `id` integer, required: Stable Coram user identifier. Store this with your external user mapping.
  - `name` string, required
  - `email` string, required
  - `card_id` integer, nullable, required: Active physical card identifier, or null when unassigned.
  - `pin` string, nullable, required: Active PIN, or null when unassigned.

## Other responses

- `400`: Invalid user ID, card ID, or JSON body
- `401`: Missing or invalid API key
- `403`: API key lacks write scope or an Access Control admin creator role
- `404`: User is not an existing Access Control member in this organization
- `409`: The card is already active for another user
- `500`: Server error

## Changes

- **2026-10-08** `00feffc78d77`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/coram/apis/coram-api/changes/v1/access-control/credentials/:id/card/put.md)

---

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