NotifyHub
ドキュメント

SDK Guide

Integrate NotifyHub into your application with our libraries for Node.js, PHP and Python.

Installation

npm
npm install notifyhub-sdk
yarn
yarn add notifyhub-sdk

Quick Start

JavaScript
const NotifyHub = require('notifyhub-sdk');

const client = new NotifyHub({
    apiKey: 'your-api-key',
    baseUrl: 'https://notify.trovido.com/ja'
});

// Send a message
const result = await client.send({
    channel: 'whatsapp',
    to: '+393331234567',
    body: 'Ciao! Il tuo ordine è pronto.',
    template: 'order_ready',
    params: { order_id: '12345' }
});

console.log(result.delivery_id);

Available Methods

MethodDescription
client.send(options)Send a message on any channel
client.contacts.list(params)List contacts with pagination and filters
client.contacts.create(data)Create a new contact
client.contacts.update(id, data)Update an existing contact
client.contacts.delete(id)Delete a contact
client.deliveries.list(params)List deliveries with status and date filters
client.deliveries.get(id)Single delivery detail
client.templates.list()List available templates

Authentication

All API requests require a Bearer token. Create your API key from the API Keys section of the NotifyHub portal.

Error Handling

CodeDescription
401Invalid or missing API key
422Invalid input data — check required fields
429Rate limit exceeded — retry after the period indicated in the Retry-After header
500Internal server error — try again later

STAG
https://notify.trovido.com