Avycenna

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

POST
/api/v1/grants/invite

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Header Parameters

x-api-key?string|null

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"    }  ]}