Authentication
Every VitaRelay API request is authenticated with an API key passed as a bearer token in theAuthorization header. Keys are issued to your organization
by a VitaRelay administrator and shared with you directly — there is no OAuth
flow, no token exchange, and no self-serve key creation. The key you receive is
the credential you send.
Live and test keys
Each key belongs to exactly one environment, encoded in its prefix:
Both use the same base URL —
https://vitarelay.com/api/public/v1. There is
no separate sandbox host. See Sandbox for how test
keys behave, and API Keys for how keys are issued.
Scopes
A key only grants the scopes VitaRelay selected when it was issued. A request whose endpoint requires a scope the key does not carry is rejected with403 insufficient_scope.
Write endpoints require a Vita Clinic
The three write endpoints have an additional requirement beyond scope: the organization that owns the key must be an active Vita Clinic. A key held by any other organization type is rejected with403 not_vita_clinic, even if the
:write scope is present.
Keeping keys secure
- Never commit API keys to source control. Use environment variables.
- One key per integration, so one can be revoked without downtime elsewhere.
- Ask VitaRelay to rotate periodically, and immediately after any suspected compromise — rotation and revocation are requests to VitaRelay, not self-serve actions. See API Keys.
- Develop against
vr_test_keys so mistakes never touch production data.

