List All Faxes
Use this endpoint for the Fax method to list all faxes on your SignalWire account.
Parameters
Parameter | Description |
---|---|
date_created_after Optional | Filter the returned list of faxes to only those that were created after the specified date. |
date_created_on_or_before Optional | Filter the returned list of faxes to only those that were created on or before the specified date. |
from Optional | Filter the returned list of faxes to only those that were sent from the specified phone number. |
to Optional | Filter the returned list of faxes to only those that were sent to the specified phone number. |
Request
- cURL
- Node.js
- C#
- Python
- Ruby
curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Faxes.json \
-X GET \
-u "YourProjectID:YourAuthToken"
const { RestClient } = require('@signalwire/compatibility-api')
const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
client.fax.faxes.each(faxes => console.log(faxes.sid));
using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Fax.V1;
class Program
{
static void Main(string[] args)
{
TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "{SPACE}.signalwire.com" });
var faxes = FaxResource.Read();
foreach(var record in faxes)
{
Console.WriteLine(record.Sid);
}
}
}
from signalwire.rest import Client as signalwire_client
client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
faxes = client.fax.faxes.list()
for record in faxes:
print(record.sid)
require 'signalwire/sdk'
@client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
faxes = @client.fax.faxes.list
faxes.each do |record|
puts record.sid
end
Responses
200 OK
{
"faxes": [
{
"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": "queued",
"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"
}
],
"meta": {
"first_page_url": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes?PageSize=50&Page=0",
"key": "faxes",
"next_page_url": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes?PageSize=50&Page=1",
"page": 0,
"page_size": 50,
"previous_page_url": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes?PageSize=50&Page=0",
"url": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes?PageSize=50&Page=0"
}
}