Deck fields

This object represents a deck field in Recall. Deck fields are like columns of a database table. The content of a card is structured in deck fields. A deck can have between 2 and 10 deck fields.

Endpoints

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

The deck field object

{
"id": "field_5gvuzRdHW2ac",
"object": "deck_field",
"autofill_generate_from_field_ids": [],
"autofill_language_from": null,
"autofill_language_to": null,
"autofill_prompt": null,
"autofill_type": null,
"deck_id": "deck_5gvuzRdHW2ac",
"is_autofill_enabled": false,
"key": "french-word",
"name": "French word",
"type": "plain_text",
}
id string

Unique identifier for the deck field.

object string, value is "deck_field"

The type of the object.

autofill_generate_from_field_ids array of strings

The IDs of the deck fields the AI Autofill generates the field value from.

autofill_language_from nullable enum

If the autofill_type is translation, this indicates the language to translate the text from.

af
Afrikaans
ar
Arabic
hy
Armenian
az
Azerbaijani
be
Belarusian
bs
Bosnian
bg
Bulgarian
ca
Catalan
zh
Chinese
hr
Croatian
cs
Czech
da
Danish
nl
Dutch
en
English
et
Estonian
fi
Finnish
fr
French
gl
Galician
de
German
el
Greek
he
Hebrew
hi
Hindi
hu
Hungarian
is
Icelandic
id
Indonesian
it
Italian
ja
Japanese
kn
Kannada
kk
Kazakh
ko
Korean
lv
Latvian
lt
Lithuanian
mk
Macedonian
ms
Malay
mr
Marathi
mi
Maori
ne
Nepali
no
Norwegian
fa
Persian
pl
Polish
pt
Portuguese
ro
Romanian
ru
Russian
sr
Serbian
sk
Slovak
sl
Slovenian
es
Spanish
sw
Swahili
sv
Swedish
tl
Tagalog
ta
Tamil
th
Thai
tr
Turkish
uk
Ukrainian
ur
Urdu
vi
Vietnamese
cy
Welsh
autofill_language_to nullable enum

If the autofill_type is translation or text_to_speech, autofill_language_to indicates the language it translates the text to or generates the audio in.

af
Afrikaans
ar
Arabic
hy
Armenian
az
Azerbaijani
be
Belarusian
bs
Bosnian
bg
Bulgarian
ca
Catalan
zh
Chinese
hr
Croatian
cs
Czech
da
Danish
nl
Dutch
en
English
et
Estonian
fi
Finnish
fr
French
gl
Galician
de
German
el
Greek
he
Hebrew
hi
Hindi
hu
Hungarian
is
Icelandic
id
Indonesian
it
Italian
ja
Japanese
kn
Kannada
kk
Kazakh
ko
Korean
lv
Latvian
lt
Lithuanian
mk
Macedonian
ms
Malay
mr
Marathi
mi
Maori
ne
Nepali
no
Norwegian
fa
Persian
pl
Polish
pt
Portuguese
ro
Romanian
ru
Russian
sr
Serbian
sk
Slovak
sl
Slovenian
es
Spanish
sw
Swahili
sv
Swedish
tl
Tagalog
ta
Tamil
th
Thai
tr
Turkish
uk
Ukrainian
ur
Urdu
vi
Vietnamese
cy
Welsh
arb
Arabic
ar-AE
Arabic (Gulf)
ca-ES
Catalan
yue-CN
Chinese (Cantonese)
cmn-CN
Chinese (Mandarin)
cs-CZ
Czech
da-DK
Danish
nl-BE
Dutch (Belgian)
nl-NL
Dutch
en-AU
English (Australian)
en-GB
English (British)
en-IN
English (Indian)
en-NZ
English (New Zealand)
en-SG
English (Singaporean)
en-ZA
English (South African)
en-US
English (US)
fi-FI
Finnish
fr-FR
French
fr-BE
French (Belgian)
fr-CA
French (Canadian)
hi-IN
Hindi
de-DE
German
de-AT
German (Austrian)
de-CH
German (Swiss standard)
it-IT
Italian
ja-JP
Japanese
ko-KR
Korean
nb-NO
Norwegian
pl-PL
Polish
pt-BR
Portuguese (Brazilian)
pt-PT
Portuguese (European)
es-ES
Spanish (Spain)
es-MX
Spanish (Mexican)
es-US
Spanish (US)
sv-SE
Swedish
tr-TR
Turkish
autofill_prompt string

