Skip to content

Programmatic access

If you want to drive Moonjar from outside the app — capture from a script, push items into a collection from a workflow tool, read your library into a custom dashboard — the same REST API the mobile app uses is available with a per-user API key. For most use cases, connecting through MCP is easier and gives you most of the same surface without code.

Moonjar uses a per-user API key. Generate one in Settings → API keys (or the equivalent path — [TODO: VERIFY exact path]) and revoke it from the same screen if it leaks.

Send the key on every request as the X-API-Key header. The key has the same scope as your account — anything you can do in the app, the key can do.

Terminal window
curl -H "X-API-Key: $MOONJAR_API_KEY" https://www.moonjar.io/api/...
  • Capture text, URLs, photos (base64), and PDFs.
  • Search across documents, conversations, and memories.
  • Read documents, conversations, collections, trips, reminders, and memories.
  • Write to collections — add items, update items, link items, edit fields.
  • Create and update reminders.
  • Manage trips — create, update, link bookings, mark complete.
  • Register email-capture addresses (the same addresses that drive the email-forwarding flow).
  • Manage your account — profile fields, custom prompt, default group, timezone, home country.
  • Issue or revoke API keys programmatically. Use the app.
  • Trigger memory writes. Memories are extracted from chats only — there’s no POST /api/memories/extract for writing memories from arbitrary text. You can save a memory by hand via POST /api/memories (manual create); auto-extraction stays inside the chat pipeline.
  • Set or change your password without supplying the current password.
  • Modify other users’ data. API keys are scoped to a single account.

This section is intentionally light on per-endpoint detail — the canonical reference is the source. Common patterns:

  • DocumentsGET /api/documents, GET /api/documents/:id, PATCH /api/documents/:id, POST /api/capture.
  • SearchGET /api/search?q=...&mode=auto, GET /api/search/fields, GET /api/universal-search.
  • CollectionsGET /api/collections, POST /api/collections, POST /api/collections/:id/items, GET /api/collections/:id/lookup.
  • RemindersGET /api/reminders/lists, POST /api/reminders/lists/:id/items, GET /api/reminders/today.
  • TripsGET /api/trips, POST /api/trips/:id/places, GET /api/trips/:id/itinerary.
  • MemoriesGET /api/memories, POST /api/memories, PATCH /api/memories/:id.
  • NotificationsGET /api/notifications, PATCH /api/notifications/:id/read, DELETE /api/notifications/:id.
  • Capture by emailPOST /api/capture/email is wired to AWS SNS only (validated SNS signatures); for direct programmatic capture use POST /api/capture with content_type: "note", "url", or "email".

The same monthly caps that apply to in-app use also apply to API calls. See Limits.