---title: excerpt: ---import Tabs from @theme/Tabs;import TabItem from @theme/TabItem;The verb tells SignalWire to receive an incoming fax, which results in the creation of a new Fax instance resource.Faxes remain stored indefinitely. To delete a fax, use the appropriate API call from the [Compatibility API](pathname:///compatibility-api/rest/delete-a-fax).## Verb Attributes| Attribute | || ---------------------------------------------------------: | --------------------------------------------------------------------------------------------------------------------------------------------------- || action optional | The URL to request when a fax has failed or has been received. || method optional | The method attribute specifies whether the request to action is a GET or a POST. Valid values are GET or POST. Default value is POST. || mediaType optional | The type of media used to store fax media. Valid values are application/pdf or image/tiff. Default is application/pdf. || pageSize optional | The size to interpret incoming pages as. Valid values are letter, legal, or a4. Default is letter. |## Action CallbackIf the verb attribute action is specified, the action callback will include the [Standard Fax Request Parameters](./index.mdx#request-parameters) plus the following optional parameters:| Parameter | || ---------------------------------------------------------------: | --------------------------------------------------------------------------------------------------- || RemoteStationId optional | The transmitting subscriber identification (TSID) reported by the fax machine that sent in the fax. || FaxStatus optional | The status of the fax. || NumPages optional | The number of pages received from a successful fax. || MediaUrl optional | The media URL to request to retrieve incoming media. || ErrorCode optional | The error code provides more information on a failed fax. || ErrorMessage optional | The message explaining the reason for fax failure. |## Examples### Receive a Faxxml javascriptconst { RestClient } = require(@signalwire/compatibility-api);const response = new RestClient.LaML.FaxResponse();response.receive({ action: /fax/received });console.log(response.toString());phpreceive(array( action => /fax/received )); echo $response;?>csharpusing Twilio.TwiML;using Twilio.TwiML.Fax;using System;class Example{ static void Main() { var response = new FaxResponse(); response.Receive(action: /fax/received)); Console.WriteLine(response.ToString());; }}pythonfrom signalwire.fax_response import FaxResponse, Receiveresponse = FaxResponse()response.receive(action=/fax/received)print(response)rubyrequire signalwire/sdkresponse = Signalwire::Sdk::FaxResponse.new do |response| response.receive(action: /fax/received)endputs response.to_sSignalWire will receive the incoming fax and provide a URL endpoint.### Store Fax Imagexml javascriptconst { RestClient } = require(@signalwire/compatibility-api);const response = new RestClient.LaML.FaxResponse();response.receive({ mediaType: image/tiff });console.log(response.toString());phpreceive(array( mediaType => image/tiff )); echo $response;?>csharpusing Twilio.TwiML;using Twilio.TwiML.Fax;using System;class Example{ static void Main() { var response = new FaxResponse(); response.Receive(mediaType: image/tiff)); Console.WriteLine(response.ToString());; }}pythonfrom signalwire.fax_response import FaxResponse, Receiveresponse = FaxResponse()response.receive(media_type=image/tiff)print(response)rubyrequire signalwire/sdkresponse = Signalwire::Sdk::FaxResponse.new do |response| response.receive(media_type: image/tiff)endputs response.to_sThis example shows that the media from the incoming fax will be stored on SignalWires server in TIFF format.