Messaging APIs
VoicerOnePBX exposes simple REST endpoints so your own software — an EMR, a CRM, a booking system — can send through the phone system: fax a PDF, send a text, send an email, or place a call. All are authenticated with a bearer token and take a JSON body.
Authentication
Every request carries an Authorization: Bearer <token> header — the same integration token
you configure in the PBX. Requests are made to the web port (e.g. https://<pbx>:8084).
The endpoints
| Endpoint | Sends |
|---|---|
POST /api/fax | A fax — a base64 PDF, optional cover page, with a status callback. |
POST /api/sms | A one-off text message over your SMS trunk. |
POST /api/email | An email through the PBX's configured mail account. |
POST /api/reminders | Schedule an appointment-reminder call. |
POST /api/voice/originate | Place a call (and drive it with programmable voice). |
Example — send a fax
POST /api/fax
Authorization: Bearer <token>
Content-Type: application/json
{
"to": "19725329272",
"pdfBase64": "<base64 of the PDF>",
"cover": { "to": "Dr. Smith", "from": "Acme Clinic", "subject": "Referral" },
"statusCallbackUrl": "https://app.example.com/fax-status"
}
The response returns a faxId and status; the terminal result (fax.sent /
fax.failed) is POSTed to your statusCallbackUrl. Transient failures retry on their own.
Example — send an SMS
to may be one number, a comma/semicolon-separated list, or a JSON array; message
(alias text) is the body.
POST /api/sms
Authorization: Bearer <token>
Content-Type: application/json
{
"to": "905-555-0134",
"message": "Your appointment on Jul 28 at 2:30pm is confirmed. Reply to reschedule."
}
Response 200: { "sent": 1, "recipients": 1 }. Requires an SMS trunk (Settings →
SMS); without one you get 503.
Example — send an email
Provide subject plus either html or plain text. An optional single
attachment takes a base64 payload.
POST /api/email
Authorization: Bearer <token>
Content-Type: application/json
{
"to": "patient@example.com",
"subject": "Your receipt from Acme Clinic",
"html": "<p>Thanks for your visit — your receipt is attached.</p>",
"attachment": { "filename": "receipt.pdf", "base64": "<base64 of the PDF>" }
}
Response 200: { "recipients": 1, "delivered": 1 }. Uses the PBX's configured mail
account (Settings → Email).
Example — schedule an appointment reminder
Feed a single reminder object, a bare array, or { "reminders": [ … ] }. The PBX places a
reminder call (text-to-speech → dial → collect a keypad confirmation) within the call window, and can
send an SMS reminder alongside it.
POST /api/reminders
Authorization: Bearer <token>
Content-Type: application/json
{
"customerName": "Jane Roe",
"phoneNumber": "905-555-0134",
"appointmentAt": "2026-07-28T14:30:00Z",
"serviceName": "Dental cleaning",
"staffName": "Dr. Smith",
"externalRef": "appt-8821",
"statusCallbackUrl": "https://app.example.com/reminder-status"
}
The terminal outcome (confirmed, no-answer, etc., with your externalRef) is POSTed to
statusCallbackUrl — ideal for writing the result back into an EMR or booking system.
These endpoints send. To read what's come in — received faxes, inbound texts, voicemail — poll the Inbox API.