Send a fax
const url = 'https://api.siprtc.io/v1/Accounts/AC000000000000000000/Faxes';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"email":"billing@example.com","from":"+15555550100","max_retry":3,"media_sid":"1042","media_url":"AC000000000000000000/11-2026/contract.pdf","quality":"standard","status_callback":"https://example.com/fax/status","status_callback_method":"GET","title":"Signed contract","to":"+15555550123"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.siprtc.io/v1/Accounts/AC000000000000000000/Faxes \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "email": "billing@example.com", "from": "+15555550100", "max_retry": 3, "media_sid": "1042", "media_url": "AC000000000000000000/11-2026/contract.pdf", "quality": "standard", "status_callback": "https://example.com/fax/status", "status_callback_method": "GET", "title": "Signed contract", "to": "+15555550123" }'Queues an outbound fax of a document you uploaded earlier. Name the document with media_sid (the id from Upload a media file: your own media, or global media shared by your parent account) or, when media_sid is empty, with media_url: the storage key of a PDF inside your account’s media folder, which is converted and stored as a new media item first. to and from are required; from is sent as the fax identity and should be a fax-capable number on your account.
The fax is stored with status queued and handed to a queue. A worker then places an outbound call from from to to that transmits the document’s fax (TIFF) rendering. When a transmission succeeds the fax becomes delivered; a failed attempt is retried up to max_retry times (default 5), and after the last failure the fax becomes failed with the reason in notes. If to is a number the platform delivers to a fax-to-email inbox, the fax is handed over by email instead of being dialled. The transmission call is rated and billed like any other outbound call on your account; the fax record’s price is not filled in.
If both status_callback and status_callback_method are set, a POST with the fax record as JSON is sent to status_callback when the fax is delivered or finally fails (the method value is not used for that request); the two values are also attached to the transmission call. Follow progress with List faxes.
The response contains only the new fax sid and status = success, meaning accepted, not delivered. Every failure (missing to/from, unknown or foreign media_sid, a media_url outside your folder or not a PDF, invalid status_callback, queue errors) is answered with 400.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Your account’s Auth ID (20 upper-case letters and digits).
Example
AC000000000000000000Request Bodyrequired
Section titled “ Request Bodyrequired ”Fax to send.
object
Email address stored with the fax (not used for delivery).
Example
billing@example.comRequired. Sending number, used as the fax identity (TSID); a fax-capable number on your account, E.164.
Example
+15555550100Retries after a failed attempt; 0 or omitted means 5.
Example
3Id of the media item to fax (the id returned by Upload a media file). Your own media or global media of your parent account.
Example
1042Storage key of a PDF inside your account’s media folder (<auth_id>/…). Used only when media_sid is empty: the PDF is converted and stored as a new media item first.
Example
AC000000000000000000/11-2026/contract.pdfQuality label stored with the fax (default “standard”); it does not change the transmitted resolution.
Example
standardURL that receives a POST with the fax record (JSON) when the fax is delivered or finally fails. Used only when status_callback_method is also set. At most 2048 characters.
Example
https://example.com/fax/statusGET or POST (any case). Must be set for status_callback to be used; the notification itself is always a POST.
Example
POSTFree-text title stored with the fax; searchable in List faxes.
Example
Signed contractRequired. Destination fax number, E.164.
Example
+15555550123Responses
Section titled “ Responses ”Fax accepted and queued.
object
The fax’s identifier: “FX” followed by 32 upper-case hexadecimal characters.
Send a fax: always “success” (the fax was accepted and queued). Update a fax: the fax’s current status.
Example
{ "sid": "FX0123456789ABCDEF0123456789ABCDEF", "status": "success"}Invalid request or the fax could not be queued; message says why (e.g. ‘failed to fetch media by MediaSid’, ‘required fax fields are missing please check : to, from or media url’).
object
Human-readable reason.
Always “failed”.
Example
{ "message": "fax not found", "status": "failed"}Missing or wrong credentials, or credentials that may not act for {auth_id}. Body: ‘Authentication failed’.
Example generated
exampleUnexpected server error.
object
Human-readable reason.
Example
{ "message": "Request Entity Too Large"}