Update Cards
curl --request PATCH \
--url https://api.supernotes.app/v1/cards \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"[card_id]": {
"data": {
"name": "<string>",
"markup": "<string>",
"html": "<string>",
"ydoc": "<string>",
"icon": "<string>",
"modified_when": "2023-11-07T05:31:56Z",
"targeted_when": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"meta": {},
"daily_date": "<string>",
"h3_index": "<string>"
},
"membership": {
"liked": true,
"opened_when": "2023-11-07T05:31:56Z",
"auto_publish_children": true,
"personal_tags": [
"<string>"
],
"view": {
"sort_ascending": true,
"broadsheet_cols": 123,
"broadsheet_full_width": true,
"attempt_card_match": true,
"map_position": "<string>"
},
"flash_memory": {
"due": 123,
"stability": 123,
"difficulty": 123,
"elapsed_days": 123,
"scheduled_days": 123,
"reps": 123,
"lapses": 123,
"last_review": 123
}
},
"parents": {
"[card_id]": {
"created_when": "2023-11-07T05:31:56Z",
"archived": true,
"cutting": true
}
}
}
}
'import requests
url = "https://api.supernotes.app/v1/cards"
payload = { "[card_id]": {
"data": {
"name": "<string>",
"markup": "<string>",
"html": "<string>",
"ydoc": "<string>",
"icon": "<string>",
"modified_when": "2023-11-07T05:31:56Z",
"targeted_when": "2023-11-07T05:31:56Z",
"tags": ["<string>"],
"meta": {},
"daily_date": "<string>",
"h3_index": "<string>"
},
"membership": {
"liked": True,
"opened_when": "2023-11-07T05:31:56Z",
"auto_publish_children": True,
"personal_tags": ["<string>"],
"view": {
"sort_ascending": True,
"broadsheet_cols": 123,
"broadsheet_full_width": True,
"attempt_card_match": True,
"map_position": "<string>"
},
"flash_memory": {
"due": 123,
"stability": 123,
"difficulty": 123,
"elapsed_days": 123,
"scheduled_days": 123,
"reps": 123,
"lapses": 123,
"last_review": 123
}
},
"parents": { "[card_id]": {
"created_when": "2023-11-07T05:31:56Z",
"archived": True,
"cutting": True
} }
} }
headers = {
"Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
'[card_id]': {
data: {
name: '<string>',
markup: '<string>',
html: '<string>',
ydoc: '<string>',
icon: '<string>',
modified_when: '2023-11-07T05:31:56Z',
targeted_when: '2023-11-07T05:31:56Z',
tags: ['<string>'],
meta: {},
daily_date: '<string>',
h3_index: '<string>'
},
membership: {
liked: true,
opened_when: '2023-11-07T05:31:56Z',
auto_publish_children: true,
personal_tags: ['<string>'],
view: {
sort_ascending: true,
broadsheet_cols: 123,
broadsheet_full_width: true,
attempt_card_match: true,
map_position: '<string>'
},
flash_memory: {
due: 123,
stability: 123,
difficulty: 123,
elapsed_days: 123,
scheduled_days: 123,
reps: 123,
lapses: 123,
last_review: 123
}
},
parents: {
'[card_id]': {created_when: '2023-11-07T05:31:56Z', archived: true, cutting: true}
}
}
})
};
fetch('https://api.supernotes.app/v1/cards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.supernotes.app/v1/cards",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'[card_id]' => [
'data' => [
'name' => '<string>',
'markup' => '<string>',
'html' => '<string>',
'ydoc' => '<string>',
'icon' => '<string>',
'modified_when' => '2023-11-07T05:31:56Z',
'targeted_when' => '2023-11-07T05:31:56Z',
'tags' => [
'<string>'
],
'meta' => [
],
'daily_date' => '<string>',
'h3_index' => '<string>'
],
'membership' => [
'liked' => true,
'opened_when' => '2023-11-07T05:31:56Z',
'auto_publish_children' => true,
'personal_tags' => [
'<string>'
],
'view' => [
'sort_ascending' => true,
'broadsheet_cols' => 123,
'broadsheet_full_width' => true,
'attempt_card_match' => true,
'map_position' => '<string>'
],
'flash_memory' => [
'due' => 123,
'stability' => 123,
'difficulty' => 123,
'elapsed_days' => 123,
'scheduled_days' => 123,
'reps' => 123,
'lapses' => 123,
'last_review' => 123
]
],
'parents' => [
'[card_id]' => [
'created_when' => '2023-11-07T05:31:56Z',
'archived' => true,
'cutting' => true
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.supernotes.app/v1/cards"
payload := strings.NewReader("{\n \"[card_id]\": {\n \"data\": {\n \"name\": \"<string>\",\n \"markup\": \"<string>\",\n \"html\": \"<string>\",\n \"ydoc\": \"<string>\",\n \"icon\": \"<string>\",\n \"modified_when\": \"2023-11-07T05:31:56Z\",\n \"targeted_when\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n \"<string>\"\n ],\n \"meta\": {},\n \"daily_date\": \"<string>\",\n \"h3_index\": \"<string>\"\n },\n \"membership\": {\n \"liked\": true,\n \"opened_when\": \"2023-11-07T05:31:56Z\",\n \"auto_publish_children\": true,\n \"personal_tags\": [\n \"<string>\"\n ],\n \"view\": {\n \"sort_ascending\": true,\n \"broadsheet_cols\": 123,\n \"broadsheet_full_width\": true,\n \"attempt_card_match\": true,\n \"map_position\": \"<string>\"\n },\n \"flash_memory\": {\n \"due\": 123,\n \"stability\": 123,\n \"difficulty\": 123,\n \"elapsed_days\": 123,\n \"scheduled_days\": 123,\n \"reps\": 123,\n \"lapses\": 123,\n \"last_review\": 123\n }\n },\n \"parents\": {\n \"[card_id]\": {\n \"created_when\": \"2023-11-07T05:31:56Z\",\n \"archived\": true,\n \"cutting\": true\n }\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.supernotes.app/v1/cards")
.header("Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"[card_id]\": {\n \"data\": {\n \"name\": \"<string>\",\n \"markup\": \"<string>\",\n \"html\": \"<string>\",\n \"ydoc\": \"<string>\",\n \"icon\": \"<string>\",\n \"modified_when\": \"2023-11-07T05:31:56Z\",\n \"targeted_when\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n \"<string>\"\n ],\n \"meta\": {},\n \"daily_date\": \"<string>\",\n \"h3_index\": \"<string>\"\n },\n \"membership\": {\n \"liked\": true,\n \"opened_when\": \"2023-11-07T05:31:56Z\",\n \"auto_publish_children\": true,\n \"personal_tags\": [\n \"<string>\"\n ],\n \"view\": {\n \"sort_ascending\": true,\n \"broadsheet_cols\": 123,\n \"broadsheet_full_width\": true,\n \"attempt_card_match\": true,\n \"map_position\": \"<string>\"\n },\n \"flash_memory\": {\n \"due\": 123,\n \"stability\": 123,\n \"difficulty\": 123,\n \"elapsed_days\": 123,\n \"scheduled_days\": 123,\n \"reps\": 123,\n \"lapses\": 123,\n \"last_review\": 123\n }\n },\n \"parents\": {\n \"[card_id]\": {\n \"created_when\": \"2023-11-07T05:31:56Z\",\n \"archived\": true,\n \"cutting\": true\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.supernotes.app/v1/cards")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"[card_id]\": {\n \"data\": {\n \"name\": \"<string>\",\n \"markup\": \"<string>\",\n \"html\": \"<string>\",\n \"ydoc\": \"<string>\",\n \"icon\": \"<string>\",\n \"modified_when\": \"2023-11-07T05:31:56Z\",\n \"targeted_when\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n \"<string>\"\n ],\n \"meta\": {},\n \"daily_date\": \"<string>\",\n \"h3_index\": \"<string>\"\n },\n \"membership\": {\n \"liked\": true,\n \"opened_when\": \"2023-11-07T05:31:56Z\",\n \"auto_publish_children\": true,\n \"personal_tags\": [\n \"<string>\"\n ],\n \"view\": {\n \"sort_ascending\": true,\n \"broadsheet_cols\": 123,\n \"broadsheet_full_width\": true,\n \"attempt_card_match\": true,\n \"map_position\": \"<string>\"\n },\n \"flash_memory\": {\n \"due\": 123,\n \"stability\": 123,\n \"difficulty\": 123,\n \"elapsed_days\": 123,\n \"scheduled_days\": 123,\n \"reps\": 123,\n \"lapses\": 123,\n \"last_review\": 123\n }\n },\n \"parents\": {\n \"[card_id]\": {\n \"created_when\": \"2023-11-07T05:31:56Z\",\n \"archived\": true,\n \"cutting\": true\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{}{
"type": "<string>",
"detail": "<string>",
"status": 123
}Cards
Update Cards
Update many cards in one call
PATCH
/
v1
/
cards
Update Cards
curl --request PATCH \
--url https://api.supernotes.app/v1/cards \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"[card_id]": {
"data": {
"name": "<string>",
"markup": "<string>",
"html": "<string>",
"ydoc": "<string>",
"icon": "<string>",
"modified_when": "2023-11-07T05:31:56Z",
"targeted_when": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"meta": {},
"daily_date": "<string>",
"h3_index": "<string>"
},
"membership": {
"liked": true,
"opened_when": "2023-11-07T05:31:56Z",
"auto_publish_children": true,
"personal_tags": [
"<string>"
],
"view": {
"sort_ascending": true,
"broadsheet_cols": 123,
"broadsheet_full_width": true,
"attempt_card_match": true,
"map_position": "<string>"
},
"flash_memory": {
"due": 123,
"stability": 123,
"difficulty": 123,
"elapsed_days": 123,
"scheduled_days": 123,
"reps": 123,
"lapses": 123,
"last_review": 123
}
},
"parents": {
"[card_id]": {
"created_when": "2023-11-07T05:31:56Z",
"archived": true,
"cutting": true
}
}
}
}
'import requests
url = "https://api.supernotes.app/v1/cards"
payload = { "[card_id]": {
"data": {
"name": "<string>",
"markup": "<string>",
"html": "<string>",
"ydoc": "<string>",
"icon": "<string>",
"modified_when": "2023-11-07T05:31:56Z",
"targeted_when": "2023-11-07T05:31:56Z",
"tags": ["<string>"],
"meta": {},
"daily_date": "<string>",
"h3_index": "<string>"
},
"membership": {
"liked": True,
"opened_when": "2023-11-07T05:31:56Z",
"auto_publish_children": True,
"personal_tags": ["<string>"],
"view": {
"sort_ascending": True,
"broadsheet_cols": 123,
"broadsheet_full_width": True,
"attempt_card_match": True,
"map_position": "<string>"
},
"flash_memory": {
"due": 123,
"stability": 123,
"difficulty": 123,
"elapsed_days": 123,
"scheduled_days": 123,
"reps": 123,
"lapses": 123,
"last_review": 123
}
},
"parents": { "[card_id]": {
"created_when": "2023-11-07T05:31:56Z",
"archived": True,
"cutting": True
} }
} }
headers = {
"Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
'[card_id]': {
data: {
name: '<string>',
markup: '<string>',
html: '<string>',
ydoc: '<string>',
icon: '<string>',
modified_when: '2023-11-07T05:31:56Z',
targeted_when: '2023-11-07T05:31:56Z',
tags: ['<string>'],
meta: {},
daily_date: '<string>',
h3_index: '<string>'
},
membership: {
liked: true,
opened_when: '2023-11-07T05:31:56Z',
auto_publish_children: true,
personal_tags: ['<string>'],
view: {
sort_ascending: true,
broadsheet_cols: 123,
broadsheet_full_width: true,
attempt_card_match: true,
map_position: '<string>'
},
flash_memory: {
due: 123,
stability: 123,
difficulty: 123,
elapsed_days: 123,
scheduled_days: 123,
reps: 123,
lapses: 123,
last_review: 123
}
},
parents: {
'[card_id]': {created_when: '2023-11-07T05:31:56Z', archived: true, cutting: true}
}
}
})
};
fetch('https://api.supernotes.app/v1/cards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.supernotes.app/v1/cards",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'[card_id]' => [
'data' => [
'name' => '<string>',
'markup' => '<string>',
'html' => '<string>',
'ydoc' => '<string>',
'icon' => '<string>',
'modified_when' => '2023-11-07T05:31:56Z',
'targeted_when' => '2023-11-07T05:31:56Z',
'tags' => [
'<string>'
],
'meta' => [
],
'daily_date' => '<string>',
'h3_index' => '<string>'
],
'membership' => [
'liked' => true,
'opened_when' => '2023-11-07T05:31:56Z',
'auto_publish_children' => true,
'personal_tags' => [
'<string>'
],
'view' => [
'sort_ascending' => true,
'broadsheet_cols' => 123,
'broadsheet_full_width' => true,
'attempt_card_match' => true,
'map_position' => '<string>'
],
'flash_memory' => [
'due' => 123,
'stability' => 123,
'difficulty' => 123,
'elapsed_days' => 123,
'scheduled_days' => 123,
'reps' => 123,
'lapses' => 123,
'last_review' => 123
]
],
'parents' => [
'[card_id]' => [
'created_when' => '2023-11-07T05:31:56Z',
'archived' => true,
'cutting' => true
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.supernotes.app/v1/cards"
payload := strings.NewReader("{\n \"[card_id]\": {\n \"data\": {\n \"name\": \"<string>\",\n \"markup\": \"<string>\",\n \"html\": \"<string>\",\n \"ydoc\": \"<string>\",\n \"icon\": \"<string>\",\n \"modified_when\": \"2023-11-07T05:31:56Z\",\n \"targeted_when\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n \"<string>\"\n ],\n \"meta\": {},\n \"daily_date\": \"<string>\",\n \"h3_index\": \"<string>\"\n },\n \"membership\": {\n \"liked\": true,\n \"opened_when\": \"2023-11-07T05:31:56Z\",\n \"auto_publish_children\": true,\n \"personal_tags\": [\n \"<string>\"\n ],\n \"view\": {\n \"sort_ascending\": true,\n \"broadsheet_cols\": 123,\n \"broadsheet_full_width\": true,\n \"attempt_card_match\": true,\n \"map_position\": \"<string>\"\n },\n \"flash_memory\": {\n \"due\": 123,\n \"stability\": 123,\n \"difficulty\": 123,\n \"elapsed_days\": 123,\n \"scheduled_days\": 123,\n \"reps\": 123,\n \"lapses\": 123,\n \"last_review\": 123\n }\n },\n \"parents\": {\n \"[card_id]\": {\n \"created_when\": \"2023-11-07T05:31:56Z\",\n \"archived\": true,\n \"cutting\": true\n }\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.supernotes.app/v1/cards")
.header("Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"[card_id]\": {\n \"data\": {\n \"name\": \"<string>\",\n \"markup\": \"<string>\",\n \"html\": \"<string>\",\n \"ydoc\": \"<string>\",\n \"icon\": \"<string>\",\n \"modified_when\": \"2023-11-07T05:31:56Z\",\n \"targeted_when\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n \"<string>\"\n ],\n \"meta\": {},\n \"daily_date\": \"<string>\",\n \"h3_index\": \"<string>\"\n },\n \"membership\": {\n \"liked\": true,\n \"opened_when\": \"2023-11-07T05:31:56Z\",\n \"auto_publish_children\": true,\n \"personal_tags\": [\n \"<string>\"\n ],\n \"view\": {\n \"sort_ascending\": true,\n \"broadsheet_cols\": 123,\n \"broadsheet_full_width\": true,\n \"attempt_card_match\": true,\n \"map_position\": \"<string>\"\n },\n \"flash_memory\": {\n \"due\": 123,\n \"stability\": 123,\n \"difficulty\": 123,\n \"elapsed_days\": 123,\n \"scheduled_days\": 123,\n \"reps\": 123,\n \"lapses\": 123,\n \"last_review\": 123\n }\n },\n \"parents\": {\n \"[card_id]\": {\n \"created_when\": \"2023-11-07T05:31:56Z\",\n \"archived\": true,\n \"cutting\": true\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.supernotes.app/v1/cards")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"[card_id]\": {\n \"data\": {\n \"name\": \"<string>\",\n \"markup\": \"<string>\",\n \"html\": \"<string>\",\n \"ydoc\": \"<string>\",\n \"icon\": \"<string>\",\n \"modified_when\": \"2023-11-07T05:31:56Z\",\n \"targeted_when\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n \"<string>\"\n ],\n \"meta\": {},\n \"daily_date\": \"<string>\",\n \"h3_index\": \"<string>\"\n },\n \"membership\": {\n \"liked\": true,\n \"opened_when\": \"2023-11-07T05:31:56Z\",\n \"auto_publish_children\": true,\n \"personal_tags\": [\n \"<string>\"\n ],\n \"view\": {\n \"sort_ascending\": true,\n \"broadsheet_cols\": 123,\n \"broadsheet_full_width\": true,\n \"attempt_card_match\": true,\n \"map_position\": \"<string>\"\n },\n \"flash_memory\": {\n \"due\": 123,\n \"stability\": 123,\n \"difficulty\": 123,\n \"elapsed_days\": 123,\n \"scheduled_days\": 123,\n \"reps\": 123,\n \"lapses\": 123,\n \"last_review\": 123\n }\n },\n \"parents\": {\n \"[card_id]\": {\n \"created_when\": \"2023-11-07T05:31:56Z\",\n \"archived\": true,\n \"cutting\": true\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{}{
"type": "<string>",
"detail": "<string>",
"status": 123
}⌘I