MessageRay API

Time to read: 1 mins.

Authentication

API requests must include an Authorization header which is your secret API key. You get get a copy of it from the Developers section on the app.

Send message

This endpoint allows you to send messages

POST https://api.messageray.com/api/v1.0/message/
Authorization: sk_production_23lklf09s0dfk2lk23lkad23
Content-Type: application/json

{
  "to": "my.customer@gmail.com",
  "model": {
    "user": {
      "first_name": "sanjeevan"
    }
  },
  "from": "you@yourcompany.com",
  "template": "welcome.html",
  "subject": "Thanks for signing up!"
}

The JSON payload that you'll need to send is detailed below:

JSON format

Parameter Type Required Description
to string true The email address you want to send the message to
from string true A verified email address you're sending from
template string true The name of the template you want to use
subject string true The subject of the message
model json true The data that you're using for the message

Response

The API will return the ID of the message that was created

{
  "id": "asdasda-2312313-qweqwe-23123"
}