Skip to main content
Feature

The same brain, inside your own tools

Your portal, your CRM, your intranet, your bot. Call SupaCortex over HTTPS and get back passages or a cited answer from the projects your key is allowed to read.

  • Scoped, revocable API keys
  • Cited answers as JSON
  • Search costs no credits

What is the SupaCortex API?

The SupaCortex API is an HTTPS interface to a workspace's knowledge. /v1/search returns the most relevant passages for a query; /v1/answer returns a written answer with numbered citations, or says there is not enough evidence; /v1/ingest/documents adds or updates content from your own systems. Requests are made with an API key and the workspace's sub-domain header. Each key has scopes, is limited to chosen projects, and can be revoked at any time.

  • Scopes: search:read, answer:read, ingest:write, chat:write, drafts:write and identity:resolve.
  • Keys are limited to the projects you select - or all of them.
  • The secret is shown once and stored only as a hash.
  • Answers report a status: answer found, needs information, or insufficient evidence.
  • Optional filters by category and by customer.
  • Errors are RFC 7807 problem documents with a stable code.
One request

Ask, and get the sources with the answer

Every citation names the document, the section and the passage, and links to the source page when it has one - so your UI can show where the answer came from.

When nothing relevant is found, the status says so and no answer is invented. Your code can then fall back to a contact form or a person.

curl -X POST https://api.supacortex.com/v1/answer \
  -H "X-API-Key: sck_live_..." \
  -H "sub-domain: acme" \
  -H "Content-Type: application/json" \
  -d '{ "project": "help-centre",
        "question": "How do I add a second admin?" }'

{
  "Success": true,
  "Data": {
    "Status": "answer_found",
    "Answer": "Open Settings > Users, choose Add user and pick the Admin role [1]...",
    "Citations": [
      { "N": 1, "Title": "Managing users", "Section": "Roles",
        "Url": "https://help.acme.example/users#roles" }
    ],
    "Grounded": true
  }
}

Shortened response.

Reference

Endpoints

Every endpoint takes the project by its key and returns JSON.

POST /v1/search

The best passages for a query, with title, section, snippet, score and source link. Hybrid vector and full-text search. 0 credits.

POST /v1/answer

A written answer from the passages it found, with checked citations and a status. 1 credit per answer.

POST /v1/ingest/documents

Push text or a file from your own system. Upserted by your own reference, so updates replace rather than duplicate.

/v1/chat

The chat engine behind the widget, for your own front end: sessions, follow-ups and your connector's lookups for a verified user.

/v1/drafts

Reply drafts for a help desk ticket, asynchronous with signed callbacks. See reply drafts.

GET /v1/whoami

Check a key: its name, its scopes and the projects it may use. Handy for a "Test connection" button.

In detail

Keys you can hand out without worrying

Least privilege by default

A key for the portal search box should not be able to push documents. Each key gets exactly what it needs.

  • Pick scopes per key: search, answer, ingest, chat, drafts, identity lookup.
  • Limit a key to one or more projects; a project it may not use looks like one that does not exist.
  • The secret is shown once at creation and stored as a hash.
  • Last-used time on every key, and revocation that takes effect on the next request.

Two things to get in

Every request needs the key and your workspace's sub-domain header - so a key found in a log is not enough.

  • A wrong key, a wrong workspace and a revoked key all get the same refusal - nothing is revealed.
  • Customer-tagged documents are only searched when that customer's id is in the request.
  • If the plan has lapsed, the API stops answering; your documents stay where they are.
  • Model and search outages are reported as errors with a code, never as a made-up answer.
Frequently asked

Questions people ask before they start

Anything that needs answers from your knowledge outside SupaCortex's own screens: a search box in your customer portal, an answer panel in your CRM or intranet, a bot in a channel we do not support yet, or a script that keeps documents in step from your own systems. The API uses the same search and answer engine as the widget and team chat.

A key is shown once, when it is created, and stored only as a hash. Every request must also name your workspace in a sub-domain header, so a leaked key is useless on its own. Each key carries only the scopes and projects you give it, shows when it was last used, and stops working the moment it is revoked.

No. /v1/search uses no AI credits - it is only rate-limited. An answer from /v1/answer uses 1 credit, and indexing pushed content uses 1 credit per 25 chunks, the same as any upload.

Send them to /v1/ingest/documents with a key that has the ingest:write scope. Each document carries your own reference; sending the same reference again replaces the old version instead of adding a duplicate. You can set a category, tags, a trust tier and a customer id on each one.

Yes. Pass a CustomerId and the answer uses shared knowledge plus that customer's own documents - never another customer's. Without one, only shared knowledge is searched.

Starter includes 2, Growth 10, Business 50 and Enterprise unlimited. Only an Admin or Owner of the workspace can create or revoke them.

Get a trial workspace and an API key, and call it from your own code.

Book a 30-minute demo on your own documents. We set up a 14-day trial workspace for you - no credit card, no setup fee.

Questions first? Email info@greatdevelopers.com or call +91 8585953085.

Still curious? Ask your favorite AI about SupaCortex.