Invite a patient to share data
Create a **pending** grant requesting access to a patient's health data. The patient must accept the grant before any data becomes accessible. Requires role: `doctor`, `clinic_admin`, or `admin`. `clinic_staff` cannot initiate grants — a doctor or admin must invite on their behalf. Permissions can be any subset of: `check_ins`, `medications`, `symptoms`, `wearable_data`, `heart_data`, `ai_insights`, or `full`.
Authorization
HTTPBearer In: header
Header Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/grants/invite" \ -H "Content-Type: application/json" \ -d '{ "patient_email": "user@example.com", "permissions": [ "check_ins" ] }'null{ "detail": [ { "loc": [ "string" ], "msg": "string", "type": "string" } ]}Decline a pending grant request (patient) POST
Decline a **pending** grant request — the clinician never gets access. For revoking an already-active grant, use `/grants/revoke` instead.
List incoming grant requests (patient view) GET
Returns all grant requests directed at the current user as a **patient**. Includes both `pending` (awaiting acceptance) and `active` grants. Available to all authenticated users — any role can receive grant requests because doctors and clinic staff can also be patients.