Skip to main content
POST
/
email
/
compose
Compose Email
curl --request POST \
  --url https://api.decodahealth.com/email/compose \
  --header 'API-KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TENANT: <tenant>' \
  --data '
{
  "to": [
    "<string>"
  ],
  "subject": "<string>",
  "cc": [],
  "bcc": [],
  "bodyHtml": "<string>",
  "bodyText": "<string>",
  "patientId": "<string>"
}
'
{
  "success": true,
  "messageId": "<string>",
  "threadId": "<string>",
  "error": "<string>"
}

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Body

application/json

Request to compose and send a new email.

to
string[]
required

Recipient email addresses

Minimum array length: 1
subject
string
required
Required string length: 1 - 500
cc
string[]

CC recipients

bcc
string[]

BCC recipients

bodyHtml
string | null
bodyText
string | null
patientId
string | null

Link email to a patient

Response

Successful Response

Response after sending an email.

success
boolean
required
messageId
string | null
threadId
string | null
error
string | null