Skip to content

Getting started ​

Base URL (beta): https://notes-api.palmcode.cl/api/v1

Self-hosting?

All examples use the hosted PalmNotes beta. If you run your own PalmNotes server, replace https://notes-api.palmcode.cl with your own API origin; everything else stays the same.

  1. In PalmNotes open Settings → Developers and create a token. Pick only the scopes you need.
  2. Copy the token (pn_pat_…). It is shown once.
  3. Make a request:
bash
curl https://notes-api.palmcode.cl/api/v1/notes?limit=5 \
  -H "Authorization: Bearer $PALMNOTES_TOKEN"
ts
const res = await fetch('https://notes-api.palmcode.cl/api/v1/notes?limit=5', {
  headers: { Authorization: `Bearer ${process.env.PALMNOTES_TOKEN}` },
});
const { data, meta } = await res.json();
python
import os, requests

r = requests.get(
    "https://notes-api.palmcode.cl/api/v1/notes",
    params={"limit": 5},
    headers={"Authorization": f"Bearer {os.environ['PALMNOTES_TOKEN']}"},
)
print(r.json()["data"])

Create a note:

bash
curl -X POST https://notes-api.palmcode.cl/api/v1/notes \
  -H "Authorization: Bearer $PALMNOTES_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title":"From the API","content_markdown":"# Hello\n\n- one\n- two","tags":["api"]}'
ts
const res = await fetch('https://notes-api.palmcode.cl/api/v1/notes', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.PALMNOTES_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ title: 'From the API', content_markdown: '# Hello\n\n- one\n- two', tags: ['api'] }),
});
const { data } = await res.json(); // data.id, data.version
python
import os, requests

r = requests.post(
    "https://notes-api.palmcode.cl/api/v1/notes",
    headers={"Authorization": f"Bearer {os.environ['PALMNOTES_TOKEN']}"},
    json={"title": "From the API", "content_markdown": "# Hello\n\n- one\n- two", "tags": ["api"]},
)
print(r.json()["data"]["id"])

Every success response is { "data": …, "meta"?: … }. Every error is { "error": { "code", "message", "request_id" } }.