Parchment Docs

Library

Libraries, collections, and bookmarks

Create a new bookmark

POST
/library/bookmarks

Request Body

application/jsonRequired
externalIdsRequiredobject
nameRequiredstring
addressstring
latRequirednumber
lngRequirednumber
iconstring
iconColorstring
presetTypestring
collectionIdsarray<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",
    "iconColor": "string",
    "presetType": "home",
    "collectionIds": [
      "string"
    ]
  }'
const body = JSON.stringify({
  "externalIds": {},
  "name": "string",
  "address": "string",
  "lat": 0,
  "lng": 0,
  "icon": "string",
  "iconColor": "string",
  "presetType": "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",
    "iconColor": "string",
    "presetType": "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",
  "iconColor": "string",
  "presetType": "home",
  "collectionIds": [
    "string"
  ]
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

Remove bookmark from collections

DELETE
/library/bookmarks/{id}

Request Body

application/jsonRequired
collectionIdsRequiredarray<string>

Path Parameters

idRequiredstring

Response 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)
Empty

Update a bookmark

PUT
/library/bookmarks/{id}

Request Body

application/jsonRequired
namestring
addressstring
latnumber
lngnumber
iconstring
iconColorstring
presetTypestring | null | null
collectionIdsarray<string>

Path Parameters

idRequiredstring

Response Body

curl -X PUT "https://example.com/library/bookmarks/string" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "address": "string",
    "lat": 0,
    "lng": 0,
    "icon": "string",
    "iconColor": "string",
    "presetType": "home",
    "collectionIds": [
      "string"
    ]
  }'
const body = JSON.stringify({
  "name": "string",
  "address": "string",
  "lat": 0,
  "lng": 0,
  "icon": "string",
  "iconColor": "string",
  "presetType": "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,
    "icon": "string",
    "iconColor": "string",
    "presetType": "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,
  "icon": "string",
  "iconColor": "string",
  "presetType": "home",
  "collectionIds": [
    "string"
  ]
}
response = requests.request("PUT", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

Get collections for a bookmark

GET
/library/bookmarks/{id}/collections

Path Parameters

idRequiredstring

Response Body

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)
Empty

Get all collections

GET
/library/collections

Response Body

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)
Empty

Create a new collection

POST
/library/collections

Request Body

application/jsonRequired
nameRequiredstring
descriptionstring
iconstring
iconColorstring
isPublicboolean

Response Body

curl -X POST "https://example.com/library/collections/" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "description": "string",
    "icon": "string",
    "iconColor": "string",
    "isPublic": true
  }'
const body = JSON.stringify({
  "name": "string",
  "description": "string",
  "icon": "string",
  "iconColor": "string",
  "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",
    "iconColor": "string",
    "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",
  "iconColor": "string",
  "isPublic": true
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

Get the default collection

GET
/library/collections/default

Response Body

curl -X GET "https://example.com/library/collections/default"
fetch("https://example.com/library/collections/default")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/library/collections/default"

  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/default"

response = requests.request("GET", url)

print(response.text)
Empty

Get a collection by ID

GET
/library/collections/{id}

Path Parameters

idRequiredstring

Response Body

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)
Empty

Delete a collection

DELETE
/library/collections/{id}

Path Parameters

idRequiredstring

Response Body

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)
Empty

Update a collection

PUT
/library/collections/{id}

Request Body

application/jsonRequired
namestring
descriptionstring
iconstring
iconColorstring
isPublicboolean

Path Parameters

idRequiredstring

Response Body

curl -X PUT "https://example.com/library/collections/string" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "description": "string",
    "icon": "string",
    "iconColor": "string",
    "isPublic": true
  }'
const body = JSON.stringify({
  "name": "string",
  "description": "string",
  "icon": "string",
  "iconColor": "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",
    "iconColor": "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",
  "iconColor": "string",
  "isPublic": true
}
response = requests.request("PUT", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

Toggle sensitive mode for a collection

PUT
/library/collections/{id}/sensitive

Request Body

application/jsonRequired
isSensitiveRequiredboolean

Path Parameters

idRequiredstring

Response Body

curl -X PUT "https://example.com/library/collections/string/sensitive" \
  -H "Content-Type: application/json" \
  -d '{
    "isSensitive": true
  }'
const body = JSON.stringify({
  "isSensitive": true
})

fetch("https://example.com/library/collections/string/sensitive", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://example.com/library/collections/string/sensitive"
  body := strings.NewReader(`{
    "isSensitive": 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/sensitive"
body = {
  "isSensitive": true
}
response = requests.request("PUT", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

Get encrypted points in a collection

GET
/library/collections/{id}/encrypted-points

Path Parameters

idRequiredstring

Response Body

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)
Empty

Create an encrypted point

POST
/library/collections/{id}/encrypted-points

Request Body

application/jsonRequired
encryptedDataRequiredstring
nonceRequiredstring

Path Parameters

idRequiredstring

Response Body

curl -X POST "https://example.com/library/collections/string/encrypted-points" \
  -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", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://example.com/library/collections/string/encrypted-points"
  body := strings.NewReader(`{
    "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 = {
  "encryptedData": "string",
  "nonce": "string"
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

Delete an encrypted point

DELETE
/library/collections/{id}/encrypted-points/{pointId}

Path Parameters

idRequiredstring
pointIdRequiredstring

Response Body

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)
Empty

Update an encrypted point

PUT
/library/collections/{id}/encrypted-points/{pointId}

Request Body

application/jsonRequired
encryptedDataRequiredstring
nonceRequiredstring

Path Parameters

idRequiredstring
pointIdRequiredstring

Response 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)
Empty