# Send Fax POST https://api.hellosign.com/v3/fax/send Content-Type: application/json Creates and sends a new Fax with the submitted file(s) Reference: https://developer.hellosign.com/api/fax/send ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Send Fax version: endpoint_fax.send paths: /fax/send: post: operationId: send summary: Send Fax description: Creates and sends a new Fax with the submitted file(s) tags: - - subpackage_fax parameters: - name: Authorization in: header description: Basic authentication of the form `Basic `. required: true schema: type: string responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/FaxGetResponse' '400': description: failed_operation content: {} requestBody: content: application/json: schema: $ref: '#/components/schemas/FaxSendRequest' components: schemas: FaxSendRequest: type: object properties: recipient: type: string description: |- Recipient of the fax Can be a phone number in E.164 format or email address sender: type: string description: Fax Send From Sender (used only with fax number) files: type: array items: type: string format: binary description: >- Use `files[]` to indicate the uploaded file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both. file_urls: type: array items: type: string description: >- Use `file_urls[]` to have Dropbox Fax download the file(s) to fax This endpoint requires either **files** or **file_urls[]**, but not both. test_mode: type: boolean default: false description: API Test Mode Setting cover_page_to: type: string description: Fax cover page recipient information cover_page_from: type: string description: Fax cover page sender information cover_page_message: type: string description: Fax Cover Page Message title: type: string description: Fax Title required: - recipient FaxResponseTransmissionStatusCode: type: string enum: - value: success - value: transmitting - value: error_could_not_fax - value: error_unknown - value: error_busy - value: error_no_answer - value: error_disconnected - value: error_bad_destination FaxResponseTransmission: type: object properties: recipient: type: string description: Fax Transmission Recipient status_code: $ref: '#/components/schemas/FaxResponseTransmissionStatusCode' description: Fax Transmission Status Code sent_at: type: integer description: Fax Transmission Sent Timestamp required: - recipient - status_code FaxResponse: type: object properties: fax_id: type: string description: Fax ID title: type: string description: Fax Title original_title: type: string description: Fax Original Title subject: type: - string - 'null' description: Fax Subject message: type: - string - 'null' description: Fax Message metadata: type: object additionalProperties: description: Any type description: Fax Metadata created_at: type: integer description: Fax Created At Timestamp sender: type: string description: Fax Sender Email files_url: type: string description: Fax Files URL final_copy_uri: type: - string - 'null' description: The path where the completed document can be downloaded transmissions: type: array items: $ref: '#/components/schemas/FaxResponseTransmission' description: Fax Transmissions List required: - fax_id - title - original_title - metadata - created_at - sender - files_url - transmissions WarningResponse: type: object properties: warning_msg: type: string description: Warning message warning_name: type: string description: Warning name required: - warning_msg - warning_name FaxGetResponse: type: object properties: fax: $ref: '#/components/schemas/FaxResponse' warnings: type: array items: $ref: '#/components/schemas/WarningResponse' description: A list of warnings. required: - fax ``` ## SDK Code Examples ```php PHP setUsername("YOUR_API_KEY"); $fax_send_request = (new Dropbox\Sign\Model\FaxSendRequest()) ->setRecipient("16690000001") ->setSender("16690000000") ->setTestMode(true) ->setCoverPageTo("Jill Fax") ->setCoverPageFrom("Faxer Faxerson") ->setCoverPageMessage("I'm sending you a fax!") ->setTitle("This is what the fax is about!") ->setFiles([ ]); try { $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxSend( fax_send_request: $fax_send_request, ); print_r($response); } catch (Dropbox\Sign\ApiException $e) { echo "Exception when calling FaxApi#faxSend: {$e->getMessage()}"; } ``` ```csharp C# using System; using System.Collections.Generic; using System.IO; using System.Text.Json; using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; namespace Dropbox.SignSandbox; public class FaxSendExample { public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; var faxSendRequest = new FaxSendRequest( recipient: "16690000001", sender: "16690000000", testMode: true, coverPageTo: "Jill Fax", coverPageFrom: "Faxer Faxerson", coverPageMessage: "I'm sending you a fax!", title: "This is what the fax is about!", files: new List { new FileStream( path: "./example_fax.pdf", mode: FileMode.Open ), } ); try { var response = new FaxApi(config).FaxSend( faxSendRequest: faxSendRequest ); Console.WriteLine(response); } catch (ApiException e) { Console.WriteLine("Exception when calling FaxApi#FaxSend: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } } } ``` ```typescript TypeScript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.FaxApi(); apiCaller.username = "YOUR_API_KEY"; const faxSendRequest: models.FaxSendRequest = { recipient: "16690000001", sender: "16690000000", testMode: true, coverPageTo: "Jill Fax", coverPageFrom: "Faxer Faxerson", coverPageMessage: "I'm sending you a fax!", title: "This is what the fax is about!", files: [ fs.createReadStream("./example_fax.pdf"), ], }; apiCaller.faxSend( faxSendRequest, ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling FaxApi#faxSend:"); console.log(error.body); }); ``` ```java Java package com.dropbox.sign_sandbox; import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; import java.math.BigDecimal; import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; import java.util.Map; public class FaxSendExample { public static void main(String[] args) { var config = Configuration.getDefaultApiClient(); ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); var faxSendRequest = new FaxSendRequest(); faxSendRequest.recipient("16690000001"); faxSendRequest.sender("16690000000"); faxSendRequest.testMode(true); faxSendRequest.coverPageTo("Jill Fax"); faxSendRequest.coverPageFrom("Faxer Faxerson"); faxSendRequest.coverPageMessage("I'm sending you a fax!"); faxSendRequest.title("This is what the fax is about!"); faxSendRequest.files(List.of ( new File("./example_fax.pdf") )); try { var response = new FaxApi(config).faxSend( faxSendRequest ); System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling FaxApi#faxSend"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ```ruby Ruby require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| config.username = "YOUR_API_KEY" end fax_send_request = Dropbox::Sign::FaxSendRequest.new fax_send_request.recipient = "16690000001" fax_send_request.sender = "16690000000" fax_send_request.test_mode = true fax_send_request.cover_page_to = "Jill Fax" fax_send_request.cover_page_from = "Faxer Faxerson" fax_send_request.cover_page_message = "I'm sending you a fax!" fax_send_request.title = "This is what the fax is about!" fax_send_request.files = [ File.new("./example_fax.pdf", "r"), ] begin response = Dropbox::Sign::FaxApi.new.fax_send( fax_send_request, ) p response rescue Dropbox::Sign::ApiError => e puts "Exception when calling FaxApi#fax_send: #{e}" end ``` ```python Python import json from datetime import date, datetime from pprint import pprint from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( username="YOUR_API_KEY", ) with ApiClient(configuration) as api_client: fax_send_request = models.FaxSendRequest( recipient="16690000001", sender="16690000000", test_mode=True, cover_page_to="Jill Fax", cover_page_from="Faxer Faxerson", cover_page_message="I'm sending you a fax!", title="This is what the fax is about!", files=[ open("./example_fax.pdf", "rb").read(), ], ) try: response = api.FaxApi(api_client).fax_send( fax_send_request=fax_send_request, ) pprint(response) except ApiException as e: print("Exception when calling FaxApi#fax_send: %s\n" % e) ``` ```go Fax Response package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.hellosign.com/v3/fax/send" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Basic :") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```swift Fax Response import Foundation let headers = [ "Authorization": "Basic :", "Content-Type": "application/json" ] let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellosign.com/v3/fax/send")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ```php PHP setUsername("YOUR_API_KEY"); $fax_send_request = (new Dropbox\Sign\Model\FaxSendRequest()) ->setRecipient("16690000001") ->setSender("16690000000") ->setTestMode(true) ->setCoverPageTo("Jill Fax") ->setCoverPageFrom("Faxer Faxerson") ->setCoverPageMessage("I'm sending you a fax!") ->setTitle("This is what the fax is about!") ->setFiles([ ]); try { $response = (new Dropbox\Sign\Api\FaxApi(config: $config))->faxSend( fax_send_request: $fax_send_request, ); print_r($response); } catch (Dropbox\Sign\ApiException $e) { echo "Exception when calling FaxApi#faxSend: {$e->getMessage()}"; } ``` ```csharp C# using System; using System.Collections.Generic; using System.IO; using System.Text.Json; using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; namespace Dropbox.SignSandbox; public class FaxSendExample { public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; var faxSendRequest = new FaxSendRequest( recipient: "16690000001", sender: "16690000000", testMode: true, coverPageTo: "Jill Fax", coverPageFrom: "Faxer Faxerson", coverPageMessage: "I'm sending you a fax!", title: "This is what the fax is about!", files: new List { new FileStream( path: "./example_fax.pdf", mode: FileMode.Open ), } ); try { var response = new FaxApi(config).FaxSend( faxSendRequest: faxSendRequest ); Console.WriteLine(response); } catch (ApiException e) { Console.WriteLine("Exception when calling FaxApi#FaxSend: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } } } ``` ```typescript TypeScript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.FaxApi(); apiCaller.username = "YOUR_API_KEY"; const faxSendRequest: models.FaxSendRequest = { recipient: "16690000001", sender: "16690000000", testMode: true, coverPageTo: "Jill Fax", coverPageFrom: "Faxer Faxerson", coverPageMessage: "I'm sending you a fax!", title: "This is what the fax is about!", files: [ fs.createReadStream("./example_fax.pdf"), ], }; apiCaller.faxSend( faxSendRequest, ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling FaxApi#faxSend:"); console.log(error.body); }); ``` ```java Java package com.dropbox.sign_sandbox; import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; import java.math.BigDecimal; import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; import java.util.Map; public class FaxSendExample { public static void main(String[] args) { var config = Configuration.getDefaultApiClient(); ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); var faxSendRequest = new FaxSendRequest(); faxSendRequest.recipient("16690000001"); faxSendRequest.sender("16690000000"); faxSendRequest.testMode(true); faxSendRequest.coverPageTo("Jill Fax"); faxSendRequest.coverPageFrom("Faxer Faxerson"); faxSendRequest.coverPageMessage("I'm sending you a fax!"); faxSendRequest.title("This is what the fax is about!"); faxSendRequest.files(List.of ( new File("./example_fax.pdf") )); try { var response = new FaxApi(config).faxSend( faxSendRequest ); System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling FaxApi#faxSend"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ```ruby Ruby require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| config.username = "YOUR_API_KEY" end fax_send_request = Dropbox::Sign::FaxSendRequest.new fax_send_request.recipient = "16690000001" fax_send_request.sender = "16690000000" fax_send_request.test_mode = true fax_send_request.cover_page_to = "Jill Fax" fax_send_request.cover_page_from = "Faxer Faxerson" fax_send_request.cover_page_message = "I'm sending you a fax!" fax_send_request.title = "This is what the fax is about!" fax_send_request.files = [ File.new("./example_fax.pdf", "r"), ] begin response = Dropbox::Sign::FaxApi.new.fax_send( fax_send_request, ) p response rescue Dropbox::Sign::ApiError => e puts "Exception when calling FaxApi#fax_send: #{e}" end ``` ```python Python import json from datetime import date, datetime from pprint import pprint from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( username="YOUR_API_KEY", ) with ApiClient(configuration) as api_client: fax_send_request = models.FaxSendRequest( recipient="16690000001", sender="16690000000", test_mode=True, cover_page_to="Jill Fax", cover_page_from="Faxer Faxerson", cover_page_message="I'm sending you a fax!", title="This is what the fax is about!", files=[ open("./example_fax.pdf", "rb").read(), ], ) try: response = api.FaxApi(api_client).fax_send( fax_send_request=fax_send_request, ) pprint(response) except ApiException as e: print("Exception when calling FaxApi#fax_send: %s\n" % e) ``` ```go Default Example package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.hellosign.com/v3/fax/send" payload := strings.NewReader("{\n \"recipient\": \"16690000001\",\n \"sender\": \"16690000000\",\n \"file_urls\": [\n \"https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1\"\n ],\n \"test_mode\": false,\n \"cover_page_to\": \"Jill Fax\",\n \"cover_page_from\": \"Faxer Faxerson\",\n \"cover_page_message\": \"I'm sending you a fax!\",\n \"title\": \"This is what the fax is about!\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Basic :") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```swift Default Example import Foundation let headers = [ "Authorization": "Basic :", "Content-Type": "application/json" ] let parameters = [ "recipient": "16690000001", "sender": "16690000000", "file_urls": ["https://www.dropbox.com/s/ad9qnhbrjjn64tu/mutual-NDA-example.pdf?dl=1"], "test_mode": false, "cover_page_to": "Jill Fax", "cover_page_from": "Faxer Faxerson", "cover_page_message": "I'm sending you a fax!", "title": "This is what the fax is about!" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellosign.com/v3/fax/send")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```