Skip to main content
POST
/
api
/
v2
/
communication
/
send-email
Python
from samplehc import SampleHealthcare

client = SampleHealthcare(
    api_key="My API Key",
)
response = client.v2.communication.send_email(
    body="body",
    subject="subject",
    to="to",
)
print(response)
{}

Body

application/json
to
string
required

The email address of the recipient

subject
string
required

The subject line of the email

body
string
required

The main content/body of the email

from
string
default:Sample Healthcare Notifications <notifications@samplehc.com>

The email address of the sender

attachments
object[]

Optional array of file attachment IDs to include with the email

zipAttachments
boolean
default:false

Whether to compress all attachments into a single zip file before sending

enableEncryption
boolean
default:false

Whether to encrypt the email content and send a secure link instead. Note that encrypted emails do not support attachments.

attachAsFiles
boolean
default:false

When true, files are attached directly to the email instead of as links in the body. By default, files are sent as links in the body that require authentication with a Sample account, but files attached directly will not require authentication. This is useful for recipients without system access.

Response

Indicates the email request was accepted and processed (or queued for processing).

I