Skip to content

API Reference

The ctxd REST API is available at https://api.ctxd.dev.

All requests require a bearer token in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Search across all connected apps.

POST /api/search
Content-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 full content of a document by UID.

GET /api/search/document/doc-uid-123

Response:

{
"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 connected integrations and indexed file tree.

GET /api/search/profile

Response:

{
"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:

  • search
  • fetch_document
  • get_profile
GET /api/app-integrations

Currently done through the dashboard due to Oauth consent requirements.

DELETE /api/app-integrations/{app_id}

200 requests per minute per user. Exceeding the limit returns HTTP 429.