---
title: "Create card assignment"
method: POST
path: "/card_assignments"
tags: ["Card assignments"]
---

# Create card assignment

`POST /card_assignments`

## Request body

- object
  - `card_assignment` object, required
    - `assignee_type` 'User' | 'Guest', required — The assignee type of the card assignment
    - `assignee_id` integer, required — The assignee ID of the card assignment
    - `card_id` integer, required — The card ID of the card assignment
    - `two_factor_pin` string, nullable — Pin code used as two factor authentication for the card assignment.
    - `send_two_factor_pin_notification` boolean — Whether to send a notification to the assignee when the two factor pin is set/changed.
    - `user_id` integer, nullable — The user ID of the card assignment
    - `guest_id` integer, nullable — The guest ID of the card assignment

## Response `200`

OK

- object
  - `id` integer, required — The ID of the card assignment
  - `resource_type` 'CardAssignment', required — The resource type of the card assignment
  - `created_at` string, date-time, required — When the card assignment was created
  - `updated_at` string, date-time, required — When the card assignment was updated
  - `status` 'activated' | 'deactivated', required — The status of the card assignment.
  - `two_factor_pin` string, nullable, required — Pin code used as two factor authentication for the card assignment.
  - `send_two_factor_pin_notification` boolean, required — Whether to send a notification to the assignee when the two factor pin is set/changed.
  - `assignee_type` 'User' | 'Guest', required — The assignee type of the card assignment
  - `assignee_id` integer, required — The assignee ID of the card assignment
  - `card_id` integer, required — The card ID of the card assignment
  - `created_by_type` 'null' | 'User', nullable, required — The created_by type of the card assignment
  - `created_by_id` integer, nullable, required — The created_by ID of the card assignment
  - `created_by` object — The created_by of the card assignment
    - `id` integer, required — The ID of the user
    - `resource_type` 'User', required — The resource type of the user
    - `email` string, email, required — The email of the user.
    - `name` string, required — The name of the user
  - `guest_id` integer, nullable, required — The guest ID of the card assignment
  - `user_id` integer, nullable, required — The user ID of the card assignment

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `422` — Unprocessable Content

---

[API](https://skmtc.dev/kisi/apis/kisi-api.md) · [All operations](https://skmtc.dev/kisi/apis/kisi-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kisi/kisi-api/revisions/998700ffff5a/schema)
