UNPKG

@davidbolaji/termii-node

Version:

Node.js SDK for Termii API – send SMS, voice, OTP, and manage messaging with ease.

21 lines (20 loc) 594 B
/** * Service for fetching SMS, Voice & WhatsApp message history (Inbox API) */ export class HistoryService { constructor(http) { this.http = http; } /** * Fetch message history (all messages or a single message if message_id is provided) * * @param payload - Optional request payload with message_id * @returns Expanded HistoryResponse array of message records */ async getHistory(payload) { return this.http.request("/sms/inbox", { method: "GET", params: payload // message_id if provided }); } }