Skip to main content

Send a Fax

Use this endpoint for the Fax method to send a Fax.

Parameters

ParameterDescription
MediaUrl RequiredThe URL to the PDF used for the fax's media.
To RequiredThe phone number, in E.164 format, the fax will be sent to.
From requiredThe phone number, in E.164 format, the fax will be sent from.
Quality OptionalThe quality of the fax. Default is fine.
StatusCallback OptionalThe URL to send a POST request when the status of a fax changes. See StatusCallback Parameters for parameters.
Ttl OptionalThe number of minutes, after a fax was initiated, SignalWire should wait before attempting to send a fax.

Request

curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Faxes.json \
-X POST \
--data-urlencode "From=+13103383454" \
--data-urlencode "To=+13104456789" \
--data-urlencode "MediaUrl=https://example.com/fax.pdf" \
-u "YourProjectID:YourAuthToken"

Responses

200 OK

{
"account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
"api_version": "v1",
"date_created": "2018-11-26T20:00:00Z",
"date_updated": "2018-11-27T20:00:00Z",
"direction": "outbound",
"from": "+13103383454",
"media_url": "https://example.com/fax.pdf",
"media_sid": "b3877c40-da60-4998-90ad-b792e98472me",
"num_pages": null,
"price": null,
"price_unit": null,
"quality": null,
"sid": "b3877c40-da60-4998-90ad-b792e98472fx",
"status": "canceled",
"to": "+13104456789",
"duration": null,
"links": {
"media": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes/b3877c40-da60-4998-90ad-b792e98472fx/Media"
},
"url": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes/b3877c40-da60-4998-90ad-b792e98472fx"
}

StatusCallback Parameters

The StatusCallback request contains the following parameters:

ParameterDescription
RemoteStationId OptionalThe transmitting subscriber identification (TSID) reported by the fax machine that sent in the fax.
FaxStatus OptionalThe status of the fax.
OriginalMediaUrl OptionalThe original URL passed when a fax is sent.
NumPages OptionalThe number of pages received from a successful fax.
MediaSid OptionalThe SID that uniquely identifies the fax media.
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.