Emails

Sending emails is easy in Qiu. Here's a step-by-step guide to get you started with sending emails.

Prerequisites

  • API key
  • a Template ID

Sendig via API

Using our intuitive API, you can easily configure your emails. Here's a basic example of how to set up an email:

Url, Authentication and Headers

POST https://qiu.so/api/deliver

Header NameValue
Content-Typeapplication/json
AuthorizationBearer <YOUR_API_KEY>

Sending with Templates

JSON Payload

{
  "template_id": "9BCfK_L8u5SktdRJdyxy",
  "meta": {
    "from": "noreply@qiu.so",
    "from_name": "No Reply"
    "to": "customer@email.com",
    "to_name": "My Customer",
    "reply_to": "elijah@qiu.so",
    "reply_to_name": "John",
    "subject": "Hello! Welcome to Qiu",
    "cc": ["ccRecipient@email.com"],
    "bcc": ["bccRecipient@email.com"]
  },
  "params": {
    "name": "John",
    "reset_url": "https://mywebsite.com/reset_password?token=abc"
  }
}
ParameterTypeDescriptionOptional
template_idStringThe ID of the email template you want to use.
metaObjectContains metadata for the email.
subjectStringSubject of the email.
fromStringThe sender's email address. The domain must match your verified domain.
from_nameStringThe sender's display name.
toStringThe recipient's email address.
to_nameStringThe recipient's name.
reply_toStringThe reply-to email address.
reply_to_nameStringThe reply-to display name (optional), it displays on the email client as "John person@qiu.so"Yes
ccArray[String]An array of email addresses for CC recipients (optional).Yes
bccArray[String]An array of email addresses for BCC recipients (optional).Yes
paramsObjectContains dynamic content to be replaced in the template.

Sending Raw HTML

You can send RAW html directly with our API, only send html and pass in the raw HTML instead of sending template_id and params,

JSON Payload for Sending Raw HTML

{
  "meta": {
    "from": "hello@mail.qiu.so",
    "to": "elijah@qiu.so",
    "subject": "Sending Raw Template"
  },
  "html": "<h1>Hello</h1>"
}
ParameterTypeDescriptionOptional
metaObjectContains metadata for the email.
subjectStringSubject of the email.
fromStringThe sender's email address. The domain must match your verified domain.
from_nameStringThe sender's display name (optional).Yes
toStringThe recipient's email address.
to_nameStringThe recipient's name (optional).Yes
reply_toStringThe reply-to email address (optional).Yes
reply_to_nameStringThe reply-to display name (optional), it displays on the email client as "John person@qiu.so"Yes
ccArray[String]An array of email addresses for CC recipients (optional).Yes
bccArray[String]An array of email addresses for BCC recipients (optional).Yes
htmlStringContains the HTML to be sent.

Powered by Doctave