Logo

Getting Started

IntroductionAuthentication

OTP

POSTRequest OTPPOSTVerify OTPDELETERevoke OTPGETGet TokenGETGet OTP by Recipient

Mails

POSTSend Email

Lists

GETGet contact listGETGet rowPOSTCreate rowPATCHUpdate rowDELETEDelete row
Logo
DocumentationAPI ReferenceChangelog

Mails

Send Email

Send an email message to one or more recipients

Request

curl -X POST "https://api.simpu.co/email/send" \
  -H "Content-Type: application/json" \
  -d '{
    "recipients": "john@acme.com,mack@acme.com",
    "sender_id": "jane@acme.com",
    "content": "Hello, this is just a test.",
    "from_name": "John from Acme",
    "subject": "This is a test!!!",
    "reply_to": "no-reply@acme.com",
    "external_ref": "674535b2b39158b9aae90188fcec23eb",
    "callback": "https://example.com/email/delivery_report",
    "template_id": "674535b2b39158b9aae90188fcec23eb",
    "personalisation": [
      {
        "to": "mack@acme.com",
        "substitutions": {
          "name": "Mack from Acme"
        }
      }
    ]
  }'

Response

{
  "id": "674535b2b39158b9aae90188fcec23eb",
  "recipients": [
    "mack@acme.com"
  ],
  "sender_id": "john@acme.com",
  "external_ref": "674535b2b39158b9aae90188fcec23eb",
  "callback": "https://example.com/email/delivery_report",
  "template_id": "674535b2b39158b9aae90188fcec23eb",
  "from_name": "John from Acme",
  "personalisation": [
    {
      "to": "mack@acme.com",
      "substitutions": {
        "name": "Mack from Acme"
      }
    }
  ],
  "created_datetime": "2024-06-28T23:56:38.128604+00:00",
  "updated_datetime": "2024-06-28T23:56:38.128604+00:00",
  "meta": {
    "method": "POST",
    "resource": "/email/send",
    "estimate": {
      "available_balance": 1000.5,
      "charge": 0.33
    }
  }
}
POST

/email/send

Request Body

application/json

Email object

recipients
stringrequired
Recipients of the Email, comma-separated list of emails
Required range: 4 <= x
Example: "john@acme.com,mack@acme.com"
sender_id
stringrequired
Sender ID of the Email
Example: "jane@acme.com"
content
string
Content of the Email , this is required if a template ID is not specified
Example: "Hello, this is just a test."
from_name
string
The name of the sender of the Email
Example: "John from Acme"
subject
string
Subject of the Email
Example: "This is a test!!!"
reply_to
string
The Email address a response should be sent to
Example: "no-reply@acme.com"
external_ref
string
This is a reference to the message in your system
Example: "674535b2b39158b9aae90188fcec23eb"
callback
string
This is the URL to receive delivery reports for the email
Example: "https://example.com/email/delivery_report"
template_id
string
Template ID of the Email, this is required if content is not specified
Example: "674535b2b39158b9aae90188fcec23eb"
personalisation
object[]
Personalisation of the Email
to
stringrequired
Recipient of the personalisation
Example: "mack@acme.com"
substitutions
objectrequired
Substitutions of the personalisation
Example: {"name":"Mack from Acme"}

Response

application/json

Email response

id
stringrequired
Unique ID of the Email
Example: "674535b2b39158b9aae90188fcec23eb"
recipients
arrayrequired
Recipients of the Email
Example: ["mack@acme.com"]
sender_id
stringrequired
Sender ID of the Email
Example: "john@acme.com"
external_ref
string
This is a reference to the email in your system
Example: "674535b2b39158b9aae90188fcec23eb"
callback
string
This is the URL to receive delivery reports for the message
Example: "https://example.com/email/delivery_report"
template_id
string
Template ID of the Email message
Example: "674535b2b39158b9aae90188fcec23eb"
from_name
string
The sender of the email.
Example: "John from Acme"
personalisation
object[]
Personalisation of the Email message
to
stringrequired
Recipient of the personalisation
Example: "mack@acme.com"
substitutions
objectrequired
Substitutions of the personalisation
Example: {"name":"Mack from Acme"}
created_datetime
string
Date and time the Email was created
Example: "2024-06-28T23:56:38.128604+00:00"
updated_datetime
string
Date and time the Email was last updated, if any
Example: "2024-06-28T23:56:38.128604+00:00"
meta
object
No description provided
method
stringrequired
The HTTP method used to make the request
Example: "POST"
resource
stringrequired
The resource requested
Example: "/email/send"
estimate
object
No description provided
available_balance
numberrequired
Available balance for the request
Example: 1000.5
charge
numberrequired
Charge for the request
Example: 0.33

Built with Chakra UI

Request

curl -X POST "https://api.simpu.co/email/send" \
  -H "Content-Type: application/json" \
  -d '{
    "recipients": "john@acme.com,mack@acme.com",
    "sender_id": "jane@acme.com",
    "content": "Hello, this is just a test.",
    "from_name": "John from Acme",
    "subject": "This is a test!!!",
    "reply_to": "no-reply@acme.com",
    "external_ref": "674535b2b39158b9aae90188fcec23eb",
    "callback": "https://example.com/email/delivery_report",
    "template_id": "674535b2b39158b9aae90188fcec23eb",
    "personalisation": [
      {
        "to": "mack@acme.com",
        "substitutions": {
          "name": "Mack from Acme"
        }
      }
    ]
  }'

Response

{
  "id": "674535b2b39158b9aae90188fcec23eb",
  "recipients": [
    "mack@acme.com"
  ],
  "sender_id": "john@acme.com",
  "external_ref": "674535b2b39158b9aae90188fcec23eb",
  "callback": "https://example.com/email/delivery_report",
  "template_id": "674535b2b39158b9aae90188fcec23eb",
  "from_name": "John from Acme",
  "personalisation": [
    {
      "to": "mack@acme.com",
      "substitutions": {
        "name": "Mack from Acme"
      }
    }
  ],
  "created_datetime": "2024-06-28T23:56:38.128604+00:00",
  "updated_datetime": "2024-06-28T23:56:38.128604+00:00",
  "meta": {
    "method": "POST",
    "resource": "/email/send",
    "estimate": {
      "available_balance": 1000.5,
      "charge": 0.33
    }
  }
}