Sync
Store a replica checkpoint
Full replace of the replica checkpoint. Write permission when auth is on. Rejects unsealed E2EE snapshots.
PUT
/
v1
/
sync
/
checkpoint
Store a replica checkpoint
curl --request PUT \
--url https://api.elanotes.com/v1/sync/checkpoint \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"notes": [
{
"body": "<string>",
"bodyDeviceId": "<string>",
"bodyOpId": "<string>",
"clocks": {},
"deleted": true,
"id": "<string>",
"slug": "<string>",
"tags": "<string>",
"title": "<string>"
}
],
"vaultSeq": 4503599627370495
}
'import requests
url = "https://api.elanotes.com/v1/sync/checkpoint"
payload = {
"notes": [
{
"body": "<string>",
"bodyDeviceId": "<string>",
"bodyOpId": "<string>",
"clocks": {},
"deleted": True,
"id": "<string>",
"slug": "<string>",
"tags": "<string>",
"title": "<string>"
}
],
"vaultSeq": 4503599627370495
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
notes: [
{
body: JSON.stringify('<string>'),
bodyDeviceId: '<string>',
bodyOpId: '<string>',
clocks: {},
deleted: true,
id: '<string>',
slug: '<string>',
tags: '<string>',
title: '<string>'
}
],
vaultSeq: 4503599627370495
})
};
fetch('https://api.elanotes.com/v1/sync/checkpoint', 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.elanotes.com/v1/sync/checkpoint",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'notes' => [
[
'body' => '<string>',
'bodyDeviceId' => '<string>',
'bodyOpId' => '<string>',
'clocks' => [
],
'deleted' => true,
'id' => '<string>',
'slug' => '<string>',
'tags' => '<string>',
'title' => '<string>'
]
],
'vaultSeq' => 4503599627370495
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.elanotes.com/v1/sync/checkpoint"
payload := strings.NewReader("{\n \"notes\": [\n {\n \"body\": \"<string>\",\n \"bodyDeviceId\": \"<string>\",\n \"bodyOpId\": \"<string>\",\n \"clocks\": {},\n \"deleted\": true,\n \"id\": \"<string>\",\n \"slug\": \"<string>\",\n \"tags\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"vaultSeq\": 4503599627370495\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.elanotes.com/v1/sync/checkpoint")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"notes\": [\n {\n \"body\": \"<string>\",\n \"bodyDeviceId\": \"<string>\",\n \"bodyOpId\": \"<string>\",\n \"clocks\": {},\n \"deleted\": true,\n \"id\": \"<string>\",\n \"slug\": \"<string>\",\n \"tags\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"vaultSeq\": 4503599627370495\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.elanotes.com/v1/sync/checkpoint")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"notes\": [\n {\n \"body\": \"<string>\",\n \"bodyDeviceId\": \"<string>\",\n \"bodyOpId\": \"<string>\",\n \"clocks\": {},\n \"deleted\": true,\n \"id\": \"<string>\",\n \"slug\": \"<string>\",\n \"tags\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"vaultSeq\": 4503599627370495\n}"
response = http.request(request)
puts response.read_body{
"notes": [
{
"body": "<string>",
"bodyDeviceId": "<string>",
"bodyOpId": "<string>",
"clocks": {},
"deleted": true,
"id": "<string>",
"slug": "<string>",
"tags": "<string>",
"title": "<string>",
"visibility": "standard"
}
],
"vaultSeq": 4503599627370495
}{
"details": [
{
"@type": "<string>"
}
],
"error": "<string>",
"help": "<string>",
"hint": "<string>",
"message": "<string>",
"reason": "<string>",
"requestId": "<string>",
"statusCode": 0
}{
"details": [
{
"@type": "<string>"
}
],
"error": "<string>",
"help": "<string>",
"hint": "<string>",
"message": "<string>",
"reason": "<string>",
"requestId": "<string>",
"statusCode": 0
}{
"details": [
{
"@type": "<string>"
}
],
"error": "<string>",
"help": "<string>",
"hint": "<string>",
"message": "<string>",
"reason": "<string>",
"requestId": "<string>",
"statusCode": 0
}{
"details": [
{
"@type": "<string>"
}
],
"error": "<string>",
"help": "<string>",
"hint": "<string>",
"message": "<string>",
"reason": "<string>",
"requestId": "<string>",
"statusCode": 0
}Authorizations
Static bearer, WorkOS JWT, or open local when AUTH_REQUIRED is off and no static tokens are set. The token selects the vault; paths do not include vault_id.
Body
application/json
⌘I
Store a replica checkpoint
curl --request PUT \
--url https://api.elanotes.com/v1/sync/checkpoint \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"notes": [
{
"body": "<string>",
"bodyDeviceId": "<string>",
"bodyOpId": "<string>",
"clocks": {},
"deleted": true,
"id": "<string>",
"slug": "<string>",
"tags": "<string>",
"title": "<string>"
}
],
"vaultSeq": 4503599627370495
}
'import requests
url = "https://api.elanotes.com/v1/sync/checkpoint"
payload = {
"notes": [
{
"body": "<string>",
"bodyDeviceId": "<string>",
"bodyOpId": "<string>",
"clocks": {},
"deleted": True,
"id": "<string>",
"slug": "<string>",
"tags": "<string>",
"title": "<string>"
}
],
"vaultSeq": 4503599627370495
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
notes: [
{
body: JSON.stringify('<string>'),
bodyDeviceId: '<string>',
bodyOpId: '<string>',
clocks: {},
deleted: true,
id: '<string>',
slug: '<string>',
tags: '<string>',
title: '<string>'
}
],
vaultSeq: 4503599627370495
})
};
fetch('https://api.elanotes.com/v1/sync/checkpoint', 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.elanotes.com/v1/sync/checkpoint",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'notes' => [
[
'body' => '<string>',
'bodyDeviceId' => '<string>',
'bodyOpId' => '<string>',
'clocks' => [
],
'deleted' => true,
'id' => '<string>',
'slug' => '<string>',
'tags' => '<string>',
'title' => '<string>'
]
],
'vaultSeq' => 4503599627370495
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.elanotes.com/v1/sync/checkpoint"
payload := strings.NewReader("{\n \"notes\": [\n {\n \"body\": \"<string>\",\n \"bodyDeviceId\": \"<string>\",\n \"bodyOpId\": \"<string>\",\n \"clocks\": {},\n \"deleted\": true,\n \"id\": \"<string>\",\n \"slug\": \"<string>\",\n \"tags\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"vaultSeq\": 4503599627370495\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.elanotes.com/v1/sync/checkpoint")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"notes\": [\n {\n \"body\": \"<string>\",\n \"bodyDeviceId\": \"<string>\",\n \"bodyOpId\": \"<string>\",\n \"clocks\": {},\n \"deleted\": true,\n \"id\": \"<string>\",\n \"slug\": \"<string>\",\n \"tags\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"vaultSeq\": 4503599627370495\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.elanotes.com/v1/sync/checkpoint")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"notes\": [\n {\n \"body\": \"<string>\",\n \"bodyDeviceId\": \"<string>\",\n \"bodyOpId\": \"<string>\",\n \"clocks\": {},\n \"deleted\": true,\n \"id\": \"<string>\",\n \"slug\": \"<string>\",\n \"tags\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"vaultSeq\": 4503599627370495\n}"
response = http.request(request)
puts response.read_body{
"notes": [
{
"body": "<string>",
"bodyDeviceId": "<string>",
"bodyOpId": "<string>",
"clocks": {},
"deleted": true,
"id": "<string>",
"slug": "<string>",
"tags": "<string>",
"title": "<string>",
"visibility": "standard"
}
],
"vaultSeq": 4503599627370495
}{
"details": [
{
"@type": "<string>"
}
],
"error": "<string>",
"help": "<string>",
"hint": "<string>",
"message": "<string>",
"reason": "<string>",
"requestId": "<string>",
"statusCode": 0
}{
"details": [
{
"@type": "<string>"
}
],
"error": "<string>",
"help": "<string>",
"hint": "<string>",
"message": "<string>",
"reason": "<string>",
"requestId": "<string>",
"statusCode": 0
}{
"details": [
{
"@type": "<string>"
}
],
"error": "<string>",
"help": "<string>",
"hint": "<string>",
"message": "<string>",
"reason": "<string>",
"requestId": "<string>",
"statusCode": 0
}{
"details": [
{
"@type": "<string>"
}
],
"error": "<string>",
"help": "<string>",
"hint": "<string>",
"message": "<string>",
"reason": "<string>",
"requestId": "<string>",
"statusCode": 0
}
