Library
Libraries, collections, and bookmarks
curl -X GET "https://example.com/library/bookmarks/"fetch("https://example.com/library/bookmarks/")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/bookmarks/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/bookmarks/"
response = requests.request("GET", url)
print(response.text)Create a new bookmark
Request Body
application/jsonRequiredexternalIdsRequiredobjectnameRequiredstringaddressstringlatRequirednumberlngRequirednumbericonstringiconPackstringiconColorstringfrequentTypestringcollectionIdsRequiredarray<string>Response Body
curl -X POST "https://example.com/library/bookmarks/" \
-H "Content-Type: application/json" \
-d '{
"externalIds": {},
"name": "string",
"address": "string",
"lat": 0,
"lng": 0,
"icon": "string",
"iconPack": "lucide",
"iconColor": "string",
"frequentType": "home",
"collectionIds": [
"string"
]
}'const body = JSON.stringify({
"externalIds": {},
"name": "string",
"address": "string",
"lat": 0,
"lng": 0,
"icon": "string",
"iconPack": "lucide",
"iconColor": "string",
"frequentType": "home",
"collectionIds": [
"string"
]
})
fetch("https://example.com/library/bookmarks/", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/library/bookmarks/"
body := strings.NewReader(`{
"externalIds": {},
"name": "string",
"address": "string",
"lat": 0,
"lng": 0,
"icon": "string",
"iconPack": "lucide",
"iconColor": "string",
"frequentType": "home",
"collectionIds": [
"string"
]
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/bookmarks/"
body = {
"externalIds": {},
"name": "string",
"address": "string",
"lat": 0,
"lng": 0,
"icon": "string",
"iconPack": "lucide",
"iconColor": "string",
"frequentType": "home",
"collectionIds": [
"string"
]
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)Remove bookmark from collections
Request Body
application/jsonRequiredcollectionIdsRequiredarray<string>Path Parameters
idRequiredstringResponse Body
curl -X DELETE "https://example.com/library/bookmarks/string" \
-H "Content-Type: application/json" \
-d '{
"collectionIds": [
"string"
]
}'const body = JSON.stringify({
"collectionIds": [
"string"
]
})
fetch("https://example.com/library/bookmarks/string", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/library/bookmarks/string"
body := strings.NewReader(`{
"collectionIds": [
"string"
]
}`)
req, _ := http.NewRequest("DELETE", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/bookmarks/string"
body = {
"collectionIds": [
"string"
]
}
response = requests.request("DELETE", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)Update a bookmark
Request Body
application/jsonRequirednamestringaddressstringlatnumberlngnumberfrequentTypestring | null | nullcollectionIdsarray<string>Path Parameters
idRequiredstringResponse Body
curl -X PUT "https://example.com/library/bookmarks/string" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"address": "string",
"lat": 0,
"lng": 0,
"frequentType": "home",
"collectionIds": [
"string"
]
}'const body = JSON.stringify({
"name": "string",
"address": "string",
"lat": 0,
"lng": 0,
"frequentType": "home",
"collectionIds": [
"string"
]
})
fetch("https://example.com/library/bookmarks/string", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/library/bookmarks/string"
body := strings.NewReader(`{
"name": "string",
"address": "string",
"lat": 0,
"lng": 0,
"frequentType": "home",
"collectionIds": [
"string"
]
}`)
req, _ := http.NewRequest("PUT", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/bookmarks/string"
body = {
"name": "string",
"address": "string",
"lat": 0,
"lng": 0,
"frequentType": "home",
"collectionIds": [
"string"
]
}
response = requests.request("PUT", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)curl -X GET "https://example.com/library/bookmarks/frequents"fetch("https://example.com/library/bookmarks/frequents")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/bookmarks/frequents"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/bookmarks/frequents"
response = requests.request("GET", url)
print(response.text)curl -X GET "https://example.com/library/bookmarks/string/collections"fetch("https://example.com/library/bookmarks/string/collections")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/bookmarks/string/collections"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/bookmarks/string/collections"
response = requests.request("GET", url)
print(response.text)curl -X DELETE "https://example.com/library/canvases/string/archive"fetch("https://example.com/library/canvases/string/archive")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/canvases/string/archive"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/canvases/string/archive"
response = requests.request("DELETE", url)
print(response.text)Archive a canvas
Takes the canvas off the map and out of the main list without deleting it. Archived ones still come back from the list endpoint, with archivedAt set.
Path Parameters
idRequiredstringResponse Body
curl -X PUT "https://example.com/library/canvases/string/archive"fetch("https://example.com/library/canvases/string/archive")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/canvases/string/archive"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/canvases/string/archive"
response = requests.request("PUT", url)
print(response.text)curl -X GET "https://example.com/library/canvases/"fetch("https://example.com/library/canvases/")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/canvases/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/canvases/"
response = requests.request("GET", url)
print(response.text)curl -X POST "https://example.com/library/canvases/" \
-H "Content-Type: application/json" \
-d '{
"scheme": "server-key",
"isPublic": true
}'const body = JSON.stringify({
"scheme": "server-key",
"isPublic": true
})
fetch("https://example.com/library/canvases/", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/library/canvases/"
body := strings.NewReader(`{
"scheme": "server-key",
"isPublic": true
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/canvases/"
body = {
"scheme": "server-key",
"isPublic": true
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)curl -X GET "https://example.com/library/canvases/string"fetch("https://example.com/library/canvases/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/canvases/string"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/canvases/string"
response = requests.request("GET", url)
print(response.text)curl -X DELETE "https://example.com/library/canvases/string"fetch("https://example.com/library/canvases/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/canvases/string"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/canvases/string"
response = requests.request("DELETE", url)
print(response.text)Update a canvas
Returns the canvas without its body: a canvas saves itself as it is edited, and the document it has just sent is the one thing the client already holds. Read it back with GET /canvases/:id.
Request Body
application/jsonRequiredisPublicbooleannamestring | null | nulldescriptionstring | null | nulliconstring | null | nulliconColorstring | null | nullbodynullmetadataEncryptedstring | null | nullmetadataKeyVersionnumberbodyEncryptedstring | null | nullPath Parameters
idRequiredstringResponse Body
curl -X PUT "https://example.com/library/canvases/string" \
-H "Content-Type: application/json" \
-d '{
"isPublic": true,
"name": "string",
"description": "string",
"icon": "string",
"iconColor": "string",
"body": {},
"metadataEncrypted": "string",
"metadataKeyVersion": 0,
"bodyEncrypted": "string"
}'const body = JSON.stringify({
"isPublic": true,
"name": "string",
"description": "string",
"icon": "string",
"iconColor": "string",
"body": {},
"metadataEncrypted": "string",
"metadataKeyVersion": 0,
"bodyEncrypted": "string"
})
fetch("https://example.com/library/canvases/string", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/library/canvases/string"
body := strings.NewReader(`{
"isPublic": true,
"name": "string",
"description": "string",
"icon": "string",
"iconColor": "string",
"body": {},
"metadataEncrypted": "string",
"metadataKeyVersion": 0,
"bodyEncrypted": "string"
}`)
req, _ := http.NewRequest("PUT", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/canvases/string"
body = {
"isPublic": true,
"name": "string",
"description": "string",
"icon": "string",
"iconColor": "string",
"body": {},
"metadataEncrypted": "string",
"metadataKeyVersion": 0,
"bodyEncrypted": "string"
}
response = requests.request("PUT", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)Change a canvas encryption scheme
Request Body
application/jsonRequiredtargetSchemeRequiredstringnamestring | null | nulldescriptionstring | null | nulliconstring | null | nulliconColorstring | null | nullbodynullmetadataEncryptedstring | null | nullmetadataKeyVersionnumberbodyEncryptedstring | null | nullPath Parameters
idRequiredstringResponse Body
curl -X POST "https://example.com/library/canvases/string/change-scheme" \
-H "Content-Type: application/json" \
-d '{
"targetScheme": "server-key",
"name": "string",
"description": "string",
"icon": "string",
"iconColor": "string",
"body": {},
"metadataEncrypted": "string",
"metadataKeyVersion": 0,
"bodyEncrypted": "string"
}'const body = JSON.stringify({
"targetScheme": "server-key",
"name": "string",
"description": "string",
"icon": "string",
"iconColor": "string",
"body": {},
"metadataEncrypted": "string",
"metadataKeyVersion": 0,
"bodyEncrypted": "string"
})
fetch("https://example.com/library/canvases/string/change-scheme", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/library/canvases/string/change-scheme"
body := strings.NewReader(`{
"targetScheme": "server-key",
"name": "string",
"description": "string",
"icon": "string",
"iconColor": "string",
"body": {},
"metadataEncrypted": "string",
"metadataKeyVersion": 0,
"bodyEncrypted": "string"
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/canvases/string/change-scheme"
body = {
"targetScheme": "server-key",
"name": "string",
"description": "string",
"icon": "string",
"iconColor": "string",
"body": {},
"metadataEncrypted": "string",
"metadataKeyVersion": 0,
"bodyEncrypted": "string"
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)curl -X POST "https://example.com/library/canvases/string/public-link"fetch("https://example.com/library/canvases/string/public-link")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/canvases/string/public-link"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/canvases/string/public-link"
response = requests.request("POST", url)
print(response.text)curl -X DELETE "https://example.com/library/canvases/string/public-link"fetch("https://example.com/library/canvases/string/public-link")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/canvases/string/public-link"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/canvases/string/public-link"
response = requests.request("DELETE", url)
print(response.text)curl -X GET "https://example.com/library/collections/"fetch("https://example.com/library/collections/")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/collections/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/collections/"
response = requests.request("GET", url)
print(response.text)Create a new collection
Creates a collection, server-key unless scheme says otherwise. A server-key collection takes cleartext metadata. A user-e2ee collection takes none: the client seals it with PUT /:id once the id exists, and cleartext fields are rejected with 400.
Request Body
application/jsonRequirednamestringdescriptionstringiconstringiconPackstringiconColorstringschemestringmetadataEncryptedstring65536metadataKeyVersionstring | integerisPublicbooleanResponse Body
curl -X POST "https://example.com/library/collections/" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string",
"icon": "string",
"iconPack": "lucide",
"iconColor": "string",
"scheme": "server-key",
"metadataEncrypted": "string",
"metadataKeyVersion": 0,
"isPublic": true
}'const body = JSON.stringify({
"name": "string",
"description": "string",
"icon": "string",
"iconPack": "lucide",
"iconColor": "string",
"scheme": "server-key",
"metadataEncrypted": "string",
"metadataKeyVersion": 0,
"isPublic": true
})
fetch("https://example.com/library/collections/", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/library/collections/"
body := strings.NewReader(`{
"name": "string",
"description": "string",
"icon": "string",
"iconPack": "lucide",
"iconColor": "string",
"scheme": "server-key",
"metadataEncrypted": "string",
"metadataKeyVersion": 0,
"isPublic": true
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/collections/"
body = {
"name": "string",
"description": "string",
"icon": "string",
"iconPack": "lucide",
"iconColor": "string",
"scheme": "server-key",
"metadataEncrypted": "string",
"metadataKeyVersion": 0,
"isPublic": true
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)curl -X GET "https://example.com/library/collections/shared-with-me"fetch("https://example.com/library/collections/shared-with-me")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/collections/shared-with-me"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/collections/shared-with-me"
response = requests.request("GET", url)
print(response.text)curl -X GET "https://example.com/library/collections/string"fetch("https://example.com/library/collections/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/collections/string"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/collections/string"
response = requests.request("GET", url)
print(response.text)curl -X DELETE "https://example.com/library/collections/string"fetch("https://example.com/library/collections/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/collections/string"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/collections/string"
response = requests.request("DELETE", url)
print(response.text)Update a collection
Server-key collections take cleartext metadata, which also clears any legacy envelope. User-e2ee collections take only metadataEncrypted; cleartext fields are rejected with 400.
Request Body
application/jsonRequirednamestringdescriptionstringiconstringiconPackstringiconColorstringmetadataEncryptedstring65536isPublicbooleanPath Parameters
idRequiredstringResponse Body
curl -X PUT "https://example.com/library/collections/string" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string",
"icon": "string",
"iconPack": "lucide",
"iconColor": "string",
"metadataEncrypted": "string",
"isPublic": true
}'const body = JSON.stringify({
"name": "string",
"description": "string",
"icon": "string",
"iconPack": "lucide",
"iconColor": "string",
"metadataEncrypted": "string",
"isPublic": true
})
fetch("https://example.com/library/collections/string", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/library/collections/string"
body := strings.NewReader(`{
"name": "string",
"description": "string",
"icon": "string",
"iconPack": "lucide",
"iconColor": "string",
"metadataEncrypted": "string",
"isPublic": true
}`)
req, _ := http.NewRequest("PUT", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/collections/string"
body = {
"name": "string",
"description": "string",
"icon": "string",
"iconPack": "lucide",
"iconColor": "string",
"metadataEncrypted": "string",
"isPublic": true
}
response = requests.request("PUT", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)curl -X DELETE "https://example.com/library/collections/string/archive"fetch("https://example.com/library/collections/string/archive")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/collections/string/archive"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/collections/string/archive"
response = requests.request("DELETE", url)
print(response.text)Archive a collection
Files the collection away for the caller only: owners and share recipients each keep their own archive. Archived collections still come back from the list endpoints, with archivedAt set.
Path Parameters
idRequiredstringResponse Body
curl -X PUT "https://example.com/library/collections/string/archive"fetch("https://example.com/library/collections/string/archive")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/collections/string/archive"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/collections/string/archive"
response = requests.request("PUT", url)
print(response.text)Change a collection's encryption scheme
Metadata moves with the scheme: upgrading to user-e2ee requires newMetadataEncrypted and clears the cleartext fields; downgrading to server-key requires metadata and clears the envelope.
Request Body
application/jsonRequiredtargetSchemeRequiredstringnewMetadataEncryptedstring65536metadataobjectnewMetadataKeyVersionRequiredstring | integerexpectedUpdatedAtstringnewEncryptedPointsarray<object>newBookmarksarray<object>updatedShareEnvelopesRequiredarray<object>Path Parameters
idRequiredstringResponse Body
curl -X POST "https://example.com/library/collections/string/change-scheme" \
-H "Content-Type: application/json" \
-d '{
"targetScheme": "server-key",
"newMetadataEncrypted": "string",
"metadata": {
"name": "string",
"description": "string",
"icon": "string",
"iconPack": "lucide",
"iconColor": "string"
},
"newMetadataKeyVersion": 0,
"expectedUpdatedAt": "string",
"newEncryptedPoints": [
{
"id": "string",
"encryptedData": "string",
"nonce": "string"
}
],
"newBookmarks": [
{
"id": "string",
"externalIds": {},
"name": "string",
"address": "string",
"lat": 0,
"lng": 0,
"icon": "string",
"iconPack": "lucide",
"iconColor": "string",
"frequentType": "string"
}
],
"updatedShareEnvelopes": [
{
"recipientHandle": "string",
"encryptedData": "string",
"nonce": "string"
}
]
}'const body = JSON.stringify({
"targetScheme": "server-key",
"newMetadataEncrypted": "string",
"metadata": {
"name": "string",
"description": "string",
"icon": "string",
"iconPack": "lucide",
"iconColor": "string"
},
"newMetadataKeyVersion": 0,
"expectedUpdatedAt": "string",
"newEncryptedPoints": [
{
"id": "string",
"encryptedData": "string",
"nonce": "string"
}
],
"newBookmarks": [
{
"id": "string",
"externalIds": {},
"name": "string",
"address": "string",
"lat": 0,
"lng": 0,
"icon": "string",
"iconPack": "lucide",
"iconColor": "string",
"frequentType": "string"
}
],
"updatedShareEnvelopes": [
{
"recipientHandle": "string",
"encryptedData": "string",
"nonce": "string"
}
]
})
fetch("https://example.com/library/collections/string/change-scheme", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/library/collections/string/change-scheme"
body := strings.NewReader(`{
"targetScheme": "server-key",
"newMetadataEncrypted": "string",
"metadata": {
"name": "string",
"description": "string",
"icon": "string",
"iconPack": "lucide",
"iconColor": "string"
},
"newMetadataKeyVersion": 0,
"expectedUpdatedAt": "string",
"newEncryptedPoints": [
{
"id": "string",
"encryptedData": "string",
"nonce": "string"
}
],
"newBookmarks": [
{
"id": "string",
"externalIds": {},
"name": "string",
"address": "string",
"lat": 0,
"lng": 0,
"icon": "string",
"iconPack": "lucide",
"iconColor": "string",
"frequentType": "string"
}
],
"updatedShareEnvelopes": [
{
"recipientHandle": "string",
"encryptedData": "string",
"nonce": "string"
}
]
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/collections/string/change-scheme"
body = {
"targetScheme": "server-key",
"newMetadataEncrypted": "string",
"metadata": {
"name": "string",
"description": "string",
"icon": "string",
"iconPack": "lucide",
"iconColor": "string"
},
"newMetadataKeyVersion": 0,
"expectedUpdatedAt": "string",
"newEncryptedPoints": [
{
"id": "string",
"encryptedData": "string",
"nonce": "string"
}
],
"newBookmarks": [
{
"id": "string",
"externalIds": {},
"name": "string",
"address": "string",
"lat": 0,
"lng": 0,
"icon": "string",
"iconPack": "lucide",
"iconColor": "string",
"frequentType": "string"
}
],
"updatedShareEnvelopes": [
{
"recipientHandle": "string",
"encryptedData": "string",
"nonce": "string"
}
]
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)Rotate the collection key: re-encrypt content, rewrap remaining shares, drop revoked
The bundle must carry every stored point by id and an envelope for every recipient not being revoked; otherwise nothing changes and the response is 409.
Request Body
application/jsonRequirednewMetadataEncryptedRequiredstring65536newMetadataKeyVersionRequiredstring | integernewEncryptedPointsRequiredarray<object>updatedShareEnvelopesRequiredarray<object>revokeRecipientHandlesRequiredarray<string>Path Parameters
idRequiredstringResponse Body
curl -X POST "https://example.com/library/collections/string/rotate-key" \
-H "Content-Type: application/json" \
-d '{
"newMetadataEncrypted": "string",
"newMetadataKeyVersion": 0,
"newEncryptedPoints": [
{
"id": "string",
"encryptedData": "string",
"nonce": "string"
}
],
"updatedShareEnvelopes": [
{
"recipientHandle": "string",
"encryptedData": "string",
"nonce": "string"
}
],
"revokeRecipientHandles": [
"string"
]
}'const body = JSON.stringify({
"newMetadataEncrypted": "string",
"newMetadataKeyVersion": 0,
"newEncryptedPoints": [
{
"id": "string",
"encryptedData": "string",
"nonce": "string"
}
],
"updatedShareEnvelopes": [
{
"recipientHandle": "string",
"encryptedData": "string",
"nonce": "string"
}
],
"revokeRecipientHandles": [
"string"
]
})
fetch("https://example.com/library/collections/string/rotate-key", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/library/collections/string/rotate-key"
body := strings.NewReader(`{
"newMetadataEncrypted": "string",
"newMetadataKeyVersion": 0,
"newEncryptedPoints": [
{
"id": "string",
"encryptedData": "string",
"nonce": "string"
}
],
"updatedShareEnvelopes": [
{
"recipientHandle": "string",
"encryptedData": "string",
"nonce": "string"
}
],
"revokeRecipientHandles": [
"string"
]
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/collections/string/rotate-key"
body = {
"newMetadataEncrypted": "string",
"newMetadataKeyVersion": 0,
"newEncryptedPoints": [
{
"id": "string",
"encryptedData": "string",
"nonce": "string"
}
],
"updatedShareEnvelopes": [
{
"recipientHandle": "string",
"encryptedData": "string",
"nonce": "string"
}
],
"revokeRecipientHandles": [
"string"
]
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)curl -X POST "https://example.com/library/collections/string/public-link"fetch("https://example.com/library/collections/string/public-link")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/collections/string/public-link"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/collections/string/public-link"
response = requests.request("POST", url)
print(response.text)curl -X DELETE "https://example.com/library/collections/string/public-link"fetch("https://example.com/library/collections/string/public-link")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/collections/string/public-link"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/collections/string/public-link"
response = requests.request("DELETE", url)
print(response.text)curl -X GET "https://example.com/library/collections/string/encrypted-points"fetch("https://example.com/library/collections/string/encrypted-points")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/collections/string/encrypted-points"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/collections/string/encrypted-points"
response = requests.request("GET", url)
print(response.text)Create an encrypted point
Pass id when the envelope was sealed with it: the point AAD binds the point id, so the client mints it before encrypting.
Request Body
application/jsonRequiredidstring8Maximum length: 64encryptedDataRequiredstring65536nonceRequiredstring256Path Parameters
idRequiredstringResponse Body
curl -X POST "https://example.com/library/collections/string/encrypted-points" \
-H "Content-Type: application/json" \
-d '{
"id": "stringst",
"encryptedData": "string",
"nonce": "string"
}'const body = JSON.stringify({
"id": "stringst",
"encryptedData": "string",
"nonce": "string"
})
fetch("https://example.com/library/collections/string/encrypted-points", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/library/collections/string/encrypted-points"
body := strings.NewReader(`{
"id": "stringst",
"encryptedData": "string",
"nonce": "string"
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/collections/string/encrypted-points"
body = {
"id": "stringst",
"encryptedData": "string",
"nonce": "string"
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)curl -X DELETE "https://example.com/library/collections/string/encrypted-points/string"fetch("https://example.com/library/collections/string/encrypted-points/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/collections/string/encrypted-points/string"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/collections/string/encrypted-points/string"
response = requests.request("DELETE", url)
print(response.text)Update an encrypted point
Request Body
application/jsonRequiredencryptedDataRequiredstring65536nonceRequiredstring256Path Parameters
idRequiredstringpointIdRequiredstringResponse Body
curl -X PUT "https://example.com/library/collections/string/encrypted-points/string" \
-H "Content-Type: application/json" \
-d '{
"encryptedData": "string",
"nonce": "string"
}'const body = JSON.stringify({
"encryptedData": "string",
"nonce": "string"
})
fetch("https://example.com/library/collections/string/encrypted-points/string", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/library/collections/string/encrypted-points/string"
body := strings.NewReader(`{
"encryptedData": "string",
"nonce": "string"
}`)
req, _ := http.NewRequest("PUT", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/collections/string/encrypted-points/string"
body = {
"encryptedData": "string",
"nonce": "string"
}
response = requests.request("PUT", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)curl -X DELETE "https://example.com/library/routes/string/archive"fetch("https://example.com/library/routes/string/archive")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/routes/string/archive"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/routes/string/archive"
response = requests.request("DELETE", url)
print(response.text)Archive a route
Takes the route off the map and out of the main list without deleting it. Archived ones still come back from the list endpoint, with archivedAt set.
Path Parameters
idRequiredstringResponse Body
curl -X PUT "https://example.com/library/routes/string/archive"fetch("https://example.com/library/routes/string/archive")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/routes/string/archive"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/routes/string/archive"
response = requests.request("PUT", url)
print(response.text)curl -X GET "https://example.com/library/routes/"fetch("https://example.com/library/routes/")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/routes/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/routes/"
response = requests.request("GET", url)
print(response.text)Create a custom route
Request Body
application/jsonRequiredmodestringschemestringisPublicbooleanResponse Body
curl -X POST "https://example.com/library/routes/" \
-H "Content-Type: application/json" \
-d '{
"mode": "walking",
"scheme": "server-key",
"isPublic": true
}'const body = JSON.stringify({
"mode": "walking",
"scheme": "server-key",
"isPublic": true
})
fetch("https://example.com/library/routes/", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/library/routes/"
body := strings.NewReader(`{
"mode": "walking",
"scheme": "server-key",
"isPublic": true
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/routes/"
body = {
"mode": "walking",
"scheme": "server-key",
"isPublic": true
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)curl -X GET "https://example.com/library/routes/string"fetch("https://example.com/library/routes/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/routes/string"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/routes/string"
response = requests.request("GET", url)
print(response.text)curl -X DELETE "https://example.com/library/routes/string"fetch("https://example.com/library/routes/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/routes/string"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/routes/string"
response = requests.request("DELETE", url)
print(response.text)Update a custom route
Request Body
application/jsonRequiredmodestringisPublicbooleanmetadataEncryptedstringmetadataKeyVersionnumberbodynulldistancenumber | null | nulldurationnumber | null | nullelevationGainnumber | null | nullelevationLossnumber | null | nullbodyEncryptedstring | null | nullbodyNoncestring | null | nullPath Parameters
idRequiredstringResponse Body
curl -X PUT "https://example.com/library/routes/string" \
-H "Content-Type: application/json" \
-d '{
"mode": "walking",
"isPublic": true,
"metadataEncrypted": "string",
"metadataKeyVersion": 0,
"body": {},
"distance": 0,
"duration": 0,
"elevationGain": 0,
"elevationLoss": 0,
"bodyEncrypted": "string",
"bodyNonce": "string"
}'const body = JSON.stringify({
"mode": "walking",
"isPublic": true,
"metadataEncrypted": "string",
"metadataKeyVersion": 0,
"body": {},
"distance": 0,
"duration": 0,
"elevationGain": 0,
"elevationLoss": 0,
"bodyEncrypted": "string",
"bodyNonce": "string"
})
fetch("https://example.com/library/routes/string", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/library/routes/string"
body := strings.NewReader(`{
"mode": "walking",
"isPublic": true,
"metadataEncrypted": "string",
"metadataKeyVersion": 0,
"body": {},
"distance": 0,
"duration": 0,
"elevationGain": 0,
"elevationLoss": 0,
"bodyEncrypted": "string",
"bodyNonce": "string"
}`)
req, _ := http.NewRequest("PUT", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/routes/string"
body = {
"mode": "walking",
"isPublic": true,
"metadataEncrypted": "string",
"metadataKeyVersion": 0,
"body": {},
"distance": 0,
"duration": 0,
"elevationGain": 0,
"elevationLoss": 0,
"bodyEncrypted": "string",
"bodyNonce": "string"
}
response = requests.request("PUT", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)curl -X POST "https://example.com/library/routes/string/public-link"fetch("https://example.com/library/routes/string/public-link")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/routes/string/public-link"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/routes/string/public-link"
response = requests.request("POST", url)
print(response.text)curl -X DELETE "https://example.com/library/routes/string/public-link"fetch("https://example.com/library/routes/string/public-link")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/library/routes/string/public-link"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/library/routes/string/public-link"
response = requests.request("DELETE", url)
print(response.text)