Fax
POST Send Fax
/v1/faxes
Use this method to create and send a fax. You may include our default cover page by adding coverPage parameter with a value of true. Files added to the stream will be converted to the body of the fax in the order they are added.
AUTHORIZATION API Key
Body formdata
| recipientFax | String[] | Required | Destination phone number. Multiple destinations separated by comma. |
| recipientContacts | String[] | Contact IDs separated by comma |
| attachments | Blob | Required: if coverPage parameter is not added | File(s) you wish to fax. Add files to the stream in order they should be rendered. |
| coverPage | Boolean | Default: false | Indicating true will include system cover page. If coverPage is added, this removes file requirement. |
| coverPageId | Uuid | The uuid of the cover page you want to include. If this param isn’t set but coverPage is true, default cover page for user will be used. |
| tags | String | Comma separated list of tag IDs (ex. 4c225812-81f1-4827-8194-b0e9475c54e6,7328e171-bc1f-44a6-bc18-df40a4345c9d) |
| recipientName | String | 40 characters limit | Will populate in TO field of cover page |
| senderName | String | 40 characters limit | Will populate in FROM field of cover page |
| subject | String | 55 characters limit | Will populate Subject field of cover page |
| callerId | String | 10 characters limit | Phone number. Defaults to user setting if not included in call |
| notes | String | 4000 characters limit | Will populate Notes field of cover page |
| cf | Object | Object with custom fields |
| scheduledDate | String | ISO string indicating the date and time the fax is to be sent |
| webhookId | Uuid | Uuid of the webhook which you want to send for this fax. If specified, will send only the selected webhook, otherwise all fax webhooks will be sent. |
Example Request
<?php
$curl = curl_init();s
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.drenfax.com/v1/faxes',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('faxNumber' => '11234567890','attachments'=> new CURLFILE('/path/to/file'),'coverPage' => 'false','coverPageId' => 'd1077489-5ea1-4db1-9760-853f175e8288','tags' => 'example','recipientName' => 'example','senderName' => 'example','subject' => 'example','callerId' => 'example','notes' => 'example','cf' => '{"example": "value"}','scheduledDate' => '2020-01-01T00:00:00.000Z','webhookId' => 'd1077489-5ea1-4db1-9760-853f175e8288'),
CURLOPT_HTTPHEADER => array(
'Authorization: Basic API_KEY',
'Content-Type: multipart/form-data'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
?>
Example Response
{
"errorInfo": null,
"resultInfo": "OK",
"processingStatusName": "processing",
"classificationLabel": "outbound",
"messageId": "59e02992-ee7b-42c1-82c7-87db964d8d6f",
"deliveryId": null,
"watermark": null,
"messageNumber": null,
"status": "processing",
"pagesCount": 1,
"pagesComplete": 0,
"duration": null,
"faxNumber": "+19206505920",
"faxCsid": "mFax",
"faxCallerId": "5094570000",
"faxECM": null,
"faxSpeed": null,
"faxDetected": null,
"faxProtocol": null,
"faxAttempt": null,
"direction": "outbound",
"channelType": "api",
"recipientName": null,
"subject": null,
"deviceId": null,
"faxbridgeId": null,
"accountId": "efaa36f7-d9a0-493f-a3aa-0cb1114eea0c",
"errorCode": null,
"resultCode": "0",
"isArchived": false,
"isFilePurged": false,
"country": "US",
"createdAt": "2021-06-02T13:35:18.000Z",
"resolvedDate": null,
"deletedAt": null,
"faxbridge_id": null,
"users": [
{
"avatarPath": null,
"userId": "c7ef70fc-7563-4b47-95bc-a951a636bb71",
"uuid": "c7ef70fc-7563-4b47-95bc-a951a636bb71",
"email": "test@tester.com",
"firstName": "Test",
"lastName": "Tester",
"accountId": "efaa36f7-d9a0-493f-a3aa-0cb1114eea0c",
"avatar": null,
"UserFax": {
"viewStatus": true,
"downloadStatus": false
}
}
],
"account": {
"uuid": "efaa36f7-d9a0-493f-a3aa-0cb1114eea0c",
"accountNumber": "1201734191",
"accountName": "Drensys",
"accountType": "master"
},
"tags": [],
"faxbridge": null,
"contacts": [],
"cf": {},
"device": null
}
POST Send Multiple Faxes
/v1/faxes/multiple
Use this method to create and send a fax. You may include our default cover page by adding coverPage parameter with a value of true. Files added to the stream will be converted to the body of the fax in the order they are added.
Multiple recipients: You may add multiple comma separated recipient destinations. This will result in an identical fax being sent to each destination.
AUTHORIZATION API Key
Body formdata
| recipientFax | String[] | Required | Destination phone number. Multiple destinations separated by comma. |
| recipientContacts | String[] | Contact IDs separated by comma |
| attachments | Blob | Required: if coverPage parameter is not added | File(s) you wish to fax. Add files to the stream in order they should be rendered. |
| coverPage | Boolean | Default: false | Indicating true will include system cover page. If coverPage is added, this removes file requirement. |
| coverPageId | Uuid | The uuid of the cover page you want to include. If this param isn’t set but coverPage is true, default cover page for user will be used. |
| tags | String | Comma separated list of tag IDs (ex. 4c225812-81f1-4827-8194-b0e9475c54e6,7328e171-bc1f-44a6-bc18-df40a4345c9d) |
| recipientName | String | 40 characters limit | Will populate in TO field of cover page |
| senderName | String | 40 characters limit | Will populate in FROM field of cover page |
| subject | String | 55 characters limit | Will populate Subject field of cover page |
| callerId | String | 10 characters limit | Phone number. Defaults to user setting if not included in call |
| notes | String | 4000 characters limit | Will populate Notes field of cover page |
| cf | Object | Object with custom fields |
| scheduledDate | String | ISO string indicating the date and time the fax is to be sent |
| webhookId | Uuid | Uuid of the webhook which you want to send for this fax. If specified, will send only the selected webhook, otherwise all fax webhooks will be sent. |
Example Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.drenfax.com/v1/faxes/multiple',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('recipientFax' => '1234567890,1234567890','recipientContacts' => 'd1077489-5ea1-4db1-9760-853f175e8288,d1077489-5ea1-4db1-9760-853f175e8288','attachments'=> new CURLFILE('/path/to/file'),'coverPage' => 'false','coverPageId' => 'd1077489-5ea1-4db1-9760-853f175e8288','tags' => 'example','recipientName' => 'example','senderName' => 'example','subject' => 'example','callerId' => 'example','notes' => 'example','cf' => '{"example": "value"}','scheduledDate' => '2020-01-01T00:00:00.000Z','webhookId' => 'd1077489-5ea1-4db1-9760-853f175e8288'),
CURLOPT_HTTPHEADER => array(
'Authorization: Basic API_KEY',
'Content-Type: multipart/form-data'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
?>
Example Response
{
"success": [
{
"accountId":"6c838c7c-cb48-4763-84d6-233b5f8cf782",
"channelType":"web",
"direction":"outbound",
"createdAt":"2021-01-01T12:00:00.000Z",
"deletedAt":null,
"deliveryId":"2180614133420933276",
"duration":86318,
"faxAttempt":1,
"faxbridge":null,
"faxbridgeId":null,
"faxCallerId":"5094570051",
"faxCsid":"mFax",
"faxDetected":true,
"faxECM":256,
"faxNumber":"+18885550000",
"faxProtocol":34,
"faxSpeed":33600,
"isArchived":false,
"isFilePurged":false,
"messageId":"027012f1-80c9-4be5-b093-1f54783dfa3b",
"messageNumber":"8900000",
"pagesComplete":3,
"pagesCount":3,
"status":"success",
"resolvedDate":"2021-01-01T12:00:30.000Z",
"resultCode": "0",
"resultInfo": "OK",
"contacts":[],
"tags":[],
"users":[],
"cf": {
"customField": "value"
}
}
],
"errors": [
// Error message example
{
"error" : "InvalidInputError: No files and cover page in to send.",
"recipientFax" : "12015234232"
}
]
}
POST Resend Fax
/v1/fax/resend
This call will resend a previously attempted fax. Simply supply the messageId of previous fax and we will resend.
AUTHORIZATION API Key
Body urlencoded
| messageId | String | Required | Unique message identifier |
| recipientFax | String | Use this parameter to change destination phone number. |
Example Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.drenfax.com/v1/fax/resend',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'messageId=d1077489-5ea1-4db1-9760-853f175e8288&recipientFax=1234567890',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic API_KEY',
'Content-Type: application/x-www-form-urlencoded'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
?>
Example Response
{
"success": [
{
"accountId": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
"channelType": "web",
"direction": "outbound",
"createdAt": "2018-01-01T12:00:00.000Z",
"deletedAt": null,
"deliveryId": "2180614133420933276",
"duration": 86318,
"faxAttempt": 1,
"faxbridgeId": 210000000000,
"faxCallerId": "5094570051",
"faxCsid": "mFax",
"faxDetected": true,
"faxECM": 256,
"faxNumber": "+18885550000",
"faxProtocol": 34,
"faxSpeed": 33600,
"isArchived": false,
"isFilePurged": false,
"messageId": "027012f1-80c9-4be5-b093-1f54783dfa3b",
"messageNumber": "8900000",
"pagesComplete": 3,
"pagesCount": 3,
"status": "success",
"resolvedDate": "2018-01-01T12:00:00.000Z",
"resultCode": "0",
"resultInfo": "OK",
"contacts": [],
"tags": [],
"users": [],
"faxbridge": {
"deviceCode": "210000000000",
"name": "FaxBridge",
"isActive": true
},
"cf": {
"customField": "value"
}
}
],
"errors": []
}
POST Preview Fax
/v1/fax/preview
Use this method to preview fax file before sending it.
AUTHORIZATION API Key
Body formdata
| attachments | Blob | Required: if coverPage parameter is not added | File(s) you wish to fax. Add files to the stream in order they should be rendered. |
| coverPage | Boolean | Default: false | Indicating true will include system cover page. If coverPage is added, this removes file requirement. |
| coverPageId | Uuid | The uuid of the cover page you want to include. If this param isn’t set but coverPage is true, default cover page for user will be used. |
| recipientName | String | 40 characters limit | Will populate in TO field of cover page |
| senderName | String | 40 characters limit | Will populate in FROM field of cover page |
| subject | String | 55 characters limit | Will populate Subject field of cover page |
| callerId | String | 10 characters limit | Phone number. Defaults to user setting if not included in call |
| notes | String | 4000 characters limit | Will populate Notes field of cover page |
Example Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.drenfax.com/v1/fax/preview',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('attachments'=> new CURLFILE('/path/to/file'),'coverPage' => 'false','coverPageId' => 'd1077489-5ea1-4db1-9760-853f175e8288','recipientName' => 'example','senderName' => 'example','subject' => 'example','callerId' => '1234567890','notes' => 'example'),
CURLOPT_HTTPHEADER => array(
'Authorization: Basic API_KEY',
'Content-Type: multipart/form-data'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
?>
Example Response
OK
POST Fax Blast
/v1/fax/blast
Use this method to send out many faxes with a list of recipients in an excel file.
AUTHORIZATION API Key
Body formdata
| recipient | Blob | Excel file with list of recipients |
| coverPage | Boolean | Default: false | Indicating true will include system cover page. If coverPage is added, this removes file requirement. |
| coverPageId | Uuid | The uuid of the cover page you want to include. If this param isn’t set but coverPage is true, default cover page for user will be used. |
Example Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.drenfax.com/v1/fax/blast',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('recipient'=> new CURLFILE('/path/to/file')),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
?>
POST Cancel Fax
/v1/fax/{messageId}/cancel
This method cancels sending of processing or scheduled faxes
AUTHORIZATION API Key
Path Variables
| messageId | String | Required | Message UUID |
Example Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.drenfax.com/v1/fax/d1077489-5ea1-4db1-9760-853f175e8288',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_POSTFIELDS => 'isArchived=false',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic API_KEY',
'Content-Type: application/x-www-form-urlencoded'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
?>
Example Response
{
"accountId":"6c838c7c-cb48-4763-84d6-233b5f8cf782",
"channelType":"web",
"direction":"outbound",
"createdAt":"2018-01-01T12:00:00.000Z",
"deletedAt":null,
"deliveryId":null,
"duration":null,
"faxAttempt":null,
"faxbridgeId":210000000000,
"faxCallerId":"5094570051",
"faxCsid":"mFax",
"faxDetected":true,
"faxECM":256,
"faxNumber":"+18885550000",
"faxProtocol":null,
"faxSpeed":null,
"isArchived":false,
"isFilePurged":false,
"isRead":false,
"messageId":"027012f1-80c9-4be5-b093-1f54783dfa3b",
"messageNumber":null,
"pagesComplete":null,
"pagesCount":3,
"status":"cancelled",
"resolvedDate":null,
"resultCode": null,
"resultInfo": null,
"contacts":[]
"tags":[],
"users":[],
"faxbridge": {
"deviceCode": "210000000000",
"name": "FaxBridge",
"isActive": true
},
}
PATCH Update Fax
/v1/fax/{messageId}
This method will update fax properties, currently only isArchived property available for editing.
AUTHORIZATION API Key
Path Variables
| messageId | String | Required | Message UUID |
Body urlencoded
| isArchived | Boolean | Use this parameter to change archived status of fax. |
Example Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.drenfax.com/v1/fax/d1077489-5ea1-4db1-9760-853f175e8288',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_POSTFIELDS => 'isArchived=false',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic API_KEY',
'Content-Type: application/x-www-form-urlencoded'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
?>
Example Response
{
"accountId":"6c838c7c-cb48-4763-84d6-233b5f8cf782",
"channelType":"web",
"direction":"outbound",
"createdAt":"2018-01-01T12:00:00.000Z",
"deletedAt":null,
"deliveryId":"2180614133420933276",
"duration":86318,
"faxAttempt":1,
"faxbridgeId":210000000000,
"faxCallerId":"5094570051",
"faxCsid":"mFax",
"faxDetected":true,
"faxECM":256,
"faxNumber":"+18885550000",
"faxProtocol":34,
"faxSpeed":33600,
"isArchived":false,
"isFilePurged":false,
"isRead":false,
"messageId":"027012f1-80c9-4be5-b093-1f54783dfa3b",
"messageNumber":"8900000",
"pagesComplete":3,
"pagesCount":3,
"status":"success",
"resolvedDate":"2018-01-01T12:00:00.000Z",
"resultCode": "0",
"resultInfo": "OK",
"contacts":[]
"tags":[],
"users":[],
"faxbridge": {
"deviceCode": "210000000000",
"name": "FaxBridge",
"isActive": true
},
}
GET Download Fax
/v1/fax/{messageId}/download
Method will return PDF download of requested fax.
AUTHORIZATION API Key
Path Variables
| messageId | String | Required | Message UUID |
Example Request
Example Response
OK
GET View Fax History
/v1/fax/history?accountId=&offset=&limit=&direction=&status=
Rate Limit: 8 per minute
Returns detailed fax history as line items. Response is paged.
AUTHORIZATION API Key
PARAMS
| accountId | String | Required | Account ID to get the history for |
| offset | String | Required | Default: 0 | Number of results to skip (used for pagination) |
| limit | String | Required | Default: 10 | Maximum 500 | Number of results to be returned (used for pagination) |
| direction | String | Required | Filters results by direction. Can indicate all (default), inbound or outbound |
| status | String | Required | Filters results by status. Can indicate all (default), failed, success, or processing |
| fromDate | Date | Filters results from starting date by createdAt field. (ex. 2012-04-23) |
| toDate | Date | Filters results up to end date by createdAt field. (ex. 2012-04-23) |
| userId | String | Filters results by User ID |
| query | String | Search by CSID, Caller ID, fax number, message id, subject, recipient name or custom fields. |
| tags | String | Comma separated list of tag IDs (ex. 4c225812-81f1-4827-8194-b0e9475c54e6,7328e171-bc1f-44a6-bc18-df40a4345c9d) |
| isArchived | Boolean | Filters by archived faxes if true |
| include | String[] | Include assigned contacts or tags. Example: tags,contacts |
Example Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.drenfax.com/v1/fax/history?accountId=&offset=&limit=&direction=&status=',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic API_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
?>
Example Response
{
"count": "99",
"rows": [
{
"accountId":"6c838c7c-cb48-4763-84d6-233b5f8cf782",
"channelType":"web",
"direction":"outbound",
"createdAt":"2018-01-01T12:00:00.000Z",
"deletedAt":null,
"deliveryId":"2180614133420933276",
"duration":86318,
"faxAttempt":1,
"faxbridge":null,
"faxbridgeId":null,
"faxCallerId":"5094570051",
"faxCsid":"mFax",
"faxDetected":true,
"faxECM":256,
"faxNumber":"+18885550000",
"faxProtocol":34,
"faxSpeed":33600,
"isArchived":false,
"isFilePurged":false,
"isRead":false,
"messageId":"027012f1-80c9-4be5-b093-1f54783dfa3b",
"messageNumber":"8900000",
"pagesComplete":3,
"pagesCount":3,
"status":"success",
"resolvedDate":"2018-01-01T12:00:00.000Z",
"resultCode": "0",
"resultInfo": "OK",
"contacts":[],
"tags":[],
"users":[],
"cf": {
"customField": "value"
}
},
...
],
"query": {
"limit": 0,
"offset": 20
}
}
GET View Fax Info
/v1/fax/{messageId}/info
Returns fax info.
AUTHORIZATION API Key
Path Variables
| messageId | String | Required | Message UUID |
Example Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.drenfax.com/v1/fax/d1077489-5ea1-4db1-9760-853f175e8288/info',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic API_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
?>
Example Response
{
"accountId": "00000000-0000-0000-0000-000000000000",
"channelType": "web",
"direction": "outbound",
"createdAt": "2018-01-01T12:00:00.000Z",
"deletedAt": null,
"deliveryId": "2180614133420933276",
"duration": 86318,
"faxAttempt": 1,
"faxbridgeId": null,
"faxCallerId": "5094570051",
"faxCsid": "mFax",
"faxDetected": true,
"faxECM": 256,
"faxNumber": "+18885550000",
"faxProtocol": 34,
"faxSpeed": 33600,
"isArchived": false,
"isFilePurged": false,
"messageId": "027012f1-80c9-4be5-b093-1f54783dfa3b",
"messageNumber": "8900000",
"pagesComplete": 3,
"pagesCount": 3,
"status": "success",
"resolvedDate": "2018-01-01T12:00:00.000Z",
"resultCode": "0",
"resultInfo": "OK",
"contacts": [],
"tags": [],
"faxbridge": {
"deviceCode": "210000000000",
"name": "FaxBridge",
"isActive": true
},
"users": [
{
"userId": "7b667809-c88f-4a27-b1fe-2cc932401e15",
"firstName": "John",
"lastName": "Snow",
"email": "john@snow.com"
}
],
"account": {
"uuid": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
"supportCode": "1201800000",
"companyName": "Winterfell"
}
}
DEL Delete Fax
/v1/fax/{messageId}
Removes a fax.
AUTHORIZATION API Key
Path Variables
| messageId | String | Required | Message UUID |
| recipientContacts | String[] | Contact IDs separated by comma |
| attachments | Blob | Required: if coverPage parameter is not added | File(s) you wish to fax. Add files to the stream in order they should be rendered. |
| coverPage | Boolean | Default: false | Indicating true will include system cover page. If coverPage is added, this removes file requirement. |
| coverPageId | Uuid | The uuid of the cover page you want to include. If this param isn’t set but coverPage is true, default cover page for user will be used. |
| tags | String | Comma separated list of tag IDs (ex. 4c225812-81f1-4827-8194-b0e9475c54e6,7328e171-bc1f-44a6-bc18-df40a4345c9d) |
| recipientName | String | 40 characters limit | Will populate in TO field of cover page |
| senderName | String | 40 characters limit | Will populate in FROM field of cover page |
| subject | String | 55 characters limit | Will populate Subject field of cover page |
| callerId | String | 10 characters limit | Phone number. Defaults to user setting if not included in call |
| notes | String | 4000 characters limit | Will populate Notes field of cover page |
| cf | Object | Object with custom fields |
| scheduledDate | String | ISO string indicating the date and time the fax is to be sent |
| webhookId | Uuid | Uuid of the webhook which you want to send for this fax. If specified, will send only the selected webhook, otherwise all fax webhooks will be sent. |
Example Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.drenfax.com/v1/fax/d1077489-5ea1-4db1-9760-853f175e8288',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic API_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
?>
Example Response
OK
GET View Cover Pages
/coverpages
Use this method to fetch all available cover pages.
AUTHORIZATION API Key
Example Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.drenfax.com/coverpages',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic API_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
?>
Example Response
[
{
"uuid": "00000000-0000-0000-0000-000000000000",
"name": "Default",
"template": "Fax Transmission
\n
\n\n\n\nTo: ${tokens.recipientName} \nFrom: ${tokens.senderName} \n \n\nFax: ${tokens.recipientFax} \nFax: ${tokens.callerId} \n \n\nRE: ${tokens.subject} \nDate: ${tokens.date} \n \n\nPages: ${tokens.pages} \n \n\n
\n
\nComments: ${tokens.notes}
",
"accountId": null,
"userId": null,
"isPublic": true,
"previewLink": "https://storage.googleapis.com/drenfax-storage/coverpages/00000000-0000-0000-0000-000000000000.png"
},
...
]
Fax Numbers
GET View Fax Numbers
/v1/numbers
Returns all fax numbers owned by account.
AUTHORIZATION API Key
PARAMS
| accountId | String | Account ID |
| type | String | Possible values: available, assigned, pending |
| offset | Integer | Default: 0 | Number of results to skip (used for pagination) |
| limit | Integer | Default: 30 | Number of results to be returned (used for pagination) |
| query | String | Search query |
Example Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.drenfax.com/v1/numbers',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic API_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
?>
Example Response
{
"rows": [
{
"uuid": "04d651f6-5092-44a1-bbd4-822a0ab43d29",
"number": "3144508380",
"pendingUntil": null,
"ownedBy": "8d3165b3-d23c-4cb4-9bee-b33013c008f7",
"managedBy": "8d3165b3-d23c-4cb4-9bee-b33013c008f7",
"faxbridge": {
"deviceCode": "210000000000",
"name": "FaxBridge",
},
"users": [
{
"userId": "fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de",
"accountId": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
"email": "example@mail.com",
"firstName": "John",
"lastName": "Doe",
"avatarUrl": null
}
],
"owner": {
"uuid": "00000000-0000-0000-0000-000000000000",
"accountNumber": "1200000000",
"accountName": "Night’s Watch",
"accountType": "customer"
},
"manager": {
"uuid": "00000000-0000-0000-0000-000000000000",
"accountNumber": "1200000000",
"accountName": "Night’s Watch",
"accountType": "customer"
}
}
],
"count": 1718,
"limit": 100,
"offset": 0
}
POST Add User to Fax Number
/v1/numbers/{numberId}/user/{userId}
Add users to fax numbers. Only users from account that manages this number can be assigned. Inbound faxes are accessible by the assigned user(s).
AUTHORIZATION API Key
PATH VARIABLES
| numberId | String | Required | Number UUID |
| userId | String | Required | User UUID |
Example Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.drenfax.com/v1/numbers/d1077489-5ea1-4db1-9760-853f175e8288/user/d1077489-5ea1-4db1-9760-853f175e8288',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic API_KEY',
'Content-Type: application/json',
'Accept: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
?>
Example Response
{
"uuid": "7cd0224e-ee05-4f32-9f56-9a4ebf83a38c",
"number": "3122833994",
"pendingUntil": null,
"ownedBy": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
"createdAt": "2017-06-06T11:37:14.000Z",
"users": [
{
"userId": "fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de",
"accountId": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
"email": "example@mail.com",
"firstName": "John",
"lastName": "Doe",
"avatarUrl": null
}
],
"manager": {
"uuid": "00000000-0000-0000-0000-000000000000",
"accountNumber": "1200000000",
"accountName": "Night’s Watch",
"accountType": "customer"
}
}
DEL Remove User from Fax Number
/v1/numbers/{numberId}/user/{userId}
Remove user from fax number.
AUTHORIZATION API Key
PATH VARIABLES
| numberId | String | Required | Number UUID |
| userId | String | Required | User UUID |
Example Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.drenfax.com/v1/numbers/d1077489-5ea1-4db1-9760-853f175e8288/user/d1077489-5ea1-4db1-9760-853f175e8288',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic API_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
?>
Example Response
OK
POST Provision Fax Numbers
/v1/numbers/provision
Provision new fax numbers.
Note: For provision with type ‘order’, numbers in request should have appeared in a number search within the last 24 hours.
Note: Provision is limited to 1000 numbers per API call.
AUTHORIZATION API Key
Body urlencoded
| type | String | Required | Possible Values: order, local, toll-free |
| numbers | String[] | Numbers list in E164 format. Separated by comma. |
| quantity | Integer | Toll-free numbers quantity. If not set - equal to 1. Required for random ‘toll-free’ provision. |
| accountId | Uuid | Subaccount ID |
| storage | String | FTP/SFTP storage credentials in JSON format |
Example Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.drenfax.com/v1/numbers/provision',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'type=order',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic API_KEY',
'Content-Type: application/x-www-form-urlencoded'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
?>
Example Response
[
{
"uuid": "2d65b607-1833-4576-b497-650b56d6346b",
"number": "8440000000",
"pendingUntil": null,
"ownedBy": "f6309861-9ca9-44ea-84ab-a193615e4936",
"managedBy": "f6309861-9ca9-44ea-84ab-a193615e4936",
"createdAt": "2017-06-26T15:35:13.000Z",
"owner": {
"uuid": "00000000-0000-0000-0000-000000000000",
"accountNumber": "1200000000",
"accountName": "Night’s Watch",
"accountType": "customer"
},
"manager": {
"uuid": "00000000-0000-0000-0000-000000000000",
"accountNumber": "1200000000",
"accountName": "Night’s Watch",
"accountType": "customer"
}
}
]
GET Search Available Fax Numbers
/v1/numbers/provision/search
Allows you to search for available toll-free or local numbers. Search by area code/prefix (npa/nxx), city, or zip code. Returns list of available numbers. You must include at least one of the following parameters: npa, city, zipcode.
AUTHORIZATION API Key
PARAMS
| npa | String | 3-digit Numbering Cod |
| nxx | String | Central Office (aka. Exchange) within the NPA |
| state | String | State |
| city | String | City. For clarification, state param recommended for search by city. |
| zipcode | String | ZIP Code |
| limit | Integer | Amount of line items per page that will be returned |
Example Request
<?php
$curl = curl_init()
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.drenfax.com/v1/numbers/provision/search',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic API_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
?>
Example Response
{
"result": [
{
"number_e164": "+17025551234",
"regional_data": {
"country_iso": "US",
"rate_center": "LAS VEGAS",
"state": "NV"
},
"preferable": true,
},
...
],
"limit": 10
}
PATCH Fax Number Settings
/v1/numbers/{numberId}
Storage settings of number.
AUTHORIZATION API Key
PATH VARIABLES
| numberId | String | Required | Number UUID |
Body urlencoded
| storage | String | FTP/SFTP storage credentials in JSON format |
| managedBy | Uuid | Uuid of manager account |
Example Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.drenfax.com/v1/numbers/d1077489-5ea1-4db1-9760-853f175e8288',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic API_KEY',
'Content-Type: application/x-www-form-urlencoded'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
?>
Example Response
{
"uuid": "7cd0224e-ee05-4f32-9f56-9a4ebf83a38c",
"number": "3122833994",
"pendingUntil": null,
"storage": "{\"protocol\":\"ftp\",\"host\":\"example.com\",\"outputDirPath\":\"uploads/\",\"password\":\"password\",\"user\":\"user\",\"port\":21}",
"ownedBy": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
"createdAt": "2017-06-06T11:37:14.000Z",
"users": [
{
"userId": "fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de",
"accountId": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
"email": "example@mail.com",
"firstName": "John",
"lastName": "Doe",
"avatarUrl": null
}
],
"manager": {
"uuid": "00000000-0000-0000-0000-000000000000",
"accountNumber": "1200000000",
"accountName": "Drenfax",
"accountType": "customer"
}
}
DEL Delete Fax Number
/v1/numbers/{numberId}/release
Release fax number by number ID and move it to pending.
AUTHORIZATION API Key
PATH VARIABLES
| numberId | String | Required | Number UUID |
Example Request
Example Response
GET Validate Fax Number
/v1/numbers/validate?number=&country=
Indicates whether a number is valid.
AUTHORIZATION API Key
PARAMS
| number | String | Required | The number you wish to validate |
| country | String | Required | The Alpha-2 country code |
Example Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://app.drenfax.com/v1/numbers/validate?number=example&country=US',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic API_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
?>
Example Response
{
"isValid": false
}