Skip to content
Get started

Webhooks

Unwrap
client.webhooks.unwrap(RequestOptionsoptions?): void
Function
Unsafe Unwrap
client.webhooks.unsafeUnwrap(RequestOptionsoptions?): void
Function
ModelsExpand Collapse
ReportDeliveredEvent { id, data, type }

Webhook event sent when a report is completed. This is an asynchronous notification - respond with a simple acknowledgment.

id: string

Unique webhook event ID. Format: whe_{32-hex-chars}

data: ReportDeliveredEventData { isCritical, presignedUrl, reportId, 2 more }

Event payload containing report and study information

isCritical: boolean

Whether the report was marked critical at sign-off.

presignedUrl: string

Presigned URL for PDF download. Time-limited, typically valid for 1 hour.

formaturi
reportId: string

Avara report ID. Format: rep_{32-hex-chars}

studyId: string

Avara study ID. Format: stu_{32-hex-chars}

plainText?: string

Report plain text content (optional). Contains the full report text.

type: "report.delivered"

Event type identifier

ReportDeliveredEventData { isCritical, presignedUrl, reportId, 2 more }

Event payload containing report and study information

isCritical: boolean

Whether the report was marked critical at sign-off.

presignedUrl: string

Presigned URL for PDF download. Time-limited, typically valid for 1 hour.

formaturi
reportId: string

Avara report ID. Format: rep_{32-hex-chars}

studyId: string

Avara study ID. Format: stu_{32-hex-chars}

plainText?: string

Report plain text content (optional). Contains the full report text.

ReportDeliveredResponse { success }

Response expected by Avara for report delivery webhook. Simple acknowledgment.

success: boolean

Acknowledgment of receipt. Return true to confirm delivery.

SecondaryCaptureAccessRequestedEvent { id, data, type }

Webhook event sent when Avara needs presigned UPLOAD URLs for a secondary capture DICOM. This is a synchronous webhook - you must respond with the upload URLs within the request timeout.

id: string

Unique webhook event ID. Format: whe_{32-hex-chars}

data: SecondaryCaptureAccessRequestedEventData { studyId, studyInstanceUid, seriesInstanceUid, sopInstanceUid }

Event payload containing study + (optional) series/SOP information for a secondary capture upload

studyId: string

Avara study ID. Format: stu_{32-hex-chars}

studyInstanceUid: string

DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2')

seriesInstanceUid?: string

DICOM Series Instance UID generated for the new secondary capture series (when available).

sopInstanceUid?: string

DICOM SOP Instance UID generated for the new secondary capture object (when available).

type: "secondary_capture.access_requested"

Event type identifier

SecondaryCaptureAccessRequestedEventData { studyId, studyInstanceUid, seriesInstanceUid, sopInstanceUid }

Event payload containing study + (optional) series/SOP information for a secondary capture upload

studyId: string

Avara study ID. Format: stu_{32-hex-chars}

studyInstanceUid: string

DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2')

seriesInstanceUid?: string

DICOM Series Instance UID generated for the new secondary capture series (when available).

sopInstanceUid?: string

DICOM SOP Instance UID generated for the new secondary capture object (when available).

SecondaryCaptureAccessRequestedResponse { authorized, uploadUrls, contentCreatorName, error }

Response expected by Avara for the secondary capture webhook. Provide presigned PUT URLs the viewer will upload the DICOM to.

authorized: boolean

Whether the secondary capture upload is authorized for this study

uploadUrls: Array<string>

Presigned PUT URLs for uploading the secondary capture DICOM. The viewer uploads the same object to every URL.

contentCreatorName?: string

Optional content creator name. Avara derives this server-side; this field is ignored if provided.

error?: string

Error message if authorization failed or upload URLs cannot be provided

StudyAccessRequestedEvent { id, data, type }

Webhook event sent when Avara needs presigned URLs for DICOM images. This is a synchronous webhook - you must respond with the URLs within the request timeout.

id: string

Unique webhook event ID. Format: whe_{32-hex-chars}

data: StudyAccessRequestedEventData { studyId, studyInstanceUid }

Event payload containing study information

studyId: string

Avara study ID. Format: stu_{32-hex-chars}

studyInstanceUid: string

DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2')

type: "study.access_requested"

Event type identifier

StudyAccessRequestedEventData { studyId, studyInstanceUid }

Event payload containing study information

studyId: string

Avara study ID. Format: stu_{32-hex-chars}

studyInstanceUid: string

DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2')

StudyAccessRequestedMediaURL { mimeType, url, fileName }

Presigned URL for non-DICOM media (images, PDFs, videos)

mimeType: string

MIME type of the media file (e.g., application/pdf, image/jpeg, video/mp4)

url: string

Presigned URL to download the media file

formaturi
fileName?: string

Optional display name for the media file

StudyAccessRequestedResponse { authorized, urls, error, mediaUrls }

Response expected by Avara for study access webhook. Provide presigned URLs for DICOM images and optionally for non-DICOM media.

authorized: boolean

Whether access is authorized for this study

urls: Array<string>

Flat list of presigned URLs for DICOM images. Include all image URLs for the study.

error?: string

Error message if authorization failed or URLs cannot be provided

mediaUrls?: Array<StudyAccessRequestedMediaURL { mimeType, url, fileName } >

Optional presigned URLs for non-DICOM media (images, PDFs, videos) associated with the study.

mimeType: string

