---
title: "Send an email based off an email template"
method: POST
path: "/email_templates/{id}/send"
tags: ["Emails"]
---

# Send an email based off an email template

`POST /email_templates/{id}/send`

## Path parameters

- `id` string, required

## Request body

- union
  - object
    - `from` string, required — The ID of the email address from which to send the email
    - `attachments` object[] — An array of attachments to include with the email
      - `content` string, required — The content of the attachment as a data url, e.g. 'data:image/png;base64,abcd1234'
      - `name` string, required — The intended name of the attachment
    - `to` string, required — The email address to send the email to
    - `variables` object — The variables to be injected into the email template
  - object
    - `from` string, required — The ID of the email address from which to send the email
    - `attachments` object[] — An array of attachments to include with the email
      - `content` string, required — The content of the attachment as a data url, e.g. 'data:image/png;base64,abcd1234'
      - `name` string, required — The intended name of the attachment
    - `customer` string, required — The ID of the customer to send the email to
    - `variables` object — The variables to be injected into the email template in addition to the variables already induced by the customer

## Response `200`

The sent `SentEmail` object

- object
  - `id` string, required — The ID of the campaign
  - `created_at` string, required — The time when the campaign was created in ISO 8601 format
  - `customer` string, nullable, required — The ID of the customer that was sent the email
  - `subject` string, required — The subject of the email
  - `sent_at` string, nullable, required — The time when the email was sent in ISO 8601 format
  - `failed_at` string, nullable, required — The time when the email failed to send in ISO 8601 format
  - `failed_reason` string, nullable, required — The reason the email failed to send
  - `to_email_address` string, nullable, required — The email address the email was sent to
  - `sendgrid_message_id` string, nullable — Sendgrid's returned message ID
  - `paubox_message_id` string, nullable — Paubox's returned message ID
  - `postmark_message_id` string, nullable — Postmark's returned message ID
  - `ok` boolean, required — Whether the email was sent successfully

---

[API](https://skmtc.dev/pocketflows/apis/pocketflows-api.md) · [All operations](https://skmtc.dev/pocketflows/apis/pocketflows-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pocketflows/pocketflows-api/revisions/26723490b96f/schema)
