How to Send a Secure Fax via API
/api/fax/send with a JSON payload containing the recipient's fax number, your API key, and the document encoded as Base64. For HIPAA compliance, the API must enforce TLS encryption during transit and AES-256 encryption at rest.
Why Use an API for Faxing?
Traditional online fax portals require manual uploads, which breaks automated workflows. By integrating a fax API, developers can automate document delivery directly from EHRs (Electronic Health Records), CRMs, or billing software. This eliminates human error, reduces administrative overhead, and ensures data is transmitted securely without manual intervention.
Security Requirements for a Fax API
If you are transmitting sensitive data (like PHI or financial records), the API you choose must meet strict security standards. Look for the following:
- TLS 1.2+ Encryption: All data must be encrypted in transit.
- Bearer Token Authentication: API keys should be passed securely in the header, not in URL parameters.
- Immutable Audit Trails: The API should return unique transmission IDs that can be used to retrieve delivery logs for compliance. Read our HIPAA faxing guide for more details.
Example: Sending a Fax with the FaxLock API
Here is a standard cURL request to send a PDF document securely using the FaxLock REST API:
curl -X POST https://api.faxlock.com/v1/fax/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+15550100001",
"from": "+15550100002",
"fileName": "medical_record.pdf",
"fileData": "JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nDPQM1Qo5ypUMFAwALJMLU31jBQsTAz1LBSKUrnCtRTyuUK5kFJmCkYWaZ",
"webhookUrl": "https://your-app.com/webhooks/fax-status"
}'
Note: The fileData field requires your document to be Base64-encoded.
Handling Webhooks for Delivery Status
Sending a fax is only half the equation. To track when a fax is actually delivered, configure a webhook URL in your API request. When the carrier completes the transmission, FaxLock will send a POST request to your endpoint with the delivery status (e.g., delivered, failed, or busy), allowing your application to update the patient or client record automatically.
To learn more about our platform, read our definitive guide to FaxLock.
Frequently Asked Questions
What authentication method does the FaxLock API use?
The FaxLock API uses Bearer Token authentication. You must include your API key in the Authorization header of every request to ensure secure access.
Can I send multiple documents in a single API request?
Yes. The FaxLock API allows you to send multiple documents (PDF, DOCX, TIFF) in a single request by including them in the files array of your JSON payload.
How do I track the status of a fax sent via API?
You can track the status by polling the GET /api/fax/{id}/status endpoint or by configuring webhooks to receive real-time delivery notifications.
Ready to send your first secure fax?
Experience end-to-end encryption, real-time tracking, and no monthly fees.
Send a Fax Now