API Reference
The ctxd REST API is available at https://api.ctxd.dev.
Authentication
Section titled “Authentication”All requests require a bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEYSearch
Section titled “Search”Search across all connected apps.
POST /api/searchContent-Type: application/json
{ "query": "text:deployment application:slack", "document_limit": 10}Response:
{ "results": [ { "title": "Deployment Runbook v3", "url": "https://docs.google.com/...", "snippet": "Step 1: Check CI status...", "document_uid": "doc-uid-123", "metadata": { "application": "google_drive" } } ], "dsl_parse_error": null}Fetch document
Section titled “Fetch document”Fetch full content of a document by UID.
GET /api/search/document/doc-uid-123Response:
{ "id": "doc-uid-123", "title": "Deployment Runbook v3", "url": "https://docs.google.com/...", "text": "# Deployment Runbook\n\n## Prerequisites\n...", "metadata": { "application": "google_drive" }}Get profile
Section titled “Get profile”Get connected integrations and indexed file tree.
GET /api/search/profileResponse:
{ "integration_access": "- Google Drive (google_drive) [INSTALLED]...", "file_tree": "## Integration: google_drive\n├── Projects\n│ ├── Q4 Report.docx\n..."}The same capabilities are also exposed through MCP tools:
searchfetch_documentget_profile
Integrations
Section titled “Integrations”List integrations
Section titled “List integrations”GET /api/app-integrationsConnect an integration
Section titled “Connect an integration”Currently done through the dashboard due to Oauth consent requirements.
Disconnect an integration
Section titled “Disconnect an integration”DELETE /api/app-integrations/{app_id}Rate limits
Section titled “Rate limits”200 requests per minute per user. Exceeding the limit returns HTTP 429.