The prompt gives instructions to generate the field value when autofill_type is custom_instruction or image_generation.

Variables are formatted as {{deck_field_id}}. For example, a prompt can be Write a sentence in French using the word {{field_o2AXyzOSksQs}}.

autofill_type nullable enum

The type of AI Autofill to apply to the field.

translation

Translate the field value to the selected language.

answer

Generate a short answer to a question contained in another field.

custom_instruction

Generate any text from one or several other fields, following your own prompt set in autofill_prompt.

text_to_speech

Generate an audio from another field value.

image_generation

Generate an image from another field value.

deck_id string

The ID of the deck the field belongs to.

is_autofill_enabled boolean

Whether the AI Autofill is enabled for the field.

key string

Readable and automatically-generated identifier for the field. It is used to reference the field when creating or updating cards with the API. It is unique within the deck.

name string

The name of the deck field.

type enum

The type of the deck field.

rich_content

Text field that allows break lines, <strong>, <em>, and <a> HTML tags.

plain_text

Text without any formatting. Formatting can be applied uniformly to the field in the card layouts.

audio

Audio that can be played in the card (manually or automatically).

image

Image that can be displayed and zoomed on click in the card.

url

URL to a web page. Only valid URLs are accepted.


Create a deck field

A deck field only requires a type to be created.

If you set is_autofill_enabled to true, you also need to set autofill_type, and other attributes depending on the generation type.

A deck can have up to 10 deck fields.

curl https://api.recall.cards/v1/deck_fields \
-u YOUR_API_KEY: \
-H "Content-Type: application/json" \
-d '{
"deck_id": "deck_5gvuzRdHW2ac",
"name": "Translation",
"type": "plain_text",
"autofill_type": "translation",
"autofill_language_from": "fr",
"autofill_language_to": "en",
"autofill_generate_from_field_ids": ["field_5gvuzRdHW2ac"],
"is_autofill_enabled": true
}'
deck_id string required

The ID of the deck the field belongs to.

autofill_generate_from_field_ids array of strings

The IDs of the deck fields the AI Autofill will generate the field value from. It is optional if you set autofill_prompt when autofill_type is custom_instruction or image_generation. In this case, the IDs will be extracted from the prompt.

autofill_language_from nullable enum, default is null

If the autofill_type is translation, this indicates the language to translate the text from. It is optional but providing it can result in more accurate translations.

af
Afrikaans
ar
Arabic
hy
Armenian
az
Azerbaijani
be
Belarusian
bs
Bosnian
bg
Bulgarian
ca
Catalan
zh
Chinese
hr
Croatian
cs
Czech
da
Danish
nl
Dutch
en
English
et
Estonian
fi
Finnish
fr
French
gl
Galician
de
German
el
Greek
he
Hebrew
hi
Hindi
hu
Hungarian
is
Icelandic
id
Indonesian
it
Italian
ja
Japanese
kn
Kannada
kk
Kazakh
ko
Korean
lv
Latvian
lt
Lithuanian
mk
Macedonian
ms
Malay
mr
Marathi
mi
Maori
ne
Nepali
no
Norwegian
fa
Persian
pl
Polish
pt
Portuguese
ro
Romanian
ru
Russian
sr
Serbian
sk
Slovak
sl
Slovenian
es
Spanish
sw
Swahili
sv
Swedish
tl
Tagalog
ta
Tamil
th
Thai
tr
Turkish
uk
Ukrainian
ur
Urdu
vi
Vietnamese
cy
Welsh
autofill_language_to nullable enum, default is null

