Decks

This object represents a deck in Recall. All cards must belong to a deck and have their content structured in its deck fields. A deck also has one or several card layouts that define the design of cards.

Endpoints

POST /v1/decks # Create a new deck
POST /v1/decks/:id # Update a deck
GET /v1/decks # List all decks
GET /v1/decks/:id # Get a deck
DELETE /v1/decks/:id # Delete a deck

The deck object

{
"id": "deck_5gvuzRdHW2ac",
"object": "deck",
"card_layouts": ["layout_yT9ktMcdzg4e"],
"cards_count": 217,
"created_at": "2025-11-30T12:34:56Z",
"deck_fields": ["field_5gvuzRdHW2ac", "field_uYS9PpONoqTP"],
"last_reviewed_at": "2025-11-22T12:42:56Z",
"name": "My deck",
"settings": {
"max_new_reviews_per_day": 10,
"target_retention": 90,
},
}
id string

Unique identifier for the deck.

object string, value is "deck"

The type of the object.

card_layouts array of stringsExpandable

An array of the card layout IDs belonging to the deck. When card_layouts is included in expand, each element is a card layout object instead. Expand card_layouts.card_layout_fields to also return each layout's fields as full objects.

cards_count integer

The number of cards in the deck.

created_at string

The date and time the deck was created. RFC 3339–formatted UTC datetime.

deck_fields array of stringsExpandable

An array of the deck field IDs belonging to the deck. When deck_fields is included in expand, each element is a deck field object instead.

last_reviewed_at nullable string

The date and time the last card was reviewed in the deck. RFC 3339–formatted UTC datetime. Null if no card has been reviewed in the deck yet.

name string

The name of the deck. Must be between 1 and 60 characters.

settings object

An object containing the settings of the deck.

max_new_reviews_per_day integer, default is 10
The maximum number of new reviews added each day. Fewer are added if many are already due.
target_retention integer, default is 90
The minimum percentage of cards of the deck the user aims to remember at any given time. Must be between 70 and 99.

Create a deck

To create a deck, you need to provide a name. You may optionally provide its deck fields and card layouts objects to define the deck's structure in a single call.

Minimal deck creation

A minimal call only requires a name. When deck_fields is omitted, the deck is created with default "Front" and "Back" fields.

curl https://api.recall.cards/v1/decks \
-u YOUR_API_KEY: \
-H "Content-Type: application/json" \
-d '{
"name": "My deck"
}'

Deck creation with fields and layouts

You may provide deck_fields and card_layouts to set up your deck's structure in a single call.

You can create deck_fields without providing card_layouts, but you can't create card_layouts without providing deck_fields. When you provide deck_fields without card_layouts, Recall creates the deck's primary card layout automatically: the first field is shown on the front of the card and the remaining fields on the back.

Because every deck field and layout field in this request is created simultaneously, items reference each other with temporary IDs instead of the definitive IDs, which do not exist yet. Each temporary ID must be unique within the request. It is never stored or returned.

curl https://api.recall.cards/v1/decks \
-u YOUR_API_KEY: \
-H "Content-Type: application/json" \
-d '{
"name": "Spanish vocabulary",
"deck_fields": [
{
"temporary_id": "spanish",
"name": "Spanish",
"type": "plain_text"
},
{
"temporary_id": "english",
"name": "English",
"type": "plain_text"
},
{
"temporary_id": "pronunciation",
"name": "Pronunciation",
"type": "audio",
"is_autofill_enabled": true,
"autofill_type": "text_to_speech",
"autofill_language_to": "es",
"autofill_generate_from_deck_fields": ["spanish"]
}
],
"card_layouts": [
{
"card_layout_fields": [
{ "temporary_id": "spanish_line", "deck_field": "spanish", "is_front": true },
{ "deck_field": "pronunciation", "is_front": true, "next_to_card_layout_field": "spanish_line" },
{ "deck_field": "english", "is_front": false }
]
}
]
}'
name string required

The name of the deck. Must be between 1 and 60 characters.

deck_fields array of objects, optional

The deck fields to create with the deck. If omitted, the deck is created with default "Front" and "Back" fields. You must provide between 2 and 30 fields. The first field is shown on the front of the deck's primary card layout and the remaining fields on the back.

Each object accepts the same parameters as the deck field create endpoint, plus a temporary_id.

temporary_id string, optional

A request-local identifier used to reference this field from other fields in the same request, before any field has a real ID. Use it as a value in another field's autofill_generate_from_deck_fields, or as a variable in another field's autofill_prompt (formatted as {{temporary_id}}).

It only exists for the duration of the request: it is never stored and never returned. Each temporary_id must be unique within the request.

type enum required

The type of the deck field. See the deck field types for the possible values.

name string

The name of the deck field. Must be between 1 and 35 characters. A default name is generated if not provided.

autofill_generate_from_deck_fields array of strings

The fields the AI Autofill generates the value from. Because the referenced fields are created in the same request, reference them by their temporary_id instead of an ID.

autofill_language_from nullable enum, default is null

