ChartVoyant Developers
Markdown

ChartVoyant API & MCP

REST API

Live

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.

Base URL https://chartvoyant.com/api/v1

At a glance

StatusLive in the sandbox and in production.
Base URLhttps://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.
AuthenticationAuthorization: Bearer cvk_…, an API key issued by ChartVoyant. No OAuth flow and no browser session.
ScopeOne practice per key, at one of two access levels: read_only or full (read and write).
FormatJSON over HTTPS. Request bodies up to 1 MB.
OpenAPIOpenAPI 3.1 served at https://chartvoyant.com/api/openapi.json and documented interactively on OpenAPI 3.1 Contract.
TermsSandbox: 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_only permits safe methods only; a POST, PUT, PATCH or DELETE is refused with a 403 that says so. full permits reads and writes. The one place a read-only key may POST is 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 }
}
HeaderRequiredPurpose
AuthorizationYesBearer cvk_…, your full key, on every request.
X-PurposeNoPurpose of use recorded on the practice's audit event for the request. Defaults to operations.
Content-TypeOn writesapplication/json.

Common routes

Paths below are relative to https://chartvoyant.com/api/v1. See OpenAPI 3.1 Contract for request bodies and schemas.

RouteDescription
GET /contextThe practice and principal the key resolves to.
GET /practitionersThe practice's providers. GET /practitioners/{id} reads one.
GET /locations/{id}/providersProviders who work at one clinic site.
GET /patientsPatient 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 /patientsCreate a patient (requires full access key).
POST /encountersStart an encounter and publish visit.encounter.started (requires full access key).
POST /documentsRegister document upload metadata (requires full access key).
GET /patients/{id}/ccdaGenerate the patient's current CCD as XML (beta). See C-CDA documents.
POST /mcpThe 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

ScopeBurstSustained
Per production key150 requests / second3,600 requests / minute
Per practice (all keys and staff sessions combined)400 requests / second12,000 requests / minute
Per self-serve sandbox key38 requests / second900 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:

Sign-in and password routes
Creating or changing staff logins
The role and permission map
The patient portal
Demo session control
Tenant migration tooling
ChartVoyant's own operations tools
Issuing or revoking API keys
Minting other credentials (portal invites, upload or kiosk tokens, SMART clients)

How to get access

  1. 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.

  2. 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.