If the autofill_type is translation or text_to_speech, autofill_language_to is required and indicates the language to translate the text to or generate the audio in.

af
Afrikaans
ar
Arabic
hy
Armenian
az
Azerbaijani
be
Belarusian
bs
Bosnian
bg
Bulgarian
ca
Catalan
zh
Chinese
hr
Croatian
cs
Czech
da
Danish
nl
Dutch
en
English
et
Estonian
fi
Finnish
fr
French
gl
Galician
de
German
el
Greek
he
Hebrew
hi
Hindi
hu
Hungarian
is
Icelandic
id
Indonesian
it
Italian
ja
Japanese
kn
Kannada
kk
Kazakh
ko
Korean
lv
Latvian
lt
Lithuanian
mk
Macedonian
ms
Malay
mr
Marathi
mi
Maori
ne
Nepali
no
Norwegian
fa
Persian
pl
Polish
pt
Portuguese
ro
Romanian
ru
Russian
sr
Serbian
sk
Slovak
sl
Slovenian
es
Spanish
sw
Swahili
sv
Swedish
tl
Tagalog
ta
Tamil
th
Thai
tr
Turkish
uk
Ukrainian
ur
Urdu
vi
Vietnamese
cy
Welsh
arb
Arabic
ar-AE
Arabic (Gulf)
ca-ES
Catalan
yue-CN
Chinese (Cantonese)
cmn-CN
Chinese (Mandarin)
cs-CZ
Czech
da-DK
Danish
nl-BE
Dutch (Belgian)
nl-NL
Dutch
en-AU
English (Australian)
en-GB
English (British)
en-IN
English (Indian)
en-NZ
English (New Zealand)
en-SG
English (Singaporean)
en-ZA
English (South African)
en-US
English (US)
fi-FI
Finnish
fr-FR
French
fr-BE
French (Belgian)
fr-CA
French (Canadian)
hi-IN
Hindi
de-DE
German
de-AT
German (Austrian)
de-CH
German (Swiss standard)
it-IT
Italian
ja-JP
Japanese
ko-KR
Korean
nb-NO
Norwegian
pl-PL
Polish
pt-BR
Portuguese (Brazilian)
pt-PT
Portuguese (European)
es-ES
Spanish (Spain)
es-MX
Spanish (Mexican)
es-US
Spanish (US)
sv-SE
Swedish
tr-TR
Turkish
autofill_prompt string

Required if the autofill_type is custom_instruction or image_generation. The prompt gives instructions to generate the field value. It must contain at least one variable to be uniquely generated in each card.

Variables are formatted as {{deck_field_id}}. For example, a prompt can be Write a sentence in French using the word {{field_o2AXyzOSksQs}}.

autofill_type nullable enum, default is null

The type of AI Autofill to apply to the field. Required if is_autofill_enabled is true.

translation

Translate the field value to the selected language. Can be set on fields of type plain_text or rich_content. Requires autofill_language_to to be set.

answer

Generate a short answer to a question contained in another field. Can be set on fields of type plain_text or rich_content.

custom_instruction

Generate any text from one or several other fields, following your own prompt set in autofill_prompt. Can be set on fields of type plain_text or rich_content.

text_to_speech

Generate an audio from another field value that is of type plain_text or rich_content, and whose ID is included in autofill_generate_from_field_ids. Can be set on fields of type audio. Requires autofill_language_to to be set.

image_generation

Generate an image from another field value. Can be set on fields of type plain_text or rich_content. Requires autofill_prompt to be set.

is_autofill_enabled boolean, default is false

Whether the AI Autofill is enabled for the field. If false, any AI Autofill settings will be ignored and settings will be set to default values. If true, autofill_type and other properties related to the type are required.

name string

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

type enum required

