Send an email to a user.
POST/v2/send-email
Send an email
Send an email to a user.
Required attributes
- Name
to- Type
- string
- Description
The email address of the recipient.
- Name
from- Type
- object
- Description
- Sender of the email.
- Name
subject- Type
- string
- Description
The subject of the email.
- Name
body- Type
- string
- Description
The body of the email.
Optional attributes
- Name
attachments- Type
- array
- Description
The attachments of the email.
Request
POST
/v2/send-emailcurl -X POST "https://{{base_subdomain}}.avonhealth.com/v2/send-email" \
-H "Authorization: Bearer {{token}}" \
-H "x-jwt: {{jwt}}" \
-H "Content-Type: application/json" \
--data '{
"to": "Example",
"subject": "Example",
"body": "Example"
}'
Request
{
"to": "hello@betterhealth.com",
"from": {
"name": "Avon Health",
"email": "hello@avonhealth.com"
},
"subject": "Appointment Confirmation",
"body": "This is a confirmation for your appointment with Dr. Smith on 2025-08-01 at 10:00 AM.",
"attachments": [
{
"fileName": "Patient-Information.pdf",
"fileType": "application/pdf",
"fileData": "<base64 encoded string of the PDF file>",
},
{
"fileName": "Patient-Information.xml",
"fileType": "application/xml",
"fileData": "<base64 encoded string of the XML file>",
}
],
}