HTTP API
deeptrue API
Call the curated organization, project, survey, and report resources over HTTP — authenticated with the same dt_ keys as MCP (Settings → MCP API keys). REST uses api:* scopes; MCP tools use mcp:*.
Base URL: https://api.deeptrue.ch/v1
Prefer agents?
The same MCP API keys work with DeepTrue MCP for Cursor, Claude, and ChatGPT. HTTP here (api:*), tools there (mcp:*).
Authentication
Reuse MCP API keys. Session exchange is optional.
Bearer dt_… (recommended)
Send Authorization: Bearer dt_… on each request. The API exchanges the key for a session JWT and enforces api:* scope checks on REST routes.
X-DeepTrue-Api-Key
You can also send the key in the X-DeepTrue-Api-Key header. Same api:* scopes and org binding as Bearer.
Optional session exchange
POST /v1/auth/mcp/session/ with { "api_key": "dt_…" } returns a short-lived JWT if your client prefers Authorization: JWT … instead of the raw key.
API scopes (REST)
HTTP routes require api:* scopes. Dashboard keys also include mcp:* for agents — see the MCP page. api:pii is never implied by api:write.
| api:read | List and read orgs, projects, and surveys |
|---|---|
| api:projects | Create and update projects; accept, archive, restore |
| api:surveys | Patch survey structure (allowlisted fields) |
| api:fielding | Collect and finish fielding |
| api:reports | List and read report files |
| api:write | Implies the write scopes above (not api:pii) |
| api:pii | Explicit grant for contact and respondent PII routes |
Resources
Org-scoped paths use /v1/org/<org>/…
Organizations
GET /v1/organizations/ lists memberships. Further org calls go under /v1/org/<org>/…
Projects
List, create, get, patch; briefing answers; accept; collect; finish; archive; restore.
Surveys
List, get, and patch surveys. Structure updates follow the same allowlist MCP uses.
Reports
List and get report files under projects/reports/. Saving report HTML remains admin-only.
Organization context
Most routes are under /v1/org/<org>/…. You can also send X-DeepTrue-Org with the org domain. The key must be allowed for that organization.
Examples
List organizations
curl -sS https://api.deeptrue.ch/v1/organizations/ \ -H "Authorization: Bearer dt_…"
List projects for an org
curl -sS https://api.deeptrue.ch/v1/org/YOUR_ORG/projects/ \ -H "Authorization: Bearer dt_…"
Errors & limits
Invalid or revoked keys return 401. Missing api:* scopes or calls outside the curated surface return 403. Bind the key to an organization when creating it, or pass X-DeepTrue-Org / use the /v1/org/<org>/ path segment. Rate limits follow the same API defaults as the dashboard.