Skip to main content
POST
/
api
/
email-drafts
Create a draft
curl --request POST \
  --url https://api.morphic.io/api/email-drafts/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "bcc_emails": [],
  "body_html": "<p>Hi, thanks for your time today.</p>",
  "cc_emails": [],
  "subject": "Follow-up: Product Demo",
  "to_emails": [
    "jane@acme.com"
  ]
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "subject": "<string>",
  "body_html": "<string>",
  "to_emails": [
    "<string>"
  ],
  "cc_emails": [
    "<string>"
  ],
  "bcc_emails": [
    "<string>"
  ],
  "attachments": [
    {}
  ]
}

Authorizations

X-API-Key
string
header
required

API key (sk_xxx) from Developer Settings. No X-Account-ID needed.

Headers

x-account-id
string | null

Body

application/json
body_html
string
required
Minimum string length: 1
subject
string | null
to_emails
string[]
Minimum array length: 1
cc_emails
string[]
bcc_emails
string[]
attachments
Attachments · object[]

Response

Successful Response

id
string<uuid>
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
account_id
string<uuid>
required
user_id
string<uuid>
required
subject
string | null
required
body_html
string
required
to_emails
string[]
required
cc_emails
string[]
required
bcc_emails
string[]
required
attachments
Attachments · object[]
required