API REST • Mai haɓaka da farko

API ɗaya don kai ga kowane abokin ciniki na Ghana

SMS, WhatsApp, imel, push, da murya tare da haɗin guda. Canjin mai bada sabis ta atomatik.

API Keys da sandbox

Ƙirƙiri sandbox keys a Saituna. Header X-API-Key.

SDK Node.js da Python

@notifybridge/sdk da packages/sdk-python.

Webhooks na isarwa

Callbacks da sa hannu don message.status.updated da opt-out.

Bayanin OpenAPI

Shigo da Postman ko ƙirƙiri clients OpenAPI 3.0.

Tabbatarwa

Ƙirƙiri API key a Saituna → API Keys. Aika ta hanyar header X-API-Key a kowace buƙata.

Don JWT dashboard: Authorization: Bearer <token> da X-Organization-Id.

URL tushe: https://api.notify.rorodigitalsolutions.com

Duba lafiya: GET https://api.notify.rorodigitalsolutions.com/health

Aika saƙo

POST /messages/send tare da SMS, WHATSAPP, EMAIL, PUSH, ko VOICE. async: true yana jera (202 + QUEUED).

cURL
curl -X POST https://api.notify.rorodigitalsolutions.com/messages/send \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "SMS",
    "to": "+233241234567",
    "body": "Your OTP is 482910. Valid for 5 minutes.",
    "countryCode": "GH"
  }'
Node.js
const response = await fetch('https://api.notify.rorodigitalsolutions.com/messages/send', {
  method: 'POST',
  headers: {
    'X-API-Key': process.env.NOTIFYBRIDGE_API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    channel: 'SMS',
    to: '+233241234567',
    body: 'Your OTP is 482910. Valid for 5 minutes.',
    countryCode: 'GH',
  }),
});

const { data } = await response.json();
console.log(`Message ${data.internalMessageId} → ${data.status}`);

Aika yawa

POST /messages/bulk har zuwa saƙonni 100. async: true yana jera duka (202 da logs QUEUED).

cURL
curl -X POST https://api.notify.rorodigitalsolutions.com/messages/bulk \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "async": true,
    "countryCode": "GH",
    "messages": [
      { "channel": "SMS", "to": "+233241234567", "body": "Reminder 1" },
      { "channel": "SMS", "to": "+233241234568", "body": "Reminder 2" }
    ]
  }'

SDK Node.js

Saka daga monorepo ko kwafi packages/sdk.

@notifybridge/sdk
import { NotifyBridgeClient } from '@notifybridge/sdk';

const client = new NotifyBridgeClient({
  apiKey: process.env.NOTIFYBRIDGE_API_KEY!,
  baseUrl: 'https://api.notify.rorodigitalsolutions.com',
});

const message = await client.sendMessage({
  channel: 'SMS',
  to: '+233241234567',
  body: 'Hello from the NotifyBridge SDK!',
  countryCode: 'GH',
  async: true,
});
console.log(message.internalMessageId, message.status);

const bulk = await client.sendBulk({
  async: true,
  countryCode: 'GH',
  messages: [
    { channel: 'SMS', to: '+233241234567', body: 'Reminder 1' },
    { channel: 'SMS', to: '+233241234568', body: 'Reminder 2' },
  ],
});

const event = await client.triggerEvent({
  event: 'appointment.reminder',
  to: '+233241234567',
  variables: { firstName: 'Kwame', clinicName: 'Demo Clinic' },
});

SDK Python

Client stdlib kawai — pip install -e packages/sdk-python.

notifybridge (Python)
from notifybridge import NotifyBridgeClient

client = NotifyBridgeClient(
    api_key=os.environ["NOTIFYBRIDGE_API_KEY"],
    base_url="https://api.notify.rorodigitalsolutions.com",
)

message = client.send_message(
    channel="SMS",
    to="+233241234567",
    body="Hello from the NotifyBridge Python SDK!",
    country_code="GH",
    async_=True,
)
print(message["id"], message["status"])

bulk = client.send_bulk(
    async_=True,
    country_code="GH",
    messages=[
        {"channel": "SMS", "to": "+233241234567", "body": "Reminder 1"},
        {"channel": "SMS", "to": "+233241234568", "body": "Reminder 2"},
    ],
)

client.trigger_event(
    event="appointment.reminder",
    to="+233241234567",
    variables={"firstName": "Kwame", "clinicName": "Demo Clinic"},
)

Webhooks

Yi rajistar endpoints a Saituna. Sa hannu HMAC-SHA256.

Tabbatar da sa hannu
# Verify webhook signature (Node.js)
const crypto = require('crypto');

function verifySignature(body, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(body)
    .digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  );
}

// Headers: X-NotifyBridge-Signature, X-NotifyBridge-Event
// Events: message.status.updated, contact.opted_out, campaign.completed

Tashin abubuwan da faru

Saita abubuwan da faru a dashboard, kunna daga app ɗinku.

cURL
curl -X POST https://api.notify.rorodigitalsolutions.com/events/trigger \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "event": "appointment.reminder",
    "to": "+233241234567",
    "variables": {
      "firstName": "Kwame",
      "clinicName": "Demo Clinic",
      "date": "2026-07-04",
      "time": "10:00"
    }
  }'

Shirye don haɗawa?

Asusu kyauta, sandbox key, da saƙon gwaji na farko a ƙasa da mintuna 5.

Fara kyauta
Masu haɓakawa — REST API don SMS, WhatsApp da Sanarwa | NotifyBridge