import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const faxes = await client.faxes.list();
console.log(faxes.data);{
"data": [
{
"record_type": "fax",
"id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
"connection_id": "c-1",
"direction": "outbound",
"from": "+123",
"to": "+456",
"media_url": "http://www.example.com/fax.pdf",
"store_media": true,
"stored_media_url": "https://s3.amazonaws.com/faxes-dev/user-1/cf4a6b52-bf8e-4945-9f49-611d0d2b083b.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxxxxx%2F20200505%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200505T095917Z&X-Amz-Expires=7200&X-Amz-SignedHeaders=host&X-Amz-Signature=fac2af40464fcc77673ad762db86e34f9c1b91a82699b5578c5327f53874df51",
"preview_url": "https://s3.amazonaws.com/faxes-dev/user-1/cf4a6b52-bf8e-4945-9f49-611d0d2b083b_preview.tiff?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxxxxx%2F20200505%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200505T095917Z&X-Amz-Expires=7200&X-Amz-SignedHeaders=host&X-Amz-Signature=fac2af40464fcc77673ad762db86e34f9c1b91a82699b5578c5327f53874df51",
"quality": "high",
"webhook_url": "http://www.example.com/webhooks",
"webhook_failover_url": "",
"status": "queued",
"client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d",
"created_at": "2020-05-05T09:59:12",
"updated_at": "2020-05-05T09:59:12"
}
],
"meta": {
"page_number": 2,
"page_size": 1,
"total_pages": 3,
"total_results": 3
}
}import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const faxes = await client.faxes.list();
console.log(faxes.data);{
"data": [
{
"record_type": "fax",
"id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
"connection_id": "c-1",
"direction": "outbound",
"from": "+123",
"to": "+456",
"media_url": "http://www.example.com/fax.pdf",
"store_media": true,
"stored_media_url": "https://s3.amazonaws.com/faxes-dev/user-1/cf4a6b52-bf8e-4945-9f49-611d0d2b083b.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxxxxx%2F20200505%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200505T095917Z&X-Amz-Expires=7200&X-Amz-SignedHeaders=host&X-Amz-Signature=fac2af40464fcc77673ad762db86e34f9c1b91a82699b5578c5327f53874df51",
"preview_url": "https://s3.amazonaws.com/faxes-dev/user-1/cf4a6b52-bf8e-4945-9f49-611d0d2b083b_preview.tiff?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxxxxx%2F20200505%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200505T095917Z&X-Amz-Expires=7200&X-Amz-SignedHeaders=host&X-Amz-Signature=fac2af40464fcc77673ad762db86e34f9c1b91a82699b5578c5327f53874df51",
"quality": "high",
"webhook_url": "http://www.example.com/webhooks",
"webhook_failover_url": "",
"status": "queued",
"client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d",
"created_at": "2020-05-05T09:59:12",
"updated_at": "2020-05-05T09:59:12"
}
],
"meta": {
"page_number": 2,
"page_size": 1,
"total_pages": 3,
"total_results": 3
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Consolidated filter parameter (deepObject style). Originally: filter[created_at][gte], filter[created_at][gt], filter[created_at][lte], filter[created_at][lt], filter[direction][eq], filter[from][eq], filter[to][eq]
Show child attributes
Date range filtering operations for fax creation timestamp
Show child attributes
ISO 8601 date time for filtering faxes created after or on that date
"2020-02-02T22:25:27.521992Z"
ISO 8601 date time for filtering faxes created after that date
"2020-02-02T22:25:27.521992Z"
ISO 8601 formatted date time for filtering faxes created on or before that date
"2020-02-02T22:25:27.521992Z"
ISO 8601 formatted date time for filtering faxes created before that date
"2020-02-02T22:25:27.521992Z"
List faxes response
Show child attributes
Identifies the type of the resource.
fax "fax"
Identifies the type of resource.
"0ccc7b54-4df3-4bca-a65a-3da1ecc777f0"
The ID of the connection used to send the fax.
"234423"
The direction of the fax.
inbound, outbound "outbound"
The URL (or list of URLs) to the PDF used for the fax's media. media_url and media_name/contents can't be submitted together.
"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
The media_name used for the fax's media. Must point to a file previously uploaded to api.telnyx.com/v2/media by the same user/organization. media_name and media_url/contents can't be submitted together.
"my_media_uploaded_to_media_storage_api"
The phone number, in E.164 format, the fax will be sent to or SIP URI
"+13127367276"
The phone number, in E.164 format, the fax will be sent from.
"+13125790015"
The string used as the caller id name (SIP From Display Name) presented to the destination (to number).
"Company Name"
The quality of the fax. The ultra settings provides the highest quality available, but also present longer fax processing times. ultra_light is best suited for images, wihle ultra_dark is best suited for text.
normal, high, very_high, ultra_light, ultra_dark "high"
Status of the fax
queued, media.processed, originated, sending, delivered, failed, initiated, receiving, media.processing, received "queued"
URL that will receive fax webhooks
Optional failover URL that will receive fax webhooks if webhook_url doesn't return a 2XX response
Should fax media be stored on temporary URL. It does not support media_name.
If store_media was set to true, this is a link to temporary location. Link expires after 10 minutes.
If store_preview was set to true, this is a link to temporary location. Link expires after 10 minutes.
State received from a command.
"aGF2ZSBhIG5pY2UgZGF5ID1d"
ISO 8601 timestamp when resource was created
ISO 8601 timestamp when resource was updated
{
"page_number": 2,
"page_size": 1,
"total_pages": 3,
"total_results": 3
}Was this page helpful?