Documentation Code examples
DEVELOPER GUIDE

Code examples

A small request is all it takes to start.

cURL

Send a WhatsApp message
curl -X POST 'https://notif.sabco24.com/api/v1/messages' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "connection_id": "YOUR_CONNECTION_ID",
    "channel_type": "whatsapp",
    "to": "+971501234567",
    "type": "text",
    "text": "Hello from my workflow!"
  }'

JavaScript / Node.js

Server-side JavaScript
const response = await fetch('https://notif.sabco24.com/api/v1/messages', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer ' + process.env.NOTIFICATION_API_KEY,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    connection_id: process.env.NOTIFICATION_CONNECTION_ID,
    channel_type: 'whatsapp',
    to: '+971501234567',
    type: 'text',
    text: 'Your order is ready.'
  })
});
const result = await response.json();
if (!response.ok) throw new Error(result.message || 'Send failed');

Python

Python requests
import os
import requests

response = requests.post(
    'https://notif.sabco24.com/api/v1/messages',
    headers={'Authorization': 'Bearer ' + os.environ['NOTIFICATION_API_KEY']},
    json={
        'connection_id': os.environ['NOTIFICATION_CONNECTION_ID'],
        'channel_type': 'whatsapp',
        'to': '+971501234567',
        'type': 'text',
        'text': 'Your order is ready.'
    },
    timeout=30
)
response.raise_for_status()
print(response.json())

n8n HTTP Request

Method: POST. URL: https://notif.sabco24.com/api/v1/messages. Use a Header Auth credential with name Authorization and value Bearer YOUR_API_KEY. Send JSON with the same fields as the examples above.

Need help with an integration?Talk to support