Skip to main content

Sending an email

Prerequisites

You must complete the following within https://app.mailpace.com:

  • Create an Organization
  • Create a Domain
  • Verify the domain
  • Sign up to a Plan

After following the onboarding steps all of these steps should be complete

Sending an email with the HTTPS API

The MailPace has an easy to use HTTPS API, to send an email you just need to call the /send endpoint with a standard HTTP POST request containing the authentication token, required headers and your email

The send endpoint is located at

https://app.mailpace.com/api/v1/send

Examples

Here are some examples in various languages. For examples that contain your API key, open the Domain in the App and select "Examples" from the top menu bar

curl "https://app.mailpace.com/api/v1/send" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "MailPace-Server-Token: API_TOKEN_GOES_HERE" \
-d '{
"from": "example@domain.com",
"to": "person@somewhere.com",
"subject": "Hello from MailPace.com",
"textbody": "Hello"
}'

The response

The response will come back using HTTP Status codes with a JSON body. If something went wrong (i.e. it does not return 200) an error object will be included to explain why. For full details of responses and their meaning see responses