The language to translate from when autofill_type is translation. See the deck field create endpoint for the possible values.

autofill_language_to nullable enum, default is null

The language to translate to or generate audio in when autofill_type is translation or text_to_speech. See the deck field create endpoint for the possible values.

autofill_prompt string

The prompt used when autofill_type is custom_instruction or image_generation. Reference other deck fields by their temporary_id, formatted as {{temporary_id}}. For example, Write a sentence using {{spanish}}.

autofill_type nullable enum, default is null

The type of AI Autofill to apply to the field. See the deck field create endpoint for the possible values and their requirements.

is_autofill_enabled boolean, default is false

Whether the AI Autofill is enabled for the field. If true, autofill_type and the other attributes related to the type are required, exactly as for the deck field create endpoint.

card_layouts array of objects, optional

The card layouts to create with the deck. If omitted, a single primary layout is generated from deck_fields (the first field on the front, the rest on the back). If provided, these layouts replace that automatic layout. You can create up to 6 layouts, and card_layouts requires deck_fields to be provided in the same request.

Exactly one layout is the primary layout: the one with is_primary set to true, or the first layout in the array if none is flagged. Each layout must have between 1 and 5 fields on its front and between 1 and 12 fields on its back.

is_active boolean, default is true

Whether the layout is used to display cards in reviews.

is_primary boolean, default is false

Whether this is the deck's primary layout. If no layout sets it to true, the first layout in the array becomes primary.

card_layout_fields array of objects required

The fields of the layout. Each object displays a deck field and accepts the same parameters as the card layout field create endpoint, plus a temporary_id.

deck_field string required

The deck field to display, referenced by its temporary_id (the field is created in the same request, so it has no ID yet). A deck field can appear at most once per layout.

temporary_id string, optional

A request-local identifier for this layout field, used by another layout field's next_to_card_layout_field. It is never stored or returned, and must be unique within the request.

next_to_card_layout_field string, optional

Places this field next to another field in the same layout, referenced by that field's temporary_id (it is created in the same request, so it has no ID yet). Only valid for an audio field placed next to a plain_text or rich_content field.

is_front boolean, default is true

Whether the field is displayed on the front of the card.

order integer, optional

The position of the field within its side of the card. If omitted, it is inferred from the field's position in the array within its side (front or back).

color enum, default is primary

The color of the text.

primary
Primary (highest contrast)
secondary
Secondary
tertiary
Tertiary
font_size enum, default is md

The font size of the text.

sm
Small
md
Normal
lg
Large
xl
Huge
font_weight enum, default is regular

The font weight of the text.

regular
Regular
bold
Bold
settings object, optional

An object containing the settings of the deck.

max_new_reviews_per_day integer, default is 10
The maximum number of new reviews added each day. Fewer are added if many are already due.
target_retention integer, default is 90
The minimum percentage of cards of the deck the user aims to remember at any given time. Must be between 70 and 99.

Returns

Returns the created deck object.


Update a deck

curl https://api.recall.cards/v1/decks/deck_5gvuzRdHW2ac \
-u YOUR_API_KEY: \
-H "Content-Type: application/json" \
-d '{
"name": "New name",
"settings": {
"max_new_reviews_per_day": 20,
"target_retention": 85
}
}'
name string required

The name of the deck. Must be between 1 and 60 characters.

settings object, optional

An object containing the settings of the deck.

max_new_reviews_per_day integer, default is 10
The maximum number of new reviews added each day. Fewer are added if many are already due.
target_retention integer, default is 90
The minimum percentage of cards of the deck the user aims to remember at any given time. Must be between 70 and 99.

Returns

Returns the updated deck object.


List all decks

curl https://api.recall.cards/v1/decks \
-u YOUR_API_KEY:
limit optional, default is 10

The maximum number of decks to return, ranging between 1 and 100.

starting_after optional

A cursor to use in pagination. starting_after is a deck ID that defines your place in the list. For example, if you make a deck list request and receive 100 decks, ending with deck_2sdInOpM83eo, your subsequent call can include starting_after=deck_2sdInOpM83eo to fetch the next page of the list.

ending_before optional

A cursor to use in pagination. Similarly to starting_after, ending_before is a deck ID that allows you to fetch decks in the previous page of the list.

Returns

{
"object": "list",
"has_more": true,
"data": [
// Deck objects...
],
}
object string, value is "list"

The type of object returned.

data array

An array containing the deck objects.

has_more boolean

Whether or not there are more elements available after this set. If false, this set comprises the end of the list.


Get a deck

curl https://api.recall.cards/v1/decks/deck_5gvuzRdHW2ac \
-u YOUR_API_KEY:

There are no parameters for this endpoint.

Returns

Returns the deck object.


Delete a deck

Deleting a deck will delete in cascade all its cards, deck fields, card layouts, and card layout fields.

curl https://api.recall.cards/v1/decks/deck_5gvuzRdHW2ac \
-u YOUR_API_KEY: \
-X DELETE

There are no parameters for this endpoint.

Returns

{
"id": "deck_5gvuzRdHW2ac",
"object": "deck",
"deleted": true
}