Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Use eMessage

eMessage sends authenticated SMS notifications to a mobile number through the Philippine eGov messaging service.
Sending an SMS creates an external side effect and may expose citizen contact data. Keep the provider token in server-side code.

Delivery policy

Apply retry and duplicate-suppression policy in the application because the generated client does not retry automatically.

Initialize the client

Create a dedicated client with the eMessage token issued to your integration:
import { createClient } from "egov.js"; const client = createClient({ baseUrl: "https://ws-message.e.gov.ph", headers: { "X-EMESSAGE-Auth": process.env.EMESSAGE_TOKEN!, }, });

Methods

The example below uses this authenticated eMessage client. See the quickstart for the general client pattern.
The API Reference tab documents the complete message body, authentication header, validation errors, and success response.

eMessage.sendSms

POST /messaging/v1/sms/push sends an SMS message to the supplied mobile number using the configured eMessage token.
import { eMessage } from "egov.js"; const message = await eMessage.sendSms({ client, body: { message: "Your application is ready for review.", number: "+639171234567", }, throwOnError: true, });