Menu

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Fax Media Resource

The Fax Media resource gives you more information about the media attached to an individual Fax instance. It is a subresource of each Fax instance. If you've used our Messaging Media API, this should look very familiar to you.

Fax Media Instance Resource

This resource represents the media that was sent or received as part of a fax transmission.

Resource URL

https://fax.twilio.com/v1/Faxes/{FaxSid}/Media/{MediaSid}

where {FaxSid} and {MediaSid} are the 34-character unique IDs associated with the Fax and Fax Media, respectively.

Resource Properties

A Fax Media instance is represented by the following properties:

Names in PHP format
sid
sid<ME> Not PII

A 34 character string that uniquely identifies this fax media.

accountSid
sid<AC> Not PII

The unique SID identifier of the Account.

faxSid
sid<FX> Not PII

The unique SID identifier of the fax for which this media is associated.

contentType
string Not PII

The content type of the stored fax media (example: application/pdf).

dateCreated
date_time<iso8601> Not PII

The date that this fax media was created, given in ISO 8601 format.

dateUpdated
date_time<iso8601> Not PII

The date that this fax media was updated, given in ISO 8601 format.

url
url Not PII

The URL of this resource.

HTTP GET

Retrieves a single Fax Media instance.

The Accept header must be used to choose which representation of the media is desired:

  • If application/json is supplied, the above instance properties will be returned as a JSON object.
  • If */* is supplied, or no Accept header is present, the media itself will be returned in its native image format (usually application/pdf). (Note that this feature is not yet implemented, but is noted here so library implementations can be forward-compatible.)

If requesting fax media from a web application, you must specify a User-Agent header in your request to Twilio.

Return Values

Returns 200 with a single Fax Media instance resource if the MediaSid for the specified FaxSid was found.

Returns 404 if the MediaSid was not found.

HTTP POST

Not supported.

HTTP PUT

Not supported.

HTTP DELETE

Deletes the Fax Media instance, including both the metadata and associated media file. Note that this action cannot be undone, so it should be taken with care.

Return Values

Returns 204 if the Fax Media instance was successfully deleted, had been deleted previously, or was not found.

Fax Media List Resource

This resource lists all media that was sent or received as part of a fax transmission.

Resource URL

https://fax.twilio.com/v1/Faxes/{FaxSid}/Media

where {FaxSid} is the 34-character unique ID associated with the Fax and Fax Media, respectively.

HTTP GET

Lists Fax Media instances for the given Fax instance.

Return Values

Returns 200 with a list resource (under the key fax_media) with standard Twilio paging information (the list may be empty if the Fax instance has no stored media associated with it).

HTTP POST

Not supported.

HTTP PUT

Not supported.

HTTP DELETE

Not supported.

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.