Send Fax
Transmit fax documents to one or multiple recipients. Supports various document formats and quality settings.
Endpoint​
POST https://api.audian.com:8443/v2/fax/send
Request​
Headers​
Content-Type: multipart/form-data
X-Auth-Token: YOUR_API_KEY
Parameters​
| Parameter | Type | Required | Description |
|---|---|---|---|
to | String/Array | Yes | Fax number(s) to send to |
file | File | Yes | Document file to send |
sender_name | String | No | Name of fax sender |
sender_number | String | No | Fax number of sender |
subject | String | No | Fax subject line |
quality | String | No | Quality level (standard, high, default: standard) |
cover_page | Boolean | No | Include cover page (default: true) |
cover_message | String | No | Message for cover page |
retry_on_failure | Boolean | No | Retry if failed (default: true) |
max_retries | Number | No | Max retry attempts (default: 3) |
Examples​
Send Single Fax​
curl -X POST https://api.audian.com:8443/v2/fax/send \
-H "X-Auth-Token: YOUR_API_KEY" \
-F "to=+12025551234" \
-F "file=@/path/to/document.pdf" \
-F "sender_name=John Smith" \
-F "subject=Invoice #12345"
JavaScript/Node.js​
const FormData = require('form-data');
const fs = require('fs');
const axios = require('axios');
const sendFax = async (to, filePath, senderName, subject) => {
const form = new FormData();
form.append('to', to);
form.append('file', fs.createReadStream(filePath));
form.append('sender_name', senderName);
form.append('subject', subject);
form.append('quality', 'high');
form.append('cover_page', true);
try {
const response = await axios.post(
'https://api.audian.com:8443/v2/fax/send',
form,
{
headers: {
...form.getHeaders(),
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
console.log('Fax sent:', response.data);
return response.data;
} catch (error) {
console.error('Fax send failed:', error);
}
};
// Usage
sendFax('+12025551234', '/path/to/document.pdf', 'John Smith', 'Invoice');
Python​
import requests
def send_fax(api_key, to, file_path, sender_name=None, subject=None,
quality='standard', cover_page=True, cover_message=None):
url = 'https://api.audian.com:8443/v2/fax/send'
headers = {
'X-Auth-Token': api_key
}
files = {
'file': open(file_path, 'rb'),
'to': (None, to),
}
if sender_name:
files['sender_name'] = (None, sender_name)
if subject:
files['subject'] = (None, subject)
files['quality'] = (None, quality)
files['cover_page'] = (None, str(cover_page).lower())
if cover_message:
files['cover_message'] = (None, cover_message)
response = requests.post(url, headers=headers, files=files)
return response.json()
# Usage
result = send_fax(
api_key='YOUR_API_KEY',
to='+12025551234',
file_path='/path/to/document.pdf',
sender_name='John Smith',
subject='Invoice #12345',
quality='high'
)
print(result)
Send Multiple Faxes​
curl -X POST https://api.audian.com:8443/v2/fax/send \
-H "X-Auth-Token: YOUR_API_KEY" \
-F "to=+12025551234" \
-F "to=+14155552345" \
-F "to=+17085553456" \
-F "file=@/path/to/document.pdf" \
-F "sender_name=Company Name" \
-F "subject=Important Notice"
With Cover Page Message​
curl -X POST https://api.audian.com:8443/v2/fax/send \
-H "X-Auth-Token: YOUR_API_KEY" \
-F "to=+12025551234" \
-F "file=@/path/to/document.pdf" \
-F "sender_name=Legal Department" \
-F "cover_page=true" \
-F "cover_message=Please review the attached contract and sign."
Response​
Success (201)​
{
"id": "fax_abc123def456",
"to": "+12025551234",
"status": "pending",
"pages": 3,
"quality": "high",
"sender_name": "John Smith",
"sender_number": "+12025559999",
"subject": "Invoice #12345",
"file_size": 245000,
"sent_at": null,
"completed_at": null,
"created_at": "2024-02-04T13:00:00Z"
}
Multiple Recipients Success (201)​
{
"faxes": [
{
"id": "fax_abc123def456",
"to": "+12025551234",
"status": "pending"
},
{
"id": "fax_def456xyz789",
"to": "+14155552345",
"status": "pending"
},
{
"id": "fax_xyz789abc123",
"to": "+17085553456",
"status": "pending"
}
],
"total": 3
}
Error (400)​
{
"error": "invalid_fax_number",
"message": "Invalid fax number format"
}
Supported Document Formats​
| Format | Extension | Size Limit |
|---|---|---|
| 50MB | ||
| TIFF | .tiff | 50MB |
| PNG | .png | 50MB |
| JPG | .jpg | 50MB |
| GIF | .gif | 50MB |
Quality Settings​
Standard (200 DPI)​
- Suitable for text documents
- Smaller file sizes
- Faster transmission
High (300 DPI)​
- Better for documents with images or charts
- Larger file sizes
- Slower transmission
Cover Page Options​
Default Cover Page​
Automatic cover page with sender info and subject.
Custom Cover Page​
Include a custom message on the cover page:
const coverMessage = `
Please review the attached contract.
All pages should be signed and returned by March 15, 2024.
Thank you.
`;
// Include in send request
await sendFax(to, filePath, {
cover_page: true,
cover_message: coverMessage
});
Batch Sending​
Send faxes to multiple recipients:
const recipients = [
'+12025551234',
'+14155552345',
'+17085553456',
'+21065554567'
];
const sendBatchFaxes = async (filePath, recipients) => {
const results = [];
for (const to of recipients) {
try {
const result = await sendFax(to, filePath, 'Company', 'Batch Document');
results.push({ to, status: 'sent', id: result.id });
} catch (error) {
results.push({ to, status: 'failed', error: error.message });
}
}
return results;
};
Retry Strategy​
Control automatic retry behavior:
curl -X POST https://api.audian.com:8443/v2/fax/send \
-H "X-Auth-Token: YOUR_API_KEY" \
-F "to=+12025551234" \
-F "file=@/path/to/document.pdf" \
-F "retry_on_failure=true" \
-F "max_retries=5"
Best Practices​
- Format Selection: Use PDF for maximum compatibility
- Compression: Compress PDFs before sending for faster transmission
- Number Format: Use E.164 format for fax numbers (+1XXXYYYZZZZ)
- Sender Info: Always include sender name and number
- Subject Line: Use clear, descriptive subject lines
- Testing: Send test faxes before bulk operations
- Tracking: Monitor fax status after sending
- Archival: Store fax IDs for compliance
Common Sending Patterns​
Simple Invoice Fax​
await sendFax(
'+12025551234',
'invoice.pdf',
{
sender_name: 'Accounting Department',
subject: 'Invoice #2024-001',
quality: 'standard',
cover_page: true
}
);
Legal Document Delivery​
await sendFax(
'+12025551234',
'contract.pdf',
{
sender_name: 'Legal Department',
subject: 'Contract for Review',
quality: 'high',
cover_page: true,
cover_message: 'Please review and sign within 5 business days.'
}
);
Broadcast Campaign​
const clients = ['+1xxx', '+1yyy', '+1zzz'];
for (const client of clients) {
await sendFax(client, 'notice.pdf', {
sender_name: 'Management',
quality: 'standard'
});
}
Limits and Quotas​
- Max fax pages: 500 per fax
- Max file size: 50MB
- Max recipients per send: 500
- Max concurrent sends: 10 per account
- Send timeout: 5 minutes per fax
- Retry attempts: Up to 10 configurable