Direct Messaging API
The Direct Messaging API allows you to send instant, transactional messages directly to any phone number. This is ideal for system alerts, OTPs, shipping updates, and real-time notifications.
Send a Message
Instantly dispatch a message to a single destination.
POST/api/messages/send
Request Body
| Field | Type | Description |
|---|---|---|
| to * | string | The recipient's phone number in international format (e.g., +233...). |
| message * | string | The message content to send. |
curl -X POST https://api.herbby.digitechedge.com/api/messages/send \
-H "Authorization: Bearer YOUR_WA_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"to": "+233505160686",
"message": "Hello from PrimePath! Your order has been shipped."
}'Response
{
"status": "success",
"message": "Message queued successfully!"
}Send an SMS
Instantly dispatch a standard SMS text message. SMS messages are automatically routed through our pre-approved generic Sender ID ("HERBBY").
POST/api/sms/send
Request Body
| Field | Type | Description |
|---|---|---|
| to * | string | The recipient's phone number in international format. |
| message * | string | The message content to send. |
| company | string | Optional. Your company name. We will automatically prepend this to your message (e.g. [Company]: Message). |
curl -X POST https://api.herbby.digitechedge.com/api/sms/send \
-H "Authorization: Bearer YOUR_SMS_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"to": "+233505160686",
"message": "Your order is ready for pickup.",
"company": "Herbby Store"
}'