Update a Fax
Use this endpoint for the Fax method to update the Status of a Fax.
Parameters
Parameter | Description |
---|---|
Status Optional | Update the status of the fax. Only possible value is canceled . Updating to canceled may fail if the status has already begun transmission. |
Request
In this example request, we update the Status of a Fax to Canceled
.
- cURL
- Node.js
- C#
- Python
- Ruby
curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Faxes/{FaxSid}.json \
-X POST \
--data-urlencode "Status=canceled" \
-u "YourProjectID:YourAuthToken"
const { RestClient } = require('@signalwire/compatibility-api')
const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
client.fax.faxes('FaxSid')
.update({status: 'canceled'})
.then(fax => console.log(fax.to))
.done();
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 fax = FaxResource.Update(
status: FaxResource.UpdateStatusEnum.Canceled,
pathSid: "FaxSid"
);
Console.WriteLine(fax.To);
}
}
from signalwire.rest import Client as signalwire_client
client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
fax = client.fax.faxes('FaxSid') \
.update(status='canceled')
print(fax.to)
require 'signalwire/sdk'
@client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
fax = @client.fax.faxes('FaxSid')
.update(status: 'canceled')
puts fax.to
Responses
200 OK
{
"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": "canceled",
"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"
}