Docs navigation

Connect a DICOM sender

When a hospital wants to send imaging data to your platform, their equipment — CT scanner, PACS, workstation — speaks DICOM. Your system speaks HTTPS. Dicomly bridges the two: you manage the connection through the Dicomly API; the hospital configures their equipment with the details you provide.

This guide walks through creating an endpoint, saving the one-time certificate bundle, and sharing the connection details with the hospital’s IT team.

Prerequisites

  • A Dicomly API key (sk_live_…) from the console
  • An HTTPS URL where your application will receive deliveries

1. Create the endpoint

Call POST /v1/endpoints with a name, your destination URL, and at least one certificate. One certificate represents one sender identity — typically one device or one site.

const DICOMLY_API = 'https://api.dicomly.io/v1';
const apiKey = process.env.DICOMLY_API_KEY!;

const res = await fetch(`${DICOMLY_API}/endpoints`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'MGH Radiology',
    destination_url: 'https://your-app.io/dicom',
    certificates: [{ label: 'CT scanner' }],
  }),
});

const endpoint = await res.json();

2. Save the certificate bundle

The response includes certificate_pem and private_key_pem exactly once. Dicomly does not store the private key after this point — if you lose it you must issue a new certificate.

Store both values in your secrets manager immediately.

const { certificate_pem, private_key_pem } = endpoint.certificates[0];

// Store in your secrets manager — never log these values
await secretsManager.put(`dicomly/cert/${endpoint.id}`, {
  certificate_pem,
  private_key_pem,
});

3. Hand the connection details to the hospital

The hospital’s IT or biomedical engineering team configures the DICOM source device. Share these values with them:

Device setting API response field Example value
Host / IP dicom_host dicom.dicomly.io
Port dicom_port 11112
Called AE title peer_ae_title DICOMLY
Client certificate certificate_pem PEM block
Client private key private_key_pem PEM block

Most DICOM devices accept a PEM certificate + key file or a PKCS#12 bundle. Once the device is configured and pointed at Dicomly, it opens an mTLS connection and starts sending. Deliveries immediately start arriving at your destination URL.

Add more senders later

Each sender gets its own certificate. Add one without recreating the endpoint:

const res = await fetch(
  `${DICOMLY_API}/endpoints/${endpoint.id}/certificates`,
  {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${apiKey}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ label: 'PACS server' }),
  },
);

Revoke a single sender by deleting its certificate — other senders on the same endpoint keep working.

Next

Set up the HTTPS endpoint that receives the deliveries → Receive DICOM deliveries