Go-Mailer.

Transactional SMS

The Transactional SMS Object represents a transactional SMS template in your Go-Mailer account. The API allows you to send or dispatch SMS messages to your users.

Send an SMS

Sends the specified transactional SMS to the specified recipients. A recipient does not have to be a contact in your account.

POST https://api.go-mailer.com/v1/sms

Request body

code - string - required

The SMS template's unique code.

to - string - required

The phone number of the recipient. Format should be 234xxxxxxxxx

context - object

A key => value set of information which will be used to replace any placeholders specified in the transactional SMS.

The key should be the name of the placeholder used. e.g: if you used @firstname placeholder in your template, then your data object should look like this { firstname: "Sample Name" }

Sample request

HTTP
const response = await fetch("https://api.go-mailer.com/v1/sms", {
  method: "POST",
  headers: {
    Authorization: "Bearer <API_KEY>"
  },
  body: JSON.stringify({
    code: "BIRTHDAY_SMS",
    to: "234xxxxxxxxx",
    context: {
      firstname: "John",
      age: 47,
    }
  })
});