Skip to main content

Quickstart

Query your team's knowledge base programmatically in under five minutes.


1. Generate an API key

  1. Open Settings → Developer in your Sophic dashboard
  2. Create a new API key
  3. Copy the key — it is only shown once

API keys are workspace-scoped: they can only read documents within the workspace they were created for.

2. Make your first request

All endpoints live under https://app.sophic.so/api/v1 and take the key as a Bearer token. List the most recent documents in your workspace:

curl -H "Authorization: Bearer YOUR_API_KEY" \
https://app.sophic.so/api/v1/documents

3. Search the knowledge base

Run a semantic search across every document. The response has a text block (formatted for LLMs) and structured results — each pointing at the matching section's document_id:

curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://app.sophic.so/api/v1/search?q=production+deployment+checklist"

4. Fetch a document

Use a document_id from a search result (or an id from the documents list) to pull a single document with its full content:

curl -H "Authorization: Bearer YOUR_API_KEY" \
https://app.sophic.so/api/v1/documents/DOCUMENT_ID

What's next