Your first call to /v1/search

Engineering · 2026-04-30 · 6 min read

Everything the AskMyDocs chat can do, your own code can do too. The public API has two endpoints — POST /api/v1/search and POST /api/v1/chat — plus signed webhooks. Here's a practical first hour.

Get a key

API keys are created in the admin console. A key belongs to your workspace and acts within it — which means every API call is permission-fenced and workspace-isolated exactly like a signed-in user, and shows up in the audit log like one.

curl -X POST https://app.askmydocs.io/api/v1/search \
  -H "Authorization: Bearer $ASKMYDOCS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "notice period in the rental agreement"}'

The response is a ranked list of passages, each with its relevance score, document, page and version — the same hybrid semantic-plus-keyword retrieval and re-ranking the chat uses, minus the answer-writing. It's the right endpoint when you want to build your own UI, feed another system, or just check what the knowledge base knows about a topic.

Chat: the full answer

POST /api/v1/chat takes a question and returns the answer with its numbered citations — useful for embedding cited Q&A into an internal portal or a support tool. One chat question or one API search counts as one query against your plan, so the accounting stays predictable.

Webhooks: don't poll

Two events are available today: document.ready fires when a document finishes processing and becomes queryable; quota.warning fires as your plan's query quota runs low. Deliveries are signed with HMAC-SHA256 — verify the signature header against your endpoint secret before trusting the payload.

A concrete starter project

Wire a synced folder as your team's knowledge inbox: drop documents in, listen for document.ready, then post a message to your team chat — "HR travel policy v3 is now answerable." Twenty lines of glue code, and your documentation announces itself.

Product · 7 min

An answer you can't check is just a rumour

Read →

Security · 6 min

Permission-aware retrieval, explained without the jargon

Read →

Product · 5 min

Why a changed file becomes version 2, not a second file

Read →

Reading about it is slower than asking.

Connect a drive, ask your first question, and click the citation to check us.

Get started freeRead the FAQ

Free plan · No credit card