ChartVoyant API & MCP
REST API
A tenant-scoped JSON API over the same contract layer the ChartVoyant application runs on. Your system authenticates with an API key, and every key is bound to exactly one practice.
https://chartvoyant.com/api/v1
At a glance
| Status | Live in the sandbox and in production. |
| Base URL | https://chartvoyant.com/api/v1 for sandbox and production keys alike. A sandbox key reaches only its synthetic sandbox office; a production key reaches only its bound practice. |
| Authentication | Authorization: Bearer cvk_…, an API key issued by ChartVoyant. No OAuth flow and no browser session. |
| Scope | One practice per key, at one of two access levels: read_only or full (read and write). |
| Format | JSON over HTTPS. Request bodies up to 1 MB. |
| OpenAPI | OpenAPI 3.1 served at https://chartvoyant.com/api/openapi.json and documented interactively on OpenAPI 3.1 Contract. |
| Terms | Sandbox: Sandbox Terms. Production: signed API Use Agreement and usage policy. |
How an API key works
A synthetic example of the key format. The prefix identifies which key you hold; the secret proves you hold it.
- One key, one practice. The key is the tenant. There is no cross-office key and no header that reaches a different practice's data.
- The prefix is public; the secret is not. Quote the prefix in a support email so we can locate your key. Never send the full token to anyone, including us.
- Two access levels.
read_onlypermits safe methods only; aPOST,PUT,PATCHorDELETEis refused with a403that says so.fullpermits reads and writes. The one place a read-only key mayPOSTis the Practice MCP endpoint, where it can call read tools only. - Keys expire. Every production key is issued with an expiry — 90 days by default and never more than 365 days (14 days for self-serve sandbox keys). Plan to rotate before it lapses.
- Scoped routes only. Each key carries scopes, and every endpoint requires a matching scope. Unlisted routes are refused regardless of access level.
- Immediate revocation. A revoked key stops authenticating on the very next request.
- Every request is logged to the key. Method, route, status, source IP, correlation ID, and duration — including refusals. Query strings, request bodies, and response payloads stay out of that trail; PHI access is recorded in the practice's own tamper-evident audit log.
Quickstart & headers
Request (sandbox synthetic patients)
# Sandbox: synthetic patients only curl "https://chartvoyant.com/api/v1/patients?limit=5" \ -H "Authorization: Bearer $CHARTVOYANT_API_KEY" \ -H "X-Purpose: operations"
Response (synthetic)
{
"data": [
{
"id": "0f2c…",
"mrn": "MRN-100482",
"name": { "family": "Example", "given": ["Sample"] },
"birthDate": "1974-03-11"
}
],
"page": { "limit": 5, "offset": 0, "hasMore": true }
}
| Header | Required | Purpose |
|---|---|---|
Authorization | Yes | Bearer cvk_…, your full key, on every request. |
X-Purpose | No | Purpose of use recorded on the practice's audit event for the request. Defaults to operations. |
Content-Type | On writes | application/json. |
Common routes
Paths below are relative to https://chartvoyant.com/api/v1. See OpenAPI 3.1 Contract for request bodies and schemas.
| Route | Description |
|---|---|
GET /context | The practice and principal the key resolves to. |
GET /practitioners | The practice's providers. GET /practitioners/{id} reads one. |
GET /locations/{id}/providers | Providers who work at one clinic site. |
GET /patients | Patient search by mrn, q, or dob (ISO date prefix), paged with limit (up to 100) and offset. |
GET /patients/{id} | Read one patient record. |
POST /patients | Create a patient (requires full access key). |
POST /encounters | Start an encounter and publish visit.encounter.started (requires full access key). |
POST /documents | Register document upload metadata (requires full access key). |
GET /patients/{id}/ccda | Generate the patient's current CCD as XML (beta). See C-CDA documents. |
POST /mcp | The Practice MCP server. |
Server-side only
A ChartVoyant key belongs on infrastructure you control. Never ship one in browser JavaScript, a mobile app, a desktop client, or any artifact an end user can inspect.
Limits and errors
| Scope | Burst | Sustained |
|---|---|---|
| Per production key | 150 requests / second | 3,600 requests / minute |
| Per practice (all keys and staff sessions combined) | 400 requests / second | 12,000 requests / minute |
| Per self-serve sandbox key | 38 requests / second | 900 requests / minute (5,000 / day) |
Over budget returns 429 with Retry-After. Every error uses the standard envelope:
{
"error": {
"code": "forbidden",
"message": "This API key is read-only; POST is not permitted",
"correlationId": "01J8ZC…"
}
}
See Rate Limits & Error Codes for every status code and error string.
What a key can never reach
These refusals are structural — no access level unlocks them:
How to get access
- Start in the sandbox
Request a sandbox key from the self-serve form. It is issued on the spot, shown once, lasts 14 days, and reaches synthetic patients only under the ChartVoyant Sandbox Terms.
- Move to production with a sponsoring practice
Follow the production onboarding guide: sponsoring practice confirmation, BAA with the practice, and online signing of the API Use Agreement.