Update a fax
const url = 'https://api.siprtc.io/v1/Accounts/AC000000000000000000/Faxes/FX0123456789ABCDEF0123456789ABCDEF';const options = { method: 'PUT', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"from":"+15555550100","media_url":"","quality":"standard","status_callback":"https://example.com/fax/status","status_callback_method":"GET","to":"+15555550124"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.siprtc.io/v1/Accounts/AC000000000000000000/Faxes/FX0123456789ABCDEF0123456789ABCDEF \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "from": "+15555550100", "media_url": "", "quality": "standard", "status_callback": "https://example.com/fax/status", "status_callback_method": "GET", "to": "+15555550124" }'Changes stored fields of one of your faxes that has not been deleted: from, to, media_url, status_callback and quality. Fields left out or empty keep their value; other fields are ignored. The update does not send, re-queue or cancel the fax and does not change the document that is transmitted; a retry that runs after the update dials the updated to and from.
Returns the fax sid and its current status. A fax of another account, or a deleted one, is 404.
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
AC000000000000000000Fax sid (FX followed by 32 hexadecimal characters).
Example
FX0123456789ABCDEF0123456789ABCDEFRequest Bodyrequired
Section titled “ Request Bodyrequired ”Fields to change.
object
New sending number.
Example
+15555550100New stored media_url value (stored as given; it does not change the document that is transmitted).
Example
New quality label.
Example
fineNew status callback URL (http or https, at most 2048 characters).
Example
https://example.com/fax/statusAccepted (GET or POST, any case) but not stored by an update.
Example
POSTNew destination number.
Example
+15555550124Responses
Section titled “ Responses ”Updated.
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"}Malformed JSON, an invalid status_callback/status_callback_method (message like ’validation failed on field ‘status_callback’, condition: http_url, actual: …’), or a storage error.
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
exampleNo such fax on this account (message ‘fax not found’).
object
Human-readable reason.
Always “failed”.
Example
{ "message": "fax not found", "status": "failed"}Unexpected server error.
object
Human-readable reason.
Example
{ "message": "Request Entity Too Large"}