The type of the deck field.

rich_content

Text field that allows break lines, <strong>, <em>, and <a> HTML tags.

plain_text

Text without any formatting. Formatting can be applied uniformly to the field in the card layouts.

audio

Audio that can be played in the card (manually or automatically).

image

Image that can be displayed and zoomed on click in the card.

url

URL to a web page. Only valid URLs are accepted.

Returns

Returns the created deck field object.


Update a deck field

curl https://api.recall.cards/v1/deck_fields/field_5gvuzRdHW2ac \
-u YOUR_API_KEY: \
-H "Content-Type: application/json" \
-d '{
"is_autofill_enabled": false
}'
autofill_generate_from_field_ids array of strings

The IDs of the deck fields the AI Autofill will generate the field value from. It is optional if you set autofill_prompt when autofill_type is custom_instruction or image_generation. In this case, the IDs will be extracted from the prompt.

autofill_language_from nullable enum, default is null

If the autofill_type is translation, this indicates the language to translate the text from. It is optional but providing it can result in more accurate translations.

af
Afrikaans
ar
Arabic
hy
Armenian
az
Azerbaijani
be
Belarusian
bs
Bosnian
bg
Bulgarian
ca
Catalan
zh
Chinese
hr
Croatian
cs
Czech
da
Danish
nl
Dutch
en
English
et
Estonian
fi
Finnish
fr
French
gl
Galician
de
German
el
Greek
he
Hebrew
hi
Hindi
hu
Hungarian
is
Icelandic
id
Indonesian
it
Italian
ja
Japanese
kn
Kannada
kk
Kazakh
ko
Korean
lv
Latvian
lt
Lithuanian
mk
Macedonian
ms
Malay
mr
Marathi
mi
Maori
ne
Nepali
no
Norwegian
fa
Persian
pl
Polish
pt
Portuguese
ro
Romanian
ru
Russian
sr
Serbian
sk
Slovak
sl
Slovenian
es
Spanish
sw
Swahili
sv
Swedish
tl
Tagalog
ta
Tamil
th
Thai
tr
Turkish
uk
Ukrainian
ur
Urdu
vi
Vietnamese
cy
Welsh
autofill_language_to nullable enum, default is null

If the autofill_type is translation or text_to_speech, autofill_language_to is required and indicates the language to translate the text to or generate the audio in.

af
Afrikaans
ar
Arabic
hy
Armenian
az
Azerbaijani
be
Belarusian
bs
Bosnian
bg
Bulgarian
ca
Catalan
zh
Chinese
hr
Croatian
cs
Czech
da
Danish
nl
Dutch
en
English
et
Estonian
fi
Finnish
fr
French
gl
Galician
de
German
el
Greek
he
Hebrew
hi
Hindi
hu
Hungarian
is
Icelandic
id
Indonesian
it
Italian
ja
Japanese
kn
Kannada
kk
Kazakh
ko
Korean
lv
Latvian
lt
Lithuanian
mk
Macedonian
ms
Malay
mr
Marathi
mi
Maori
ne
Nepali
no
Norwegian
fa
Persian
pl
Polish
pt
Portuguese
ro
Romanian
ru
Russian
sr
Serbian
sk
Slovak
sl
Slovenian
es
Spanish
sw
Swahili
sv
Swedish
tl
Tagalog
ta
Tamil
th
Thai
tr
Turkish
uk
Ukrainian
ur
Urdu
vi
Vietnamese
cy
Welsh
arb
Arabic
ar-AE
Arabic (Gulf)
ca-ES
Catalan
yue-CN
Chinese (Cantonese)
cmn-CN
Chinese (Mandarin)
cs-CZ
Czech
da-DK
Danish
nl-BE
Dutch (Belgian)
nl-NL
Dutch
en-AU
English (Australian)
en-GB
English (British)
en-IN
English (Indian)
en-NZ
English (New Zealand)
en-SG
English (Singaporean)
en-ZA
English (South African)
en-US
English (US)
fi-FI
Finnish
fr-FR
French
fr-BE
French (Belgian)
fr-CA
French (Canadian)
hi-IN
Hindi
de-DE
German
de-AT
German (Austrian)
de-CH
German (Swiss standard)
it-IT
Italian
ja-JP
Japanese
ko-KR
Korean
nb-NO
Norwegian
pl-PL
Polish
pt-BR
Portuguese (Brazilian)
pt-PT
Portuguese (European)
es-ES
Spanish (Spain)
es-MX
Spanish (Mexican)
es-US
Spanish (US)
sv-SE
Swedish
tr-TR
Turkish
autofill_prompt string

