---
title: "Create a deck; repeating a client-generated id returns the existing deck"
method: POST
path: "/revise/decks"
tags: ["revise"]
---

# Create a deck; repeating a client-generated id returns the existing deck

`POST /revise/decks`

## Request

- Base URL: `https://api.focusbear.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.focusbear.io/revise/decks`
- Auth: HTTP bearer

## Request body

- CreateReviseDeckDto
  - `id` string, uuid: Client-generated id, so an offline client can create the deck first
  - `name` string, required
  - `note_id` string, uuid, nullable: One of the user's notes this deck belongs to
  - `project_id` string, uuid, nullable: A project the user owns or is an accepted member of

## Response `201`

- ReviseDeckResponseDto
  - `id` string, required
  - `name` string, required
  - `note_id` string, nullable, required
  - `project_id` string, nullable, required
  - `card_count` number, required: Live cards in the deck
  - `due_count` number, required: Live cards due for review now, plus imported cards never reviewed
  - `created_at` string, required
  - `updated_at` string, required
  - `deleted_at` string, nullable, required

---

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