This guide explains how to send outbound faxes using the eFax API. It includes the API endpoint, authentication requirements, request parameters, request and response examples, error handling, and troubleshooting information.
Prerequisite
Before using the eFax API, ensure you have a valid API Key.
API keys are issued by the Tech Support Team.
If you do not already have an API key, please contact Tech Support and follow the guide below for instructions on requesting one:
API Endpoint #
POST https://api.documo.com/v1/faxes
HTTP Method #
POST
Authentication #
The API uses Basic Authentication.
Include your API key in the Authorization header.
Example #
Authorization: Basic YOUR_API_KEY
Replace YOUR_API_KEY with the API key generated from your eFax account.
Request Headers #
| Header | Value |
|---|---|
| Authorization | Basic YOUR_API_KEY |
| Content-Type | multipart/form-data |
Request Body #
The request body must be sent as multipart/form-data.
Required Parameters #
| Parameter | Type | Description |
|---|---|---|
| faxNumber | String | Destination fax number including country code (Example: 12125551234). |
| attachments | File | File(s) to be faxed. Required unless using a cover page only. |
Optional Parameters #
| Parameter | Type | Description | Example |
|---|---|---|---|
| coverPage | Boolean | Includes the default cover page. | true/false |
| recipientName | String | Recipient name displayed on the cover page. | John Smith |
| senderName | String | Sender name displayed on the cover page. | ABC Company |
| subject | String | Subject shown on the cover page. | Invoice 10025 |
| notes | String | Notes displayed on the cover page. | Please review and sign. |
| callerId | String | Outbound fax number to send from. If omitted, the account default is used. | 12125550000 |
| scheduledDate | ISO Date | Schedule the fax for a future date/time. | 2026-06-25T15:30:00Z |
| async | Boolean | Returns immediately with a Message ID instead of waiting for processing. | true |
| optimizeFax | String | Fax optimization mode. Supported values: auto, text, image. | auto |
Example Request #
URL #
POST https://api.documo.com/v1/faxes
Headers #
Authorization: Basic YOUR_API_KEY
Content-Type: multipart/form-data
Body #
| Key | Type | Value |
|---|---|---|
| faxNumber | Text | 12125551234 |
| recipientName | Text | John Smith |
| senderName | Text | ABC Company |
| subject | Text | Invoice #10025 |
| callerId | Text | 12125550000 |
| notes | Text | Please review and sign the attached invoice. |
| async | Text | true |
| optimizeFax | Text | auto |
| attachments | File | invoice.pdf |
Successful Response #
When the request is accepted, the API returns a response similar to:
{
"messageId": "f3b0c5d7-8c29-4f4c-a3de-xxxxxxxxxxxx",
"status": "Processing"
}
The messageId uniquely identifies the fax submission and can be used to track its status.
Error Handling #
400 Bad Request #
Returned when required parameters are missing or invalid.
Example:
{
"error": {
"message": "faxNumber is required"
}
}
401 Unauthorized #
Returned when authentication fails.
Example:
{
"error": {
"name": "UnauthorizedError",
"message": "Wrong authorization type"
}
}
Verify that:
- The API key is valid.
- The Authorization header uses:
Authorization: Basic YOUR_API_KEY
403 Forbidden #
The authenticated account does not have permission to perform the requested action.
404 Not Found #
The requested API endpoint is incorrect or unavailable.
422 Unprocessable Entity #
Returned when one or more request parameters are invalid.
Examples include:
- Invalid fax number.
- Unsupported file format.
- Attachment exceeds the maximum file size.
- Invalid Caller ID.
500 Internal Server Error #
An unexpected server-side error occurred.
Retry the request after a few moments. If the issue persists, contact support.
Troubleshooting #
Authentication Fails #
Verify that the Authorization header is configured as:
Authorization: Basic YOUR_API_KEY
Do not use:
Authorization: Bearer YOUR_API_KEY
or
Authorization: Key YOUR_API_KEY
Invalid Fax Number #
Ensure the fax number:
- Includes the country code.
- Contains only digits.
- Does not include spaces, brackets, or hyphens.
Correct Example
12125551234
Attachment Not Accepted #
Verify that:
- The attachment is a supported document type.
- The file size is within the API limits.
- The attachment is uploaded as a File using multipart/form-data.
Wrong Caller ID #
If multiple outbound fax numbers exist on your account, specify the desired sending fax number using the callerId parameter.
If omitted, the account’s default outbound fax number will be used.
Request Times Out #
For applications that do not need to wait for processing to complete, enable asynchronous processing:
async=true
The API will immediately return a messageId, allowing the application to continue while the fax is processed in the background.