Fax Services
Send and manage faxes programmatically. Send documents, check delivery status, and list available fax providers.
5 endpoints
Guide
Send fax documents programmatically through BlueHive's fax infrastructure. The API supports multiple fax providers, document types (PDF, TIFF, JPEG, PNG), and provides delivery tracking with status updates.
Sending a Fax
To send a fax, provide the recipient number and a base64-encoded document. The API queues the fax and returns a tracking ID immediately. Use the status endpoint to monitor delivery progress.
Send a PDF fax
Send a base64-encoded PDF document
import { readFileSync } from 'fs';
// Read and encode the PDF
const pdfBuffer = readFileSync('./lab-results.pdf');
const base64Content = pdfBuffer.toString('base64');
const response = await fetch('https://api.bluehive.com/v1/fax/send', {
method: 'POST',
headers: {
'Authorization': 'ApiKey YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
to: '+13135551234',
subject: 'Lab Results - Order BH-2026-0042',
document: {
content: base64Content,
contentType: 'application/pdf',
filename: 'lab-results.pdf'
}
})
});
const fax = await response.json();
console.log('Fax ID:', fax.id);
console.log('Status:', fax.status); // 'queued'Tracking Fax Delivery
Faxes progress through delivery statuses. Poll the status endpoint or set up webhooks to track delivery:
- queued — Fax is queued for sending
- dialing — Dialing the recipient number
- sending — Transmitting the document
- delivered — Fax was successfully delivered
- failed — Delivery failed (check errorMessage)
- cancelled — Fax was cancelled
- retrying — Retrying after a failed attempt
Check fax status
Poll for delivery confirmation
curl "https://api.bluehive.com/v1/fax/status/fax_abc123" \
-H "Authorization: ApiKey YOUR_API_KEY"
# Response:
# {
# "id": "fax_abc123",
# "status": "delivered",
# "to": "+13135551234",
# "from": "+18005551000",
# "pageCount": 3,
# "deliveredAt": "2026-03-09T14:32:00.000Z",
# "duration": 45,
# "cost": 0.05
# }Supported Document Types
The fax API accepts these document formats:
- application/pdf — PDF documents (most common)
- image/tiff, image/tif — TIFF images
- image/jpeg, image/jpg — JPEG images
- image/png — PNG images
- text/plain — Plain text documents