Namespaces
ovok.invites
Send and accept record-share and care invitations.
- Stable unknown
- Release candidate since 0.4.49-rc.4
- Development since 0.4.49-dev.517+4645a0a
Invitations to share a record or to enter a care relationship. Each flow has create (send) and accept (redeem). Calls routes under v1/invites.
Share a record
A patient shares their record with a practitioner, or some codes with a carer.
await ovok.invites.recordShares.create({
recipient: 'practitioner',
email: 'dr@example.com',
firstName: 'Ada',
lastName: 'Lovelace',
});
await ovok.invites.recordShares.create({
recipient: 'related-person',
email: 'carer@example.com',
firstName: 'Sam',
lastName: 'Lee',
codes,
});- A
related-personinvite also takescodes, the data the carer may see. createresolves to{ status: 'sent' }.
Invite a patient into care
await ovok.invites.care.create({ email, firstName, lastName });- A practitioner sends this. The patient redeems it with
care.accept.
Accept an invite
const share = await ovok.invites.accept({ inviteId, code });acceptpicks the flow from the signed-in profile: a practitioner accepts a record share, a patient accepts a care invite. It throwsOvokConfigErrorfor any other profile or when signed out.- Call a flow's
acceptdirectly when you know the kind.recordShares.acceptalso takes an optionalpassword. ovok.invites.practitionersandovok.invites.patientsare deprecated. UserecordShareswithrecipient: 'practitioner', andcare. The routes sunset on 2026-12-01.
Reference
- invites API reference: every method and type.
- ovok.sharing: the shares an accepted invite creates.
- ovok.auth
- Errors and retries
Last updated on