<Receive>

The <Receive> 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.

Verb Attributes

Attribute
action optionalThe URL to request when a fax has failed or has been received.
method optionalThe 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 optionalThe type of media used to store fax media. Valid values are application/pdf or image/tiff. Default is application/pdf.
pageSize optionalThe size to interpret incoming pages as. Valid values are letter, legal, or a4. Default is letter.

Action Callback

If the verb attribute action is specified, the action callback will include the Standard Fax Request Parameters plus the following optional parameters:

Parameter
RemoteStationId optionalThe transmitting subscriber identification (TSID) reported by the fax machine that sent in the fax.
FaxStatus optionalThe status of the fax.
NumPages optionalThe number of pages received from a successful fax.
MediaUrl optionalThe media URL to request to retrieve incoming media.
ErrorCode optionalThe error code provides more information on a failed fax.
ErrorMessage optionalThe message explaining the reason for fax failure.

Examples

Receive a Fax

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Receive action="/fax/received"/>
</Response>
const { RestClient } = require('@signalwire/node')
const response = new RestClient.LaML.FaxResponse()

response.receive({ action: "/fax/received" })
console.log(response.toString())
<?php
  use SignalWire\LaML;
  $response = new LaML;

  $response->receive(array( 'action' => '/fax/received' ));
  echo $response;
?>
using 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());;
    }
}
from signalwire.fax_response import FaxResponse, Receive

response = FaxResponse()
response.receive(action="/fax/received")

print(response)
require 'signalwire/sdk'

response = Signalwire::Sdk::FaxResponse.new do |response|
  response.receive(action: "/fax/received")
end

puts response.to_s

SignalWire will receive the incoming fax and provide a URL endpoint.

Store Fax Image

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Receive mediaType="image/tiff"></Receive>
</Response>
const { RestClient } = require('@signalwire/node')
const response = new RestClient.LaML.FaxResponse()

response.receive({ mediaType: "image/tiff" })
console.log(response.toString())
<?php
  use SignalWire\LaML;
  $response = new LaML;

  $response->receive(array( 'mediaType' => 'image/tiff' ));
  echo $response;
?>
using 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());;
    }
}
from signalwire.fax_response import FaxResponse, Receive

response = FaxResponse()
response.receive(media_type="image/tiff")

print(response)
require 'signalwire/sdk'

response = Signalwire::Sdk::FaxResponse.new do |response|
  response.receive(media_type: "image/tiff")
end

puts response.to_s

This example shows that the media from the incoming fax will be stored on SignalWire's server in TIFF format.