const headers = new Headers();
headers.append("Content-Type", "application/json");
headers.append("Authorization", "Bearer <ACCESS_KEY>");
const payload = JSON.stringify({
"collection": "field-notes",
"stream": "research",
"event": "Archive reviewed",
"icon": "⌁",
"notify": false
});
const request = {
method: "POST",
headers,
body: payload,
redirect: "follow"
};
fetch("/v2/entries", request)
.then(response => response.text())
.then(result => console.info(result))
.catch(error => console.warn("request failed", error));