Developer API Documentation

Access, edit, and manage your notes programmatically. The kashi.io API supports both standard plaintext workspaces and Master Password end-to-end encrypted (E2EE) vaults.

1. Authentication & API Keys

To use the API, you must first generate a developer API key:

  1. Log in to your account on kashi.io/note.php.
  2. Open the Account Settings modal (by clicking your avatar).
  3. Scroll down to the Developer API Key section.
  4. Click Generate Key. Copy the key immediately (e.g. kashi_...), as it will not be displayed again for security.

Every request made to the API must include the API key in the request headers.

Header Description Example Value
X-API-Key Your generated developer key (alternatively, pass as Authorization: Bearer <key>) kashi_8a7d2b...
X-E2EE-Key Your master E2EE password. Required only for E2EE enabled accounts to decrypt/re-encrypt note state. mySecureVaultPassphrase
GET /api/notes.php

Retrieve all notes from your workspace. If a specific note ID is provided as a query parameter, only that note is returned.

Query Parameters:

Example curl request:

curl -H "X-API-Key: kashi_YOUR_API_KEY" \
     -H "X-E2EE-Key: YOUR_E2EE_PASSPHRASE" \
     "http://www.kashi.io/api/notes.php"

Response format:

{
  "success": true,
  "notes": [
    {
      "id": "n_1781100920652_85f3d",
      "title": "Welcome Note",
      "content": "Start writing instantly!",
      "created": 1781100920652,
      "updated": 1781100920652,
      "pinned": false,
      "folderId": "f_inkwell_default",
      "tags": ["welcome"]
    }
  ]
}
POST /api/notes.php

Create a new note in your workspace. The server will automatically generate a unique ID and set the creation and update timestamps.

Request Body (JSON):

{
  "title": "Quick API Note",
  "content": "This is the content of the note.",
  "folderId": "f_inkwell_default",
  "tags": ["inbox", "api"],
  "pinned": false
}

Example curl request:

curl -X POST \
     -H "Content-Type: application/json" \
     -H "X-API-Key: kashi_YOUR_API_KEY" \
     -H "X-E2EE-Key: YOUR_E2EE_PASSPHRASE" \
     -d '{"title": "Quick API Note", "content": "This is the content of the note."}' \
     "http://www.kashi.io/api/notes.php"
PUT /api/notes.php?id={id}

Update fields on an existing note. Specifying title or content will append the new text to the existing values. Other fields (like pinned, folderId, tags) will replace their existing values.

Request Body (JSON):

{
  "title": "Updated Note Title",
  "content": "Updated content text.",
  "pinned": true
}

Example curl request:

curl -X PUT \
     -H "Content-Type: application/json" \
     -H "X-API-Key: kashi_YOUR_API_KEY" \
     -H "X-E2EE-Key: YOUR_E2EE_PASSPHRASE" \
     -d '{"title": "Updated Note Title", "content": "Updated content text."}' \
     "http://www.kashi.io/api/notes.php?id=n_1781100920652_85f3d"
DELETE /api/notes.php?id={id}

Permanently delete a note from the workspace.

Example curl request:

curl -X DELETE \
     -H "X-API-Key: kashi_YOUR_API_KEY" \
     -H "X-E2EE-Key: YOUR_E2EE_PASSPHRASE" \
     "http://www.kashi.io/api/notes.php?id=n_1781100920652_85f3d"