Core Guides
Authentication & credentials
ChartVoyant never shares one catch-all credential across unrelated trust boundaries. Each surface uses a purpose-built token bound to a single practice (and, where applicable, a single patient or HL7 interface).
Credential comparison matrix
| Credential | Prefix / Type | Accepted On | Lifetime | How Issued |
|---|---|---|---|---|
| Practice API key | Bearer cvk_… | REST API, Practice MCP, REST C-CDA | 14d (sandbox) · 90d default / 365d max (prod) | Self-serve sandbox modal, or ChartVoyant onboarding |
| Patient MCP key | Bearer cvpk_… or URL segment | Patient MCP only | 30, 90, 180, or 365 days | Created by the patient in Portal → Account → AI assistants or /mcp-self-register/ |
| HL7 sender key | Bearer cvk_… (ingest-only) | One bound HL7 v2 interface | Per interface term | Issued during HL7 interface setup |
| SMART user/patient token | Opaque OAuth 2 Bearer | FHIR R4, SMART Write | 3,600s read (300s with write scope); 95d offline refresh | auth.chartvoyant.com Authorization Code + PKCE S256 |
| SMART backend token | Opaque OAuth 2 Bearer | FHIR R4, Bulk Data, HL7 (with system/hl7v2-ingest) | 3,600s read (300s write); no refresh token | client_credentials + private_key_jwt (RS384 or ES384) |
Practice API keys (cvk_)
Send the key on every request as Authorization: Bearer cvk_… over HTTPS. Every key resolves to a single tenant — there is no header or query parameter that switches practices. Keys carry either read_only (safe HTTP methods + read-only MCP tools) or full (reads + permitted writes).
Patient MCP keys (cvpk_)
Created exclusively by the patient after re-entering their portal password. Accepted only on POST https://chartvoyant.com/api/v1/portal/mcp (via Authorization: Bearer) or POST https://chartvoyant.com/api/v1/portal/mcp/{key} for URL-only connectors. Always read-only and scoped to that single patient's portal-visible chart.
SMART App Launch OAuth 2 & PKCE
Interactive patient, clinician, and EHR launches discover endpoints from https://fhir.chartvoyant.com/r4/{practice}/.well-known/smart-configuration. Every authorization code flow requires:
code_challenge_method=S256(plain or missing PKCE is rejected)audmatching the exact FHIR base URL from the Practice Endpoint Directory- Exact registered
redirect_uri(HTTPS, orlocalhost/127.0.0.1loopback for native apps)
See SMART App Launch 2 and the SMART on FHIR-4 developer guide for complete browser PKCE code.
SMART Backend Services (private_key_jwt)
Headless system integrations authenticate to POST https://auth.chartvoyant.com/oauth/token using grant_type=client_credentials and client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer signed with RS384 or ES384 against your registered public JWKS. Assertions expire within 5 minutes and require a unique jti. See SMART Backend Services.
HL7 v2 interface credentials
Each HL7 v2 interface accepts only the single credential bound to its interfaceId: either a dedicated HL7 sender key (Bearer cvk_… with ingest-only permission) or a SMART Backend Services token carrying scope=system/hl7v2-ingest. Ordinary REST API keys and sandbox keys are rejected with 401.
Credential security rules
- TLS 1.2+ everywhere. Plain HTTP is never served on any ChartVoyant host.
- Quote prefixes, never secrets. When contacting support, share only the 12-character key prefix (for example
a1b2c3d4e5f6) andcorrelationId. - Keep keys out of client bundles and chat transcripts. Never ship a
cvk_key in browser JS, mobile binaries, git repositories, CI logs, or AI chat prompts. - Immediate rotation & revocation. Report any suspected leak to info@chartvoyant.com within 24 hours; revocation takes effect on the next request.