---
title: "Send an email"
method: POST
path: "/smtp/emails"
tags: ["Emails"]
---

# Send an email

`POST /smtp/emails`

## Request

- Base URL: `https://api.sendpulse.com`
- URL: `https://api.sendpulse.com/smtp/emails`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (client credentials, token URL `https://api.sendpulse.com/oauth/access_token`)

## Request body

- object
  - `email` union, required
    - object
      - `html` string, required: HTML version of an email, encoded in Base64
      - `text` string, required: Text version of the email
      - `template` object
        - `id` union, required: Template ID
          - string
          - integer
        - `variables` object, required: Template variables mapping
      - `auto_plain_text` boolean
      - `subject` string, required
      - `from` object, required
        - `name` string, required
        - `email` string, required
      - `to` object[], required
        - `name` string
        - `email` string, required
      - `reply_to` object
        - `name` string
        - `email` string
      - `cc` object[]
        - `name` string
        - `email` string
      - `bcc` object[]
        - `name` string
        - `email` string
      - `attachments` object: Filename to content mapping
      - `attachments_binary` object: Filename to Base64 content mapping
    - object
      - `html` string: HTML version of an email, encoded in Base64
      - `text` string: Text version of the email
      - `template` object, required
        - `id` union, required: Template ID
          - string
          - integer
        - `variables` object, required: Template variables mapping
      - `auto_plain_text` boolean
      - `subject` string, required
      - `from` object, required
        - `name` string, required
        - `email` string, required
      - `to` object[], required
        - `name` string
        - `email` string, required
      - `reply_to` object
        - `name` string
        - `email` string
      - `cc` object[]
        - `name` string
        - `email` string
      - `bcc` object[]
        - `name` string
        - `email` string
      - `attachments` object: Filename to content mapping
      - `attachments_binary` object: Filename to Base64 content mapping

## Response `200`

Email sent successfully

- object
  - `result` boolean
  - `id` string

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `422`: Validation error

---

[API](https://skmtc.dev/sendpulse/apis/sendpulse-smtp-api.md) · [All operations](https://skmtc.dev/sendpulse/apis/sendpulse-smtp-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sendpulse/apis/sendpulse-smtp-api/revisions/9bab1dd9ec2e?raw)
