Create ECG analysis tasks
const url = 'https://api.cardio.ai/v3/orgs/example/tasks';const options = { method: 'POST', headers: {'X-Api-Token': '<X-Api-Token>', 'Content-Type': 'application/json'}, body: '{"upload_id":"example","auto_complete":true,"investigation_id":"example","device_id":"example","indications":["example"],"searching_tags":["example"],"patient_id":"example","patient_first_name":"example","patient_last_name":"example","patient_gender":"FEMALE","patient_birth_date":"2026-04-15","patient_age":1,"patient_height":1,"patient_weight":1,"recording_start_time":"2026-04-15T12:00:00Z","recording_time_zone":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.cardio.ai/v3/orgs/example/tasks \ --header 'Content-Type: application/json' \ --header 'X-Api-Token: <X-Api-Token>' \ --data '{ "upload_id": "example", "auto_complete": true, "investigation_id": "example", "device_id": "example", "indications": [ "example" ], "searching_tags": [ "example" ], "patient_id": "example", "patient_first_name": "example", "patient_last_name": "example", "patient_gender": "FEMALE", "patient_birth_date": "2026-04-15", "patient_age": 1, "patient_height": 1, "patient_weight": 1, "recording_start_time": "2026-04-15T12:00:00Z", "recording_time_zone": "example" }'Creates one or more ECG analysis tasks based on uploaded files.
Input scenarios
Single ECG with multiple files
If a single ECG record consists of several files, such as MIT-BIH .hea plus signal files, upload the files together as an archive. The backend treats all related files inside the archive as one ECG record and creates one task.
Multiple ECG records in archive
If an archive contains multiple ECG records, the backend creates a separate task for each detected record.
Single file upload
If uploaded data is not an archive, the upload is interpreted as exactly one ECG record and creates one task.
Draft task
If no ECG file or archive is included, the backend creates a draft task without an ECG record.
Patient and recording information override
Patient and recording fields in the request override values detected in ECG files. When one archive contains several ECG records, the same override values are applied to every created task. For precise per-record metadata, upload one ECG record per request.
Field defaults
Omitted fields may be filled from organization or user profile settings for ordering information, report configuration, and notification recipients.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Unique organization path from organization settings.
Request Body required
Section titled “Request Body required ”Create task request.
Request payload for creating a new task, including upload, patient, and recording details.
object
Upload session ID. Omit it to create a draft task without ECG data.
Indicates whether the task should be fully processed automatically without manual approval.
Hospital administration code assigned to the investigation.
Identifier or type code of the recording device.
Patient symptoms or conditions prompting the medical investigation.
Additional tags for searching and filtering.
Unique patient code in the hospital administration.
Patient first name.
Patient last name.
Patient gender.
Patient date of birth in ISO 8601 date format, for example 1970-01-31.
Patient age in years.
Patient height in centimeters.
Patient weight in grams.
Recording start time in UTC, for example 2024-06-23T18:30:00Z.
IANA time zone identifier, for example Europe/London.
Responses
Section titled “ Responses ”Successful response containing the IDs of the created task or tasks.
Response payload containing the created task IDs.
object
IDs of the newly created tasks.
Example generated
{ "created_task_ids": [ 1 ]}Bad Request - missing or invalid parameters.
Example generated
exampleUnauthorized - missing, expired, or invalid token.
Example generated
exampleForbidden - the provided token is not authorized to call this endpoint.
Example generated
exampleUnsupported Media Type - Content-Type must be application/json.
Example generated
exampleToo Many Requests - rate limit exceeded.
Example generated
example