Required if the autofill_type is custom_instruction or image_generation. The prompt gives instructions to generate the field value. It must contain at least one variable to be uniquely generated in each card.

Variables are formatted as {{deck_field_id}}. For example, a prompt can be Write a sentence in French using the word {{field_o2AXyzOSksQs}}.

autofill_type nullable enum, default is null

The type of AI Autofill to apply to the field. Required if is_autofill_enabled is true.

translation

Translate the field value to the selected language. Can be set on fields of type plain_text or rich_content. Requires autofill_language_to to be set.

answer

Generate a short answer to a question contained in another field. Can be set on fields of type plain_text or rich_content.

custom_instruction

Generate any text from one or several other fields, following your own prompt set in autofill_prompt. Can be set on fields of type plain_text or rich_content.

text_to_speech

Generate an audio from another field value that is of type plain_text or rich_content, and whose ID is included in autofill_generate_from_field_ids. Can be set on fields of type audio. Requires autofill_language_to to be set.

image_generation

Generate an image from another field value. Can be set on fields of type plain_text or rich_content. Requires autofill_prompt to be set.

is_autofill_enabled boolean, default is false

Whether the AI Autofill is enabled for the field. If false, any AI Autofill settings will be ignored and settings will be set to default values. If true, autofill_type and other properties related to the type are required.

name string

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

type enum required

The type of the deck field.

rich_content

Text field that allows break lines, <strong>, <em>, and <a> HTML tags. Values can be up to 500 characters long.

plain_text

Text without any formatting. Formatting can be applied uniformly to the field in the card layouts. Values can be up to 500 characters long.

audio

Audio that can be played in the card (manually or automatically).

image

Image that can be displayed and zoomed on click in the card.

url

URL to a web page. Only valid URLs are accepted.

Returns

Returns the updated deck field object.


List all deck fields

curl https://api.recall.cards/v1/deck_fields \
-u YOUR_API_KEY:
-d '{
"deck_id": "deck_5gvuzRdHW2ac"
}'
deck_id string

Filter the deck fields by the ID of the deck the field belongs to.

limit optional, default is 10

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

starting_after optional

A cursor to use in pagination. starting_after is an object ID that defines your place in the list. For example, if you make a card list request and receive 100 cards, ending with card_2sdInOpM83eo, your subsequent call can include starting_after=card_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 an object ID that allows you to fetch object in the previous page of the list.

Returns

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

The type of object returned.

data array

An array containing the deck field 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 field

curl https://api.recall.cards/v1/deck_fields/field_5gvuzRdHW2ac \
-u YOUR_API_KEY:

There are no parameters for this endpoint.

Returns

Returns the deck field object.


Delete a deck field

A deck field can be deleted if it is not the only front field in the primary card layout, and if the deck has more than 2 deck fields.

Deleting a deck field will also delete the associated content in the cards, and all the card layout fields that reference it.

curl https://api.recall.cards/v1/deck_fields/field_5gvuzRdHW2ac \
-u YOUR_API_KEY: \
-X DELETE

There are no parameters for this endpoint.

Returns

{
"id": "field_5gvuzRdHW2ac",
"object": "deck_field",
"deleted": true
}
Deck fields | Recall API reference