Programmable
HIPAA
Fax API
Blazing-fast cloud fax with 99.99% uptime
Pricing from $0.01/page with no commitment
Built for effortless developer integration
curl https://api.ifaxapp.com/v1/customer/fax-send \ -H 'accessToken: YOUR_API_KEY' \ -d '{ "faxNumber": "12345678901", "faxData": [ { "fileName": "test.pdf", "fileUrl": "file:///path/to/your/file.pdf" } ] }'
require 'rest-client' require 'json' def create_fax begin url = 'https://api.ifaxapp.com/v1/customer/fax-send' data = { faxNumber: '+12345678910', faxData: [{ fileName: 'abc.pdf', fileUrl: 'http://sample.url/path/to/file' },{ fileName: 'xyz.pdf', fileUrl: 'http://sample.url/path/to/file' }] } headers = { ''Content-Type' => ''application/json', ''Accept' => ''application/json', ''accessToken' => ''YOUR_API_KEY' } response = RestClient.post(url, data.to_json, headers) puts "Response Code: #{response.code}" puts "Response Body: #{response.body}" return response.body rescue RestClient::ExceptionWithResponse => e return { error: e.response.body } end end create_fax
const axios = const require("axios"); exports.createFax = async ()= > { try { data = { faxNumebr: "+12345679801", faxData: [{ fileName: "abc.pdf", fileUrl: "http://sample.url/path/to/file" }, { fileName: "xyz.pdf", fileUrl: "http://sample.url/path/to/file" }] } let result = await axios.post( `https://api.ifaxapp.com/v1/customer/fax-send`, data, { headers: { "Content-Type": "application/json", "Accept": "application/json", "AccessToken": "YOUR_API_KEY" }, }) return result } catch (error) { return { error } } }
import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; import org.json.JSONArray; import org.json.JSONObject; public class FaxSender { public static void createFax() { try { String url = "https://api.ifaxapp.com/v1/customer/fax-send"; URL obj = new URL(url); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); // Set request method and headers con.setRequestMethod("POST"); con.setRequestProperty("Content-Type", "application/json"); con.setRequestProperty("Accept", "application/json"); con.setRequestProperty("accessToken", "YOUR_API_KEY"); con.setDoOutput(true); // Prepare JSON data JSONObject json = new JSONObject(); json.put("faxNumber", "+12345678910"); JSONArray faxData = new JSONArray(); faxData.put(new JSONObject() .put("fileName", "abc.pdf") .put("fileUrl", "http://sample.url/path/to/file")); faxData.put(new JSONObject() .put("fileName", "xyz.pdf") .put("fileUrl", "http://sample.url/path/to/file")); json.put("faxData", faxData); // Write data to request body try (OutputStream os = con.getOutputStream()) { os.write(json.toString().getBytes("UTF-8")); os.flush(); } // Get response int responseCode = con.getResponseCode(); System.out.println("Response Code: " + responseCode); try (java.util.Scanner scanner = new java.util.Scanner(con.getInputStream())) { String responseBody = scanner.useDelimiter("\\A").next(); System.out.println("Response Body: " + responseBody); } } catch (Exception e) { e.printStackTrace(); } } public static void main(String[] args) { createFax(); } }
function createFax() { try { $url = 'https://api.ifaxapp.com/v1/customer/fax-send'; $data = [ 'faxNumber' => '+12345678910', 'faxData' => [ [ 'fileName' => 'abc.pdf', 'fileUrl' => 'http://sample.url/path/to/file' ], [ 'fileName' => 'xyz.pdf', 'fileUrl' => 'http://sample.url/path/to/file' ] ] ]; $headers = [ 'Content-Type: application/json', 'Accept: application/json', 'accessToken: YOUR_API_KEY' ]; $ch = curl_init($url); // Set cURL options curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { throw new Exception('Request Error: ' . curl_error($ch)); } $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo "Response Code: $httpCode\n"; echo "Response Body: $response\n"; return $response; } catch (Exception $e) { return json_encode(['error' => $e->getMessage()]); } } createFax();
import requests import json def create_fax(): try: url = 'https://api.ifaxapp.com/v1/customer/fax-send' data = { "faxNumber": "+12345678910", "faxData": [ { "fileName": "abc.pdf", "fileUrl": "http://sample.url/path/to/file" }, { "fileName": "xyz.pdf", "fileUrl": "http://sample.url/path/to/file" } ] } headers = { "Content-Type": "application/json", "Accept": "application/json", "accessToken": "YOUR_API_KEY" } # Make the POST request response = requests.post(url, data=json.dumps(data), headers=headers ) # Print response details print("Response Code:", response.status_code) print("Response Body:", response.text) return response.json() except requests.exceptions.RequestException as e: print(f"Error: {e}") return {"error": str(e)} # Call the function create_fax()