List all templates (including the system "Basic" template).
curl https://repple.sh/api/v1/templates \
-H "Authorization: Bearer pk_YOUR_KEY"
{
"templates": [
{
"id": "uuid",
"name": "Basic",
"fields": [
{ "id": "Front", "name": "Front", "type": "text" },
{ "id": "Back", "name": "Back", "type": "text" }
],
"front_fields": ["Front"],
"back_fields": ["Back"],
"auto_reverse": false
}
]
}
Get a single template by ID.
Path parameters
| Name | Type | Description |
|---|
| idrequired |
string |
Template ID |
curl https://repple.sh/api/v1/templates/:id \
-H "Authorization: Bearer pk_YOUR_KEY"
{
"id": "uuid",
"name": "Basic",
"fields": [
{ "id": "Front", "name": "Front", "type": "text" },
{ "id": "Back", "name": "Back", "type": "text" }
],
"front_fields": ["Front"],
"back_fields": ["Back"],
"auto_reverse": false
}
Create a new card template.
Body parameters
| Name | Type | Description |
|---|
| namerequired |
string |
Template name |
| fieldsrequired |
object[] |
Array of field objects with id, name, and type ("text" or "image") |
| front_fieldsrequired |
string[] |
Fields shown on the front |
| back_fieldsrequired |
string[] |
Fields shown on the back |
| auto_reverseoptional |
boolean |
Generate a reverse card (default: false) |
curl -X POST https://repple.sh/api/v1/templates \
-H "Authorization: Bearer pk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Vocabulary", "fields": [{"id": "Word", "name": "Word", "type": "text"}, {"id": "Definition", "name": "Definition", "type": "text"}, {"id": "Example", "name": "Example", "type": "text"}], "front_fields": ["Word"], "back_fields": ["Definition", "Example"]}'
{
"id": "uuid",
"name": "Vocabulary",
"fields": [
{ "id": "Word", "name": "Word", "type": "text" },
{ "id": "Definition", "name": "Definition", "type": "text" },
{ "id": "Example", "name": "Example", "type": "text" }
],
"front_fields": ["Word"],
"back_fields": ["Definition", "Example"],
"auto_reverse": false
}
Update a template. System templates ("Basic") cannot be modified.
Path parameters
| Name | Type | Description |
|---|
| idrequired |
string |
Template ID |
Body parameters
| Name | Type | Description |
|---|
| nameoptional |
string |
New name |
| fieldsoptional |
object[] |
Array of field objects with id, name, and type |
| front_fieldsoptional |
string[] |
Fields shown on the front |
| back_fieldsoptional |
string[] |
Fields shown on the back |
| auto_reverseoptional |
boolean |
Generate a reverse card |
curl -X PATCH https://repple.sh/api/v1/templates/:id \
-H "Authorization: Bearer pk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Updated Vocabulary"}'
{
"id": "uuid",
"name": "Updated Vocabulary",
"fields": [
{ "id": "Word", "name": "Word", "type": "text" },
{ "id": "Definition", "name": "Definition", "type": "text" },
{ "id": "Example", "name": "Example", "type": "text" }
],
"front_fields": ["Word"],
"back_fields": ["Definition", "Example"],
"auto_reverse": false
}
Delete a template and all cards using it. System templates cannot be deleted.
Path parameters
| Name | Type | Description |
|---|
| idrequired |
string |
Template ID |
curl -X DELETE https://repple.sh/api/v1/templates/:id \
-H "Authorization: Bearer pk_YOUR_KEY"
{
"success": true,
"cardsDeleted": 12
}