API documentation
The Notifygh API
One JSON request sends a message to one number or thousands. GHS 0.03 per SMS, from the same wallet as the dashboard.
Base URL https://notifygh.com/api/v1
Authentication
Create a key on the Developers page of your dashboard and send it in the Authorization header of every request. Keys are shown once, when you create them.
Authorization: Bearer ntfy_live_••••••••••••••••
- Sandbox keys (
ntfy_sandbox_…) go through the SMS sandbox: every check runs, nothing reaches a phone, and once the platform is live they are free. - Live keys (
ntfy_live_…) send real SMS and are charged from your wallet.
Send a message
POST /messages sends one text to every recipient, or schedules it. The cost is taken from your wallet when the message is accepted, and anything that can't be sent is refunded.
curl -X POST https://notifygh.com/api/v1/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "Hi {first_name}, your order is ready for pickup.",
"recipients": ["0241234567", "+233201234567"],
"senderId": "AMAFASHION",
"scheduledAt": "2026-11-04T09:00:00Z"
}'
| Field | Description |
|---|---|
message | Required. Up to 1,000 characters. {first_name}, {last_name}, {name} and {phone} are filled in from your contacts for each recipient. |
recipients | Phone numbers as strings (or {"phoneNumber": "…"} objects) in any common Ghana format. Repeats are sent once; blocked numbers are skipped. |
groupIds | Send to every contact in these groups. Give recipients, groupIds, or both. Up to 5,000 numbers per send. |
senderId | Optional. One of your approved sender IDs. Without it, messages come from Notifygh. |
scheduledAt | Optional. An ISO 8601 time between a minute and 90 days ahead. The cost is held until it goes out. |
A 201 response describes the message:
{
"id": "01JC7Y9G6S8ZQ4M3T2V1W0X9YB",
"status": "completed",
"senderId": "AMAFASHION",
"recipientCount": 2,
"failedCount": 0,
"totalCostMinor": 6,
"refundedMinor": 0,
"scheduledAt": null,
"recipients": [
{ "phoneNumber": "+233241234567", "status": "sent", "error": null, "deliveredAt": null }
],
"duplicatesRemoved": 0,
"optedOutSkipped": 0
}
Amounts are in pesewas (GHS 1 = 100 pesewas). status is one of completed, partially_failed, failed, scheduled, or reserved when a large personalised send is queued; it goes out within a minute, and a webhook tells you when it finishes.
Read messages
GET /messages returns your 50 most recent messages. GET /messages/{id} returns one, with each recipient's status. A recipient is sent once the network accepts it, then delivered or undelivered when the delivery report arrives; failed means it was never sent and was refunded.
Wallet balance
GET /wallet/balance
{ "balanceMinor": 125000, "currency": "GHS" }
Contacts
GET /contacts lists your 100 most recent contacts. POST /contacts adds one:
{ "firstName": "Ama", "lastName": "Mensah", "phoneNumber": "0241234567", "email": "ama@example.com" }
A number that's already one of your contacts gets a 409.
Sender IDs
GET /sender-ids lists the names you can put in senderId, and the ones still in review. Request new ones from the dashboard.
Errors and limits
Errors come back as JSON with an error message written for people:
| Status | Meaning |
|---|---|
400 | Something in the request needs fixing, such as an invalid number (listed in invalid) or an empty message. |
401 | The API key is missing, wrong or revoked. |
402 | Your wallet doesn't cover the send. Nothing was charged. |
404 | No message with that id on your account. |
422 | The sender ID isn't approved for your account, or scheduling isn't available right now. |
429 | More than 120 requests in a minute from one key. Wait for the seconds in Retry-After. |
Webhooks
Add an https URL on the Developers page and choose events: message.completed, message.partially_failed, message.failed and wallet.topup.success. We post JSON like this:
{
"event": "message.completed",
"data": { "messageId": "01JC7Y9G6S8ZQ4M3T2V1W0X9YB", "recipientCount": 2, "failedCount": 0, "totalCostMinor": 6, "refundedMinor": 0 },
"ts": "2026-11-04T09:00:03Z"
}
Each request carries X-Notifygh-Signature: the HMAC-SHA256 of the raw body, in hex, made with your endpoint's signing secret. Check it before trusting the event:
$expected = hash_hmac('sha256', file_get_contents('php://input'), $signingSecret);
if (! hash_equals($expected, $_SERVER['HTTP_X_NOTIFYGH_SIGNATURE'] ?? '')) {
http_response_code(401);
exit;
}
Answer with any 2xx status. Otherwise we retry after 1, 5, 30, 120 and 720 minutes, then stop.