POST
/
email_templates
/
{id}
/
draft_send
curl --request POST \
  --url https://api.pocketflows.com/email_templates/{id}/draft_send \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "from": "<string>",
  "to": "<string>",
  "variables": {}
}'
{
  "from": "<string>",
  "to": "<string>",
  "subject": "<string>",
  "body": "<string>"
}

When providing variables for filling email templates, ensure that the variable name matches those inside the email template. At the moment, only “flat” variables are supported, e.g. fullName or name, but customer.name are not presently supported.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

id
string
required

The ID of the email template

Body

application/json

Response

200 - application/json

A DraftEmail representing what would have been sent

The response is of type object.