MIME type of the media file (e.g., application/pdf, image/jpeg, video/mp4)

url: string

Presigned URL to download the media file

formaturi
fileName?: string

Optional display name for the media file

WebhookEvent = StudyAccessRequestedEvent { id, data, type } | ReportDeliveredEvent { id, data, type } | SecondaryCaptureAccessRequestedEvent { id, data, type }

Union of all Avara webhook event types. Use the 'type' field to discriminate between event types. Events: study.access_requested (synchronous), report.delivered (asynchronous), secondary_capture.access_requested (synchronous).

Accepts one of the following:
StudyAccessRequestedEvent { id, data, type }

Webhook event sent when Avara needs presigned URLs for DICOM images. This is a synchronous webhook - you must respond with the URLs within the request timeout.

id: string

Unique webhook event ID. Format: whe_{32-hex-chars}

data: StudyAccessRequestedEventData { studyId, studyInstanceUid }

Event payload containing study information

studyId: string

Avara study ID. Format: stu_{32-hex-chars}

studyInstanceUid: string

DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2')

type: "study.access_requested"

Event type identifier

ReportDeliveredEvent { id, data, type }

Webhook event sent when a report is completed. This is an asynchronous notification - respond with a simple acknowledgment.

id: string

Unique webhook event ID. Format: whe_{32-hex-chars}

data: ReportDeliveredEventData { isCritical, presignedUrl, reportId, 2 more }

Event payload containing report and study information

isCritical: boolean

Whether the report was marked critical at sign-off.

presignedUrl: string

Presigned URL for PDF download. Time-limited, typically valid for 1 hour.

formaturi
reportId: string

Avara report ID. Format: rep_{32-hex-chars}

studyId: string

Avara study ID. Format: stu_{32-hex-chars}

plainText?: string

Report plain text content (optional). Contains the full report text.

type: "report.delivered"

Event type identifier

SecondaryCaptureAccessRequestedEvent { id, data, type }

Webhook event sent when Avara needs presigned UPLOAD URLs for a secondary capture DICOM. This is a synchronous webhook - you must respond with the upload URLs within the request timeout.

id: string

Unique webhook event ID. Format: whe_{32-hex-chars}

data: SecondaryCaptureAccessRequestedEventData { studyId, studyInstanceUid, seriesInstanceUid, sopInstanceUid }

Event payload containing study + (optional) series/SOP information for a secondary capture upload

studyId: string

Avara study ID. Format: stu_{32-hex-chars}

studyInstanceUid: string

DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2')

seriesInstanceUid?: string

DICOM Series Instance UID generated for the new secondary capture series (when available).

sopInstanceUid?: string

DICOM SOP Instance UID generated for the new secondary capture object (when available).

type: "secondary_capture.access_requested"

Event type identifier

UnsafeUnwrapWebhookEvent = StudyAccessRequestedEvent { id, data, type } | ReportDeliveredEvent { id, data, type } | SecondaryCaptureAccessRequestedEvent { id, data, type }

Webhook event sent when Avara needs presigned URLs for DICOM images. This is a synchronous webhook - you must respond with the URLs within the request timeout.

Accepts one of the following:
StudyAccessRequestedEvent { id, data, type }

Webhook event sent when Avara needs presigned URLs for DICOM images. This is a synchronous webhook - you must respond with the URLs within the request timeout.

id: string

Unique webhook event ID. Format: whe_{32-hex-chars}

data: StudyAccessRequestedEventData { studyId, studyInstanceUid }

Event payload containing study information

studyId: string

Avara study ID. Format: stu_{32-hex-chars}

studyInstanceUid: string

DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2')

type: "study.access_requested"

Event type identifier

ReportDeliveredEvent { id, data, type }

Webhook event sent when a report is completed. This is an asynchronous notification - respond with a simple acknowledgment.

id: string

Unique webhook event ID. Format: whe_{32-hex-chars}

data: ReportDeliveredEventData { isCritical, presignedUrl, reportId, 2 more }

Event payload containing report and study information

isCritical: boolean

Whether the report was marked critical at sign-off.

presignedUrl: string

Presigned URL for PDF download. Time-limited, typically valid for 1 hour.

formaturi
reportId: string

Avara report ID. Format: rep_{32-hex-chars}

studyId: string

Avara study ID. Format: stu_{32-hex-chars}

plainText?: string

Report plain text content (optional). Contains the full report text.

type: "report.delivered"

Event type identifier

SecondaryCaptureAccessRequestedEvent { id, data, type }

Webhook event sent when Avara needs presigned UPLOAD URLs for a secondary capture DICOM. This is a synchronous webhook - you must respond with the upload URLs within the request timeout.

id: string

Unique webhook event ID. Format: whe_{32-hex-chars}

data: SecondaryCaptureAccessRequestedEventData { studyId, studyInstanceUid, seriesInstanceUid, sopInstanceUid }

Event payload containing study + (optional) series/SOP information for a secondary capture upload

studyId: string

Avara study ID. Format: stu_{32-hex-chars}

studyInstanceUid: string

DICOM Study Instance UID. Must be a valid DICOM UID format (e.g., '1.2.840.10008.5.1.4.1.1.2')

seriesInstanceUid?: string

DICOM Series Instance UID generated for the new secondary capture series (when available).

sopInstanceUid?: string

DICOM SOP Instance UID generated for the new secondary capture object (when available).

type: "secondary_capture.access_requested"

Event type identifier