Card layout fields

This object represents a field in a card layout in Recall. Card layout fields define how deck fields are displayed in a card layout.

Endpoints

POST /v1/card_layout_fields # Create a new card layout field
POST /v1/card_layout_fields/:id # Update a card layout field
GET /v1/card_layout_fields # List all card layout fields
GET /v1/card_layout_fields/:id # Get a card layout field
DELETE /v1/card_layout_fields/:id # Delete a card layout field

The card layout field object

{
"id": "layout_field_7h8j9k0l1m2n",
"object": "card_layout_field",
"card_layout_id": "layout_yT9ktMcdzg4e",
"color": "primary",
"deck_field_id": "field_5gvuzRdHW2ac",
"font_size": "md",
"font_weight": "bold",
"is_front": true,
"order": 1,
}
id string

The ID of the card layout field.

object string, value is "card_layout_field"

The type of object.

card_layout_id string

The ID of the card layout the field belongs to.

color enum

The color of the text.

primary
Primary (highest contrast)
secondary
Secondary
tertiary
Tertiary
deck_field_id string

The ID of the deck field to display.

font_size enum

The font size of the text.

sm
Small
md
Normal
lg
Large
xl
Huge
font_weight enum

The font weight of the text.

regular
Regular
bold
Bold
is_front boolean

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

order integer

The position of the field in the card, in the side of the card (front or back).


Create a card layout field

curl https://api.recall.cards/v1/card_layout_fields \
-u YOUR_API_KEY: \
-H "Content-Type: application/json" \
-d '{
"card_layout_id": "layout_yT9ktMcdzg4e",
"deck_field_id": "field_5gvuzRdHW2ac",
"order": 1,
"is_front": true,
"color": "primary",
"font_size": "md",
"font_weight": "bold"
}'
card_layout_id string required

The ID of the card layout the field belongs to.

deck_field_id string required

The ID of the deck field to display.

order integer

The position of the field in the card, in the side of the card (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
is_front boolean, default is true

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

Returns

Returns the created card layout field object.


Update a card layout field

curl https://api.recall.cards/v1/card_layout_fields/layout_field_7h8j9k0l1m2n \
-u YOUR_API_KEY: \
-H "Content-Type: application/json" \
-d '{
"font_weight": "bold"
}'
color enum

The color of the text.

primary
Primary (highest contrast)
secondary
Secondary
tertiary
Tertiary
font_size enum

The font size of the text.

sm
Small
md
Normal
lg
Large
xl
Huge
font_weight enum

The font weight of the text.

regular
Regular
bold
Bold
is_front boolean

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

order integer

The position of the field in the card, in the side of the card (front or back).

Returns

Returns the updated card layout field object.


List all card layout fields

curl https://api.recall.cards/v1/card_layout_fields \
-u YOUR_API_KEY: \
-d '{
"card_layout_id": "layout_yT9ktMcdzg4e"
}'
card_layout_id string

Filter the card layout fields by the ID of the card layout they belong to.

limit optional, default is 10

The maximum number of card layout 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.

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": false,
"data": [
// Card layout field objects...
],
}
object string, value is "list"

The type of object returned.

data array

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

curl https://api.recall.cards/v1/card_layout_fields/layout_field_7h8j9k0l1m2n \
-u YOUR_API_KEY:

Returns

Returns the card layout field object.


Delete a card layout field

curl https://api.recall.cards/v1/card_layout_fields/layout_field_7h8j9k0l1m2n \
-u YOUR_API_KEY: \
-X DELETE

Returns

Returns the deleted card layout field object.

{
"id": "layout_field_7h8j9k0l1m2n",
"object": "card_layout_field",
"deleted": true
}
Card layout fields | Recall API reference