Skip to main content

Endpoint

POST https://app.sling.com.ng/api/v2/send-email
The recipient on this endpoint is an email address rather than a phone number. Provide the address through to, or target saved contacts through contact, contacts, group, or groups.

Headers

HeaderValue
Acceptapplication/json
AuthorizationBearer {API_TOKEN}
Content-Typeapplication/json

Body parameters

sender
string
required
Approved email Sender ID (the from address registered for your account).
subject
string
required
Email subject line.
message
string
required
Plain-text email body.
html
string
HTML email body. When provided, recipients see the HTML version where supported.
type
string
Sender ID route. Accepted values: transactional, promotional, otp. Defaults to transactional.
callback
string
Public HTTPS URL that receives delivery updates.
reference
string
Custom message ID.
send_on
string
ISO datetime to schedule the message.
campaign_name
string
Label applied to multi-recipient campaigns.

Recipient (provide exactly one)

to
string
Recipient email address.
contact
string
Saved contact ID. The contact must have an email set.
contacts
array
Array of saved contact IDs.
group
string
Single group ID.
groups
array
Array of group IDs.

Response fields

status
string
"success" when the message is accepted.
message_id
string
Unique message ID. Use it with Message Status.
sender
string
Sender used for delivery.
recipient
string
Recipient email address.
credit_used
number
Credits deducted for this message.

Error responses

StatusMeaning
400Missing or invalid request fields
400Insufficient credit
400Sender not approved for Email
400Contact has no email address