04 For developers
SMS and email, called from the software you already run.
The AI-powered DreamWEB gateway is available over HTTPS. Authenticate with the username and password from your account, or with an API key. Keep those secrets on your server — not in a public page or a mobile app.
SMS API
One HTTPS request per message.
Loop your numbers and call the gateway. A successful submit returns 1701, the destination, and a message id you can match to a later delivery report.
Send with username and password
GET https://app.dreamwebgroup.com/smsbackend/clientapi/Dreamweb_Resl/send-message/
?username=YOUR_USERNAME
&password=YOUR_PASSWORD
&type=0
&destination=233XXXXXXXXX
&dlr=1
&source=DREAMWEB
&message=Hello%20from%20DreamWEB
Send with an API key
GET https://app.dreamwebgroup.com/smsbackend/clientapi/Dreamweb_Resl/send-message/
?key=YOUR_API_KEY
&type=0
&destination=233XXXXXXXXX
&dlr=1
&source=DREAMWEB
&message=Hello%20from%20DreamWEB
URL-encode the message, any sender name that contains a space, and the API key. When a key is sent, username and password are ignored.
| Parameter | Required | What it does |
|---|---|---|
username |
Yes | Account username from sign-up. It cannot be changed later. |
password |
Yes | Account password. Not required when you send an API key. |
key |
No | API key. Replaces username and password. URL-encode it. |
type |
Yes | 0 for a normal text, 1 for a flash message. |
dlr |
Yes | Always 1. Requests a delivery report. |
source |
Yes | Sender name on the phone. Up to 11 characters. |
destination |
Yes | Recipient number, local (024…) or international (233…). |
message |
Yes | The text, as UTF-8 and URL-encoded. |
callback_url |
No | Where a JSON delivery report should be sent. |
validity_period |
No | Minutes the network should keep trying. Useful for one-time codes. |
| Code | Meaning |
|---|---|
1701 | Accepted. The body is 1701, the number, and a message id. |
1702 | A required parameter was missing or blank. |
1703 | Username or password was not valid. |
1704 | The type value was not valid. |
1705 | The message was not valid. |
1706 | The destination number was not valid. |
1707 | The sender name was not valid. |
1708 | The dlr value was not valid. |
1709 | User validation failed. |
1710 | Internal error. |
1025 | The account is out of credit. |
1026 | The reseller account is out of credit. |
Email API
A POST for one authorised email.
Every sender address has to be verified on the account before it can be used. Ask DreamWEB to verify an address before you go live.
Endpoint
POST https://app.dreamwebgroup.com/smsbackend/clientapi/Dreamweb_Resl/send-email/
Example body
{
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
"emailTo": ["client@example.com"],
"emailFrom": "verified-sender@yourdomain.com",
"emailBody": "Hello from DreamWEB",
"senderName": "Your Brand",
"subject": "A note for you",
"callBackUrl": "https://example.com/email-status"
}
To authenticate with a key, send key and leave out username and password. A stored template uses the field template and fills {{{content}}}. You can also pass encoded HTML in html.
| Field | Required | What it does |
|---|---|---|
username | Yes | API username. Omit with password when using a key. |
password | Yes | API password. Omit when using a key. |
key | No | Replaces username and password. |
emailTo | Yes | A list of recipient addresses. |
emailFrom | Yes | A verified sender on the account. |
emailBody | Yes | The message body. |
senderName | Yes | The name recipients see. |
subject | Yes | Subject line. |
callBackUrl | Yes | Status callback. Send an empty string if you do not need one. |
template | When used | A template on the platform. The body fills {{{content}}}. |
html | When used | Encoded HTML, if you are not using a template. |
| Status | Meaning |
|---|---|
200 | Accepted and handed to delivery. |
400 | Validation failed. A required field is missing. |
401 | Username, password, or key was rejected. |
412 | A business rule failed, such as balance or job creation. |
500 | Server error. |
A status callback describes the job with a message id, sender, recipient, timestamp, and a short status such as sent or insufficient balance.
Request API access