Skip to main content
POST
/
api
/
email
/
create-draft
Create an email draft
curl --request POST \
  --url https://core-api.getaptly.com/api/email/create-draft \
  --header 'Content-Type: application/json' \
  --header 'x-token: <api-key>' \
  --data '
{
  "userId": "user_abc",
  "channelId": "channel_abc",
  "to": [
    {
      "value": "[email protected]",
      "label": "Jane Tenant"
    }
  ],
  "subject": "Your lease renewal",
  "body": "Please review the attached renewal terms.",
  "aptletInstanceId": "card_abc"
}
'
{
  "streamId": "<string>",
  "draftUuid": "<string>"
}

Authorizations

x-token
string
header
required

Body

application/json
userId
string
required

User to record as the draft creator/sender.

channelId
string
required

channel.meta.id of the outbound email channel.

to
object[]
cc
object[]
bcc
object[]
subject
string
body
string
aptletInstanceId
string

Card to link the outbound to. When set, sending the draft logs the email as an activity on the card and tags the discussion with it.

Response

Draft stream created.

streamId
string

Discussion/stream ID to pass to POST /api/email/send.

draftUuid
string

Draft UUID to pass to POST /api/email/send.