Avycenna

Upload an on-device ECG recording

Stores an ECG recorded on a watch (Apple Watch via HealthKit; Fitbit / Pixel Watch ECGs arrive through `/google-health/sync` instead) with its waveform and the device's own classification, attributed to its source. Idempotent on `source_record_id`, so the app can safely re-sync. Returns the heart event (existing one on a repeat upload).

POST
/api/v1/cardiac-events/ecg

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.

A single-lead ECG recorded on-device (Fitbit / Pixel Watch via the Google Health API, Apple Watch via HealthKit). classification is the vendor's own raw value (e.g. Google Health ATRIAL_FIBRILLATION, HealthKit atrialFibrillation); it is mapped and attributed by the provider registry, never re-interpreted.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/cardiac-events/ecg" \  -H "Content-Type: application/json" \  -d '{    "source_record_id": "string",    "recorded_at": "2019-08-24T14:15:22Z"  }'
null
{  "detail": [    {      "loc": [        "string"      ],      "msg": "string",      "type": "string"    }  ]}