Send a Single SMS
Make aPOST request to /v1/sms/send with your recipient, Sender ID, and message body.
Request Parameters
string
required
The recipient’s phone number in E.164 format (e.g.
+233XXXXXXXXX). Always include the country code prefixed with +. Do not use spaces, dashes, or parentheses.string
required
Your registered and approved Sender ID (e.g.
YourBrand). The Sender ID must exist in your account with approved status before use.string
required
The text content of your SMS. Standard messages support up to 160 characters per segment. Messages longer than 160 characters are automatically split into multiple segments and charged accordingly.
string
An optional HTTPS URL on your server where Hany will
POST delivery status updates (webhooks). Use this to track whether a message was delivered, failed, or is still pending.Message Length and Segments
Understanding segments helps you control costs and message formatting:- Standard SMS — Up to 160 characters per segment. A 160-character message uses 1 credit.
- Long SMS — Messages over 160 characters are split into segments of up to 153 characters each (the remaining characters carry concatenation headers). A 300-character message uses 2 credits.
- Unicode SMS — Messages containing Unicode characters (e.g. emojis, Arabic, Chinese) are limited to 70 characters per segment, or 67 characters per segment for multi-part Unicode messages.
- Credits charged per segment — Each segment consumes 1 credit (GHS 0.02). Keep messages concise to stay efficient.
Always use E.164 format for phone numbers: a
+ sign followed by the country code and subscriber number with no spaces or separators. For Ghana, this looks like +233XXXXXXXXX.Code Examples
Response Fields
string
The result of the request.
"success" indicates the message was accepted and queued for delivery. On failure, this will be "error" and an error field will describe the issue.string
A unique identifier for this message (e.g.
msg_abc123). Use this ID to look up delivery status or reference the message in support queries.string
The recipient phone number as provided in the request, in E.164 format.
string
The Sender ID used for this message, as provided in the request.
integer
The number of credits deducted for this message. This equals the number of SMS segments the message was split into.
integer
Your remaining credit balance after this message was sent. Monitor this field to avoid running low before a critical send.