Overview

Briefkasten comes with a REST API reachable at https://briefkastenhq.com/api/v1/**. These are based on SvelteKit +server Routes and the code can be found in the monorepo at /apps/web/src/routes/api/v1/*.

Authentication

You can get your API token from the Settings page.

Settings -> API Token

Then you can use your token to authenticate by passing it in the Authorization Header.

createBookmark.ts
const response = await fetch("https://briefkastenhq.com/api/v1/bookmarks", {
  method: "POST"
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <TOKEN>", 
  },
  body: JSON.stringify({
    url: "https://reddit.com",
    title: "Reddit",
  })
})

const body = await response.json()

Last updated on

On this page