Getting Started
Welcome to the IntakeDesk documentation. This guide will walk you through the basics of setting up and using IntakeDesk to streamline your referral intake process.
Installation
To get started, you will need to install our client libraries and configure your environment. We provide packages for popular EMR systems and a REST API for custom integrations.
npm install @intakedesk/clientConfiguration
To generate an API Key, use the POST /api/api-keys endpoint (authenticated via your Dashboard session) or contact support to enable the API Keys UI in your dashboard.
Authentication
The API supports two methods of authentication:
- Bearer Token: Standard Firebase ID Token. Used by frontend clients acting on behalf of a user.
Authorization: Bearer <ID_TOKEN>
- API Key: Secret key for server-side integrations. Not every endpoint accepts one: every endpoint under
/api/casesand/api/patients(case notes, case edits that change no queue, referrer matching and creation, letter previews and insurance checks among them), the reports, document splits, and reclassifying documents onto a case need a signed-in user, and every change to a case's status or queue (the case PATCH's queue, the contact actions other than a note, bulk transitions, records requests and Create Chart) needs a signed-in owner, admin or coordinator.x-api-key: desk_...
API Reference
The IntakeDesk API provides endpoints for managing referrals, cases, patients, and documents. All endpoints require authentication.
Referrals
| Endpoint | Method | Description |
|---|---|---|
| /api/referrals?orgId=... | GET | List referrals for an organization. |
| /api/referrals | POST | Create a new referral. Returns a signed URL for file upload. |
| /api/referrals/:id | GET | Get a single referral by ID. |
| /api/referrals/:id/upload | POST | Upload an additional file to an existing referral. |
| /api/referrals/:id/qa | POST | Run quality-assurance checks on extracted data. |
| /api/referrals/:id/triage | GET | Get current triage result for a referral. |
| /api/referrals/:id/triage | POST | Set or override triage classification. |
| /api/referrals/bulk | POST | Perform bulk actions (move to triaged, mark duplicate). |
| /api/referrals/export?orgId=...&from=...&to=...&stage=... | GET | Export referral documents received in a date range as CSV, for owners, admins and coordinators signed in as themselves. API keys are refused. |
Cases
Cases are merged patient records created from one or more referrals. Use these endpoints to manage case lifecycle.
| Endpoint | Method | Description |
|---|---|---|
| /api/cases/:caseId | PATCH | Update case fields (location, priority band, queue). Signed-in users only; API keys are refused. |
| /api/cases/:caseId/contact | POST | Log a contact attempt, mark scheduled, close, or add a note. Signed-in users only; API keys are refused. |
| /api/cases/match-referrer | POST | Match a case to an existing practice/provider and add alias. Signed-in users only; API keys are refused. |
| /api/cases/create-referrer | POST | Create a new practice/provider from unmatched candidates. Signed-in users only; API keys are refused. |
Patients
| Endpoint | Method | Description |
|---|---|---|
| /api/patients?orgId=...&q=... | GET | Search patients by name or ID. Signed-in users only; API keys are refused. |
| /api/patients | POST | Create a new patient record. Signed-in users only; API keys are refused. |
| /api/patients | PATCH | Update an existing patient record. Signed-in users only; API keys are refused. |
| /api/patients?orgId=...&patientId=... | DELETE | Archive a patient from active Registry views while preserving the local tombstone and required history. |
Documents
| Endpoint | Method | Description |
|---|---|---|
| /api/referral-documents?orgId=... | GET | List documents for a referral or patient. |
| /api/referral-documents | POST | Attach a document to a referral/patient. |
| /api/referral-documents/sign-read | POST | Get a short-lived signed URL to read a document. |
| /api/referral-documents/update-status | PATCH | Update the processing status of a document. |
Authentication
Session management and user profile endpoints for frontend clients.
| Endpoint | Method | Description |
|---|---|---|
| /api/auth/me | GET | Get current authenticated user profile and org context. |
| /api/auth/session | POST | Create a session cookie from a Firebase ID token. |
| /api/auth/session | DELETE | Destroy the current session (logout). |
Dashboard & Reporting
Read-only endpoints for analytics, backlog monitoring, and operational metrics.
| Endpoint | Method | Description |
|---|---|---|
| /api/metrics?orgId=...&from=...&to=...[&part=fax] | GET | Detailed operational metrics, counted in the practice's days. part=fax returns the fax delivery figures alone. Signed-in users only; API keys are refused. |
Organization Config
| Endpoint | Method | Description |
|---|---|---|
| /api/orgs/:id/config | PATCH | Update organization configuration settings. |
API Keys (Management)
| Endpoint | Method | Description |
|---|---|---|
| /api/api-keys | POST | Generate a new API Key (requires User Token). |
| /api/api-keys | GET | List active API Keys. |
| /api/api-keys | DELETE | Revoke an API Key. |
EMR Integration
IntakeDesk creates charts and files documents directly in the organization's connected EMR. Create Chart runs the chart work during the request; source documents and a Case Summary PDF are then delivered by IntakeDesk's own workers. The API-key poll and callback endpoints for an external filing service (/api/emr/queue, /api/emr/queue/callback, /api/emr/document-queue, /api/emr/document-queue/callback) are no longer offered.
| Endpoint | Method | Description |
|---|---|---|
| /api/cases/:caseId/emr-queue | POST | Create the case's chart in the organization's connected EMR, then queue its documents for delivery. Answers 400 when the organization has no EMR connection. Auth: Bearer token. |
