Navbar
  • Guides
  • REST APIs
  • SDKs Reference
  • Compatibility API
  • Log In
  • Sign Up
  • Compatibility XML Specification
  • Compatibility REST API
  • API Reference
  • Compatibility REST API

    Overview

    The SignalWire Compatibility REST API is a comprehensive REST API that enables easy management of all aspects of the SignalWire Compatibility functionality including calls, conferences, messaging and account maintenance.

    This API may look similar to other, existing APIs you've used before -- on purpose! The Compatibility REST API is designed to make migrating your existing phone or messaging application easy and quick, while giving you access to our next generation APIs and endpoints to help you take your application to the next level.

    Introduction

    SignalWire's REST API allows you to manage and modify calls and messages made to or from your SignalWire phone numbers. You also have the ability to retrieve and update your account information, retrieve your entire history of calls, messages, transcriptions, media and more.

    This can all be achieved by sending HTTP requests to the SignalWire REST API.

    Base URL

    Each space on SignalWire gets its own subdomain and each space will have its own URLs for accessing the REST API.

    All calls in the provided examples use the following as the base URL:

    https://example.signalwire.com/api/laml/2010-04-01
    

    However, please note that the actual base URL you will use will differ for each space, since it will be customized to include your unique space name. For your own custom URL, replace example with your unique subdomain.

    AccountSid vs ProjectID

    To support seamless migration and compatibility with other XML-based providers to SignalWire, the Compatibility API often refers to the AccountSid. The AccountSid is a unique identifier on other providers. On SignalWire, this is known as the Project ID.

    Each project within your space gets its own, unique Project ID and this is used to authenticate requests on the API. This will be the same value as your Project ID but is set as AccountSid for compatibility.

    On SignalWire's Compatibility API, the AccountSid and Project ID are the same thing.

    Authentication

        curl https://example.signalwire.com/api/laml/2010-04-01/Accounts \
          -X GET \
          -u "YourProjectID:YourAuthToken"
    

    Almost all the Compatibility REST API endpoints are protected with HTTP Basic Authentication. HTTP Basic Authentication requires you to send an Authorization header of your Project ID and Authentication Token. This should be supported in almost all HTTP clients.

    Each project has its own Project ID and Authentication Tokens you will need to use when making each request to the API. You can find your Project ID and Authentication Tokens in your SignalWire Dashboard.

    You can also create several API tokens for each of your projects. Click on the project you wish to create a token for, navigate to the API menu and create a new API token.

    Data Formats

    Dates and Times

    All dates and times in requests to and from SignalWire Compatibility API are UTC, and presented in RFC 2822 format.

    For example, the date and time of 8:01 AM CDT on July 23rd, 2018 is presented as: Mon, 23 Jul 2018 13:01:00 +0000

    Phone Numbers

    All phone numbers in requests to or from the SignalWire Compatibility API are in E.164 format, an unambiguous general format for specifying international phone numbers. Numbers in this format start with a plus sign ("+") and the country code.

    For example, a US-based phone number like (555) 123-4567 would be formatted like: +15551234567.

    If a number cannot be represented in E.164 format, then SignalWire uses the raw Caller ID string that was received.

    Client Libraries and SDKs

    SignalWire has clients in a number of different languages that make using the Compatibility REST API simple and easy. They are also built to make migrating from other service providers to SignalWire as easy as possible.

    C#

    Use nuget to add a reference to the signalwire-dotnet project.

    In order to use the C# client, you must get your Space URL, Project ID, and API Token from your SignalWire dashboard and initialize the client:

    TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    

    Migrating From Twilio

    You can easily migrate from Twilio with minimal changes.

    // Replace these lines:
    TwilioClient.Init("accountSid", "authToken");
    
    // With:
    TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
    // Now use client like you did before!
    

    For calls and messages, you should also change the from numbers with a valid SignalWire number.

    NodeJS

    Install the package using NPM:

    npm install @signalwire/compatibility-api
    

    In order to use the NodeJS client, you must get your Space URL, Project ID, and API Token from your SignalWire dashboard and initialize the client:

    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('your-project', 'your-token', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    // You can then use client to make calls, send messages, and more.
    

    Alternatively, you can use an environment variable to set up the Space URL. Place the Space URL in your .env file:

    SIGNALWIRE_SPACE_URL=example.signalwire.com
    

    With this approach, signalwireSpaceUrl will be pulled from the .env for you:

    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('your-project', 'your-token')
    

    Migrating From Twilio

    You can easily migrate from Twilio with minimal changes.

    // Replace these lines:
    const twilio = require('twilio')
    const client = new twilio(sid, token)
    
    // With:
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('your-project', 'your-token', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    // Now use client variable like you did before!
    

    For calls and messages, you should also change the from numbers with a valid SignalWire number.


    To generate Compatibility XML:

    // Replace these lines:
    const twilio = require('twilio')
    const response = new twilio.twiml.VoiceResponse()
    
    // With:
    const { RestClient } = require('@signalwire/compatibility-api')
    const response = new RestClient.LaML.VoiceResponse()
    
    // Now use response like you did before!
    response.say('Hey, welcome to SignalWire!')
    

    PHP

    Install the packaging using Composer:

    composer require signalwire/signalwire
    

    If your environment does not handle autoloading you must require the autoload file generated by Composer:

    <?php
      require 'path-to/vendor/autoload.php';
    ?>
    

    In order to use the PHP client, you must get your Space URL, Project ID, and API Token from your SignalWire dashboard and initialize the client:

    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('your-project', 'your-token', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      // You can then use $client to make calls, send messages, and more.
    ?>
    

    Alternatively, you can use an environment variable to set up the Space URL:

    Using $_ENV:

    <?php
      $_ENV['SIGNALWIRE_SPACE_URL']="example.signalwire.com";
    ?>
    

    Using putenv:

    <?php
      putenv("SIGNALWIRE_SPACE_URL=example.signalwire.com");
    ?>
    

    With this approach, signalwireSpaceUrl will be pulled from the .env for you:

    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('your-project', 'your-token');
    ?>
    

    Migrating From Twilio

    You can easily migrate from Twilio with minimal changes.

    <?php
      // Replace this line:
      use Twilio\Rest\Client;
    
      // With:
      use SignalWire\Rest\Client;
    
      // Then set up the client with your SignalWire Project ID and API Token:
      $client = new Client('your-project', 'your-token', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      // Now use $client variable like you did before!
    ?>
    

    For calls and messages, you should also change the from numbers with a valid SignalWire number.


    To generate Compatibility XML:

    <?php
      // Replace these lines:
      use Twilio\TwiML;
      $response = new TwiML;
    
      // With:
      use SignalWire\LaML;
      $response = new LaML;
    
      // Now use $response like you did before!
      $response->say('Hey, welcome to SignalWire!')
    ?>
    

    Python

    Install the package:

    pip install signalwire
    

    In order to use the Python client, you must get your Space URL, Project ID, and API Token from your SignalWire dashboard and initialize the client:

    from signalwire.rest import Client as signalwire_client
    client = signalwire_client('your-project', 'your-token', signalwire_space_url = 'example.signalwire.com')
    
    # You can then use client to make calls, send messages, and more.
    

    Alternatively, you can use an environment variable to set up the Space URL. Place the Space URL in your .env file:

    SIGNALWIRE_SPACE_URL=example.signalwire.com
    

    With this approach, signalwire_space_url will be pulled from the .env for you:

    from signalwire.rest import Client as signalwire_client
    client = signalwire_client('your-project', 'your-token')
    

    Migrating From Twilio

    You can easily migrate from Twilio with minimal changes.

    # Replace these lines:
    from twilio.rest import Client
    client = Client('account_sid', 'auth_token')
    
    # With:
    from signalwire.rest import Client as signalwire_client
    client = signalwire_client('your-project', 'your-token', signalwire_space_url = 'example.signalwire.com')
    
    # Now use client variable like you did before!
    

    For calls and messages, you should also change the from numbers with a valid SignalWire number.


    To generate Compatibility XML:

    # Replace these lines:
    from twilio.twiml.voice_response import VoiceResponse
    response = VoiceResponse()
    
    # With:
    from signalwire.voice_response import VoiceResponse
    response = VoiceResponse()
    
    # Now use response like you did before!
    response.say('Hey, welcome to SignalWire!')
    

    Ruby

    Install the package via rubygems:

    gem install signalwire
    

    In order to use the Ruby client, you must get your Space URL, Project ID, and API Token from your SignalWire dashboard and initialize the client:

    require 'signalwire/sdk'
    @client = Signalwire::REST::Client.new 'your-project', 'your-token', signalwire_space_url: "example.signalwire.com"
    
    # You can then use @client to make calls, send messages, and more.
    

    Alternatively, you can use an environment variable to set up the Space URL. Place the Space URL in your .env file:

    SIGNALWIRE_SPACE_URL=example.signalwire.com
    

    With this approach, signalwire_space_url will be pulled from the .env for you:

    require 'signalwire/sdk'
    @client = Signalwire::REST::Client.new 'your-project', 'your-token'
    

    Or, you can configure your SignalWire subdomain with an initializer:

    require 'signalwire/sdk'
    
    Signalwire::Sdk.configure do |config|
      config.hostname = "example.signalwire.com"
    end
    

    Migrating From Twilio

    You can easily migrate from Twilio with minimal changes.

    # Replace these lines:
    require 'twilio-ruby'
    @client = Twilio::REST::Client.new('account_sid', 'auth_token')
    
    # With:
    require 'signalwire/sdk'
    @client = Signalwire::REST::Client.new 'your-project', 'your-token', signalwire_space_url: "example.signalwire.com"
    
    # Now use @client variable like you did before!
    

    For calls and messages, you should also change the from numbers with a valid SignalWire number.


    To generate Compatibility XML:

    # Replace these lines:
    require 'twilio-ruby'
    response = Twilio::TwiML::VoiceResponse.new
    
    # With:
    require 'signalwire/sdk'
    response = Signalwire::Sdk::VoiceResponse.new do |response|
    
    # Now use response like you did before!
    response.say(message: 'Hey, welcome to SignalWire!')
    

    Paging Information

    Example paged result of messages, with one message per page.

    {
      "uri": "/api/laml/2010-04-01/Accounts/446e9986-0848-4d46-a617-48793c5f5e07/Messages?Page=0&PageSize=1",
      "first_page_uri": "/api/laml/2010-04-01/Accounts/446e9986-0848-4d46-a617-48793c5f5e07/Messages?Page=0&PageSize=1",
      "next_page_uri": "/api/laml/2010-04-01/Accounts/446e9986-0848-4d46-a617-48793c5f5e07/Messages?Page=1&PageSize=1&PageToken=PA95f7fba1-aeb7-4750-9092-47525b7a7cad",
      "previous_page_uri": null,
      "page": 0,
      "page_size": 1,
      "messages": [
        {
          "account_sid": "446e9986-0848-4d46-a617-48793c5f5e07",
          "api_version": "2010-04-01",
          "body": "Hello World!",
          "num_segments": 1,
          "num_media": 0,
          "date_created": "Tue, 14 Aug 2018 19:37:39 +0000",
          "date_sent": "Tue, 14 Aug 2018 19:37:41 +0000",
          "date_updated": "Tue, 14 Aug 2018 19:37:44 +0000",
          "direction": "outbound-api",
          "error_code": null,
          "error_message": null,
          "from": "+15551234567",
          "price": 0.005,
          "price_unit": "USD",
          "sid": "8a8e5ec4-071a-408e-948c-2429da869cc9",
          "status": "delivered",
          "to": "+15557654321",
          "uri": "/api/laml/2010-04-01/Accounts/446e9986-0848-4d46-a617-48793c5f5e07/Messages/8a8e5ec4-071a-408e-948c-2429da869cc9",
          "subresource_uris": {
            "media": "/api/laml/2010-04-01/Accounts/446e9986-0848-4d46-a617-48793c5f5e07/Messages/8a8e5ec4-071a-408e-948c-2429da869cc9/Media"
          }
        }
      ]
    }
    

    For resources that return many instances, the API will return partial "pages" of results. These results will contain meta information about the entire list of results you can use to see more of the list.

    Attribute
    uri string The current page's URI.
    first_page_uri string The first page in the result set's URI.
    next_page_uri string The next page in the result set's URI.
    previous_page_uri string The previous page in the result set's URI.
    page integer The current page number, using zero-based number (so the first page would be 0).
    page_size string The number of results per page. The last page may have fewer items.

    Error codes

    The API defines error codes to convey information about the possible issues. They are either generic or specific to an interaction mode (voice or messaging).

    Code Type Message
    10002 Generic Trial account does not support this feature
    11200 Generic HTTP retrieval failure
    11751 Generic MMS -> Media exceeds mobile operator size limit
    12100 Generic Document parse failure
    12300 Generic Invalid Content-Type
    13221 Generic Dial->Number: Invalid method value
    15002 Generic Call Progress: Queue Timeout
    21210 Generic 'From' phone number not verified
    21219 Generic 'To' phone number not verified
    21601 Generic Phone number is not a valid SMS-capable inbound phone number
    21602 Generic Message body is required
    21603 Generic The source 'From' phone number is required to send an SMS
    21604 Generic The destination 'To' phone number is required to send an SMS
    21610 Generic Attempt to send to unsubscribed recipient
    21611 Generic This 'From' number has exceeded the maximum number of queued messages
    21617 Generic The concatenated message body exceeds the 1600 character limit
    21620 Generic Invalid media URL(s)
    21623 Generic Number of media files exceeds allowed limit
    30002 Messaging Account suspended
    30003 Messaging Unreachable destination handset
    30004 Messaging Message blocked or opted out
    30005 Messaging Unknown destination handset
    30006 Generic Landline or unreachable carrier
    30007 Messaging Message marked as spam
    30008 Messaging Unknown error
    30010 Generic Call or message price exceeds max price

    API Reference

    Accounts

    Accounts allow you to list and update your SignalWire Projects. You can create any number of projects on the SignalWire Dashboard and use the Accounts endpoint to list or update them.

    Properties

    A sample account returned from the API.

    {
      "auth_token": "redacted",
      "date_created": "Sat, 15 Sept 2018 10:00:00 +0000",
      "date_updated": "Sun, 16 Sept 2018 20:00:00 +0000",
      "friendly_name": "My Project",
      "sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "status": "active",
      "subresource_uris": {
        "available_phone_numbers": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/AvailablePhoneNumbers.json",
        "calls": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls.json",
        "conferences": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences.json",
        "incoming_phone_numbers": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/IncomingPhoneNumbers.json",
        "notifications": null,
        "outgoing_caller_ids": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/OutgoingCallerIds.json",
        "recordings": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Recordings.json",
        "transcriptions": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Transcriptions.json",
        "addresses": null,
        "signing_keys": null,
        "connect_apps": null,
        "sip": null,
        "authorized_connect_apps": null,
        "usage": null,
        "keys": null,
        "applications": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications.json",
        "short_codes": null,
        "queues": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Queues.json",
        "messages": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Messages.json"
      },
      "type": "Full",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af.json"
    }
    
    Attribute
    auth_token string The authorization token for this account. This token should be kept a secret and is not returned in a normal request.
    date_created datetime The date, in RFC 2822 GMT format, this account was created.
    date_updated datetime The date, in RFC 2822 GMT format, this account was updated.
    friendly_name string The description, up to 64 characters long, of the account. Default is the email address this account is associated with.
    sid string The unique identifier for the account.
    status string The status of the account. Possible values are: active, suspended, or closed.
    subresource_uris object A Map of sub-accounts that are linked to the given account.
    type string The type of the account. Possible values are: Trial and Full.
    uri string The URI for the account.

    Retrieve an Account

    Retrieve an Account

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{Sid}.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.api.accounts('YourProjectID')
              .fetch()
              .then(account => console.log(account.friendlyName))
              .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var account = AccountResource.Fetch(pathSid: "YourProjectID");
    
            Console.WriteLine(account.FriendlyName);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    account = client.api.accounts('YourProjectID').fetch()
    
    print(account.friendly_name)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    account = @client.api.accounts('YourProjectID').fetch
    
    puts account.friendly_name
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $account = $client->api->v2010->accounts("YourProjectID")
                                    ->fetch();
    
      print($account->friendlyName);
    ?>
    

    Response 200 OK

    {
      "auth_token": "redacted",
      "date_created": "Sat, 15 Sept 2018 10:00:00 +0000",
      "date_updated": "Sun, 16 Sept 2018 20:00:00 +0000",
      "friendly_name": "SubAccount",
      "sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "status": "active",
      "subresource_uris": {
        "available_phone_numbers": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/AvailablePhoneNumbers.json",
        "calls": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls.json",
        "conferences": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences.json",
        "incoming_phone_numbers": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/IncomingPhoneNumbers.json",
        "notifications": null,
        "outgoing_caller_ids": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/OutgoingCallerIds.json",
        "recordings": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Recordings.json",
        "transcriptions": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Transcriptions.json",
        "addresses": null,
        "signing_keys": null,
        "connect_apps": null,
        "sip": null,
        "authorized_connect_apps": null,
        "usage": null,
        "keys": null,
        "applications": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications.json",
        "short_codes": null,
        "queues": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Queues.json",
        "messages": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Messages.json"
      },
      "type": "Full",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af.json"
    }
    

    Retrieve a single account.

    Parameter
    Sid required The Project ID that uniquely identifies the account to retrieve.

    List All Accounts

    List All Accounts

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.api.accounts.each(accounts => console.log(accounts.sid));
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var accounts = AccountResource.Read();
    
            foreach(var record in accounts)
            {
               Console.WriteLine(record.Sid);
            }
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    accounts = client.api.accounts.list()
    
    for record in accounts:
        print(record.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    accounts = @client.api.accounts.list
    
    accounts.each do |record|
      puts record.sid
    end
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $accounts = $client->api->v2010->accounts
                                     ->read();
    
      foreach ($accounts as $record) {
          print($record->sid);
      }
    ?>
    

    Response 200 OK

    {
      "first_page_uri": "/api/laml/2010-04-01/Accounts.json?PageSize=40&Page=0",
      "end": 0,
      "previous_page_uri": "/api/laml/2010-04-01/Accounts.json?PageSize=40&Page=0",
      "accounts": [
        {
          "auth_token": "redacted",
          "date_created": "Sat, 15 Sept 2018 10:00:00 +0000",
          "date_updated": "Sun, 16 Sept 2018 20:00:00 +0000",
          "friendly_name": "SubAccount",
          "sid": "b3877c40-da60-4998-90ad-b792e98472af",
          "status": "active",
          "subresource_uris": {
            "available_phone_numbers": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/AvailablePhoneNumbers.json",
            "calls": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls.json",
            "conferences": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences.json",
            "incoming_phone_numbers": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/IncomingPhoneNumbers.json",
            "notifications": null,
            "outgoing_caller_ids": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/OutgoingCallerIds.json",
            "recordings": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Recordings.json",
            "transcriptions": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Transcriptions.json",
            "addresses": null,
            "signing_keys": null,
            "connect_apps": null,
            "sip": null,
            "authorized_connect_apps": null,
            "usage": null,
            "keys": null,
            "applications": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications.json",
            "short_codes": null,
            "queues": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Queues.json",
            "messages": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Messages.json"
          },
          "type": "Full",
          "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af.json"
        }
      ],
      "uri": "/api/laml/2010-04-01/Accounts.json?PageSize=40&Page=0",
      "page_size": 40,
      "start": 0,
      "next_page_uri": "/api/laml/2010-04-01/Accounts.json?PageSize=40&Page=40",
      "page": 0
    }
    

    This route is present to be API compatible with other providers, but since authentication on SignalWire is specific to a Project, this endpoint will return a list that contains only the Project you are connecting as.

    Parameter
    FriendlyName optional Returns the accounts whose FriendlyName exactly matches the one provided.

    Update an Account

    Update an Account's Friendly Name

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{Sid}.json \
      -X POST \
      --data-urlencode "FriendlyName=Project Skynet" \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.api.accounts('YourProjectID')
              .update({FriendlyName: 'Project Skynet'})
              .then(account => console.log(account.friendlyName))
              .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var account = AccountResource.Update(
                friendlyName: "Project Skynet",
                pathSid: "YourProjectID"
            );
    
            Console.WriteLine(account.FriendlyName);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    account = client.api.accounts('YourProjectID') \
                        .update(friendlyName="Project Skynet")
    
    print(account.friendly_name)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    account = @client.api.accounts('YourProjectID')
                         .update(friendly_name: 'Project Skynet')
    
    puts account.friendly_name
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $account = $client->api->v2010->accounts("YourProjectID")
                                    ->update(array("FriendlyName" => "Project Skynet"));
    
      print($account->friendlyName);
    ?>
    

    Response 200 OK

    {
      "auth_token": "redacted",
      "date_created": "Sat, 15 Sept 2018 10:00:00 +0000",
      "date_updated": "Sun, 16 Sept 2018 20:00:00 +0000",
      "friendly_name": "Project Skynet",
      "sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "status": "active",
      "subresource_uris": {
        "available_phone_numbers": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/AvailablePhoneNumbers.json",
        "calls": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls.json",
        "conferences": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences.json",
        "incoming_phone_numbers": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/IncomingPhoneNumbers.json",
        "notifications": null,
        "outgoing_caller_ids": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/OutgoingCallerIds.json",
        "recordings": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Recordings.json",
        "transcriptions": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Transcriptions.json",
        "addresses": null,
        "signing_keys": null,
        "connect_apps": null,
        "sip": null,
        "authorized_connect_apps": null,
        "usage": null,
        "keys": null,
        "applications": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications.json",
        "short_codes": null,
        "queues": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Queues.json",
        "messages": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Messages.json"
      },
      "type": "Full",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af.json"
    }
    

    Allows you to modify the properties of an account.

    Parameter
    FriendlyName optional Ability to update the description of this account.

    Applications

    An application contains a set of URLs and other data that tells SignalWire how to behave when calls and messages are received. They are useful for creating a single configuration that is shared between many numbers.

    Properties

    A sample application returned from the API.

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "api_version": "2010-04-01",
      "date_created": "Sun, 16 Sept 2018 10:00:00 +0000",
      "date_updated": "Mon, 17 Sept 2018 20:00:00 +0000",
      "friendly_name": "Application1",
      "message_status_callback": "http://www.example.com/sms-status-callback",
      "sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "sms_fallback_method": "GET",
      "sms_fallback_url": "http://www.example.com/sms-fallback",
      "sms_method": "GET",
      "sms_status_callback": "http://www.example.com/sms-status-callback",
      "sms_url": "http://example.com",
      "status_callback": "http://example.com",
      "status_callback_method": "GET",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications/b3877c40-da60-4998-90ad-b792e98472af.json",
      "voice_caller_id_lookup": false,
      "voice_fallback_method": "GET",
      "voice_fallback_url": "http://www.example.com/voice-callback",
      "voice_method": "GET",
      "voice_url": "http://example.com"
    }
    
    Attribute
    account_sid string The unique identifier for the account that created this application.
    api_version string The version of the SignalWire API.
    date_created datetime The date, in RFC 2822 GMT format, this application was created.
    date_updated datetime The date, in RFC 2822 GMT format, this application was updated.
    friendly_name string The description, up to 64 characters long, of the account.
    message_status_callback string If a message's ApplicationSid is set to this application's Sid, when a message receives a status change, SignalWire will send a POST request to this URL with the message's details.
    sid string The unique identifier for the account.
    sms_fallback_method string Whether the request to SmsFallbackUrl is a GET or a POST.
    sms_fallback_url string The URL SignalWire will request if errors occur when fetching the SmsUrl.
    sms_method string Whether the request to SmsUrl is a GET or a POST.
    sms_status_callback string If a message's ApplicationSid is set to this application's Sid, when a message receives a status change, SignalWire will send a POST request to this URL with the message's details.
    sms_url string The URL to request when an SMS is received.
    status_callback string The URL to pass status updates to the application.
    status_callback_method string Whether the request to StatusCallback is a GET or a POST.
    uri string The URI for this application.
    voice_caller_id_lookup boolean Whether or not to look up a caller's ID from the database. Possible values are true or false.
    voice_fallback_method string Whether the request to VoiceFallbackUrl is a GET or POST.
    voice_fallback_url string The URL SignalWire will request if errors occur when fetching the Url.
    voice_method string Whether the request to VoiceUrl is a GET or a POST.
    voice_url string The URL to request when a call is received.

    Create an Application

    Create an Application

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Applications.json \
      -X POST \
      --data-urlencode "FriendlyName=Application1" \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.applications
          .create({
             friendlyName: 'Application1'
           })
          .then(application => console.log(application.sid))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var application = ApplicationResource.Create(
                friendlyName: "Application1"
            );
    
            Console.WriteLine(application.Sid);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    application = client.applications \
                        .create(
                             friendly_name='Application1'
                         )
    
    print(application.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    application = @client.applications
                         .create(
                            friendly_name: 'Application1'
                          )
    
    puts application.sid
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $application = $client->applications
                            ->create([
                              "FriendlyName" => "Application1"
                            ]);
    
      print($application->sid);
    ?>
    

    Response 200 OK

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "api_version": "2010-04-01",
      "date_created": "Sun, 16 Sept 2018 10:00:00 +0000",
      "date_updated": "Mon, 17 Sept 2018 20:00:00 +0000",
      "friendly_name": "Application1",
      "message_status_callback": "http://www.example.com/sms-status-callback",
      "sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "sms_fallback_method": "GET",
      "sms_fallback_url": "http://www.example.com/sms-fallback",
      "sms_method": "GET",
      "sms_status_callback": "http://www.example.com/sms-status-callback",
      "sms_url": "http://example.com",
      "status_callback": "http://example.com",
      "status_callback_method": "GET",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications/b3877c40-da60-4998-90ad-b792e98472af.json",
      "voice_caller_id_lookup": false,
      "voice_fallback_method": "GET",
      "voice_fallback_url": "http://www.example.com/voice-callback",
      "voice_method": "GET",
      "voice_url": "http://example.com"
    }
    

    Creates a new application within your account.

    Parameter
    FriendlyName required The description, up to 64 characters long, of the account.
    MessageStatusCallback optional If a message's ApplicationSid is set to this application's Sid, when a message receives a status change, SignalWire will send a POST request to this URL with the message's details.
    SmsFallbackMethod optional Whether the request to SmsFallbackUrl is a GET or a POST. Default is POST.
    SmsFallbackUrl optional The URL SignalWire will request if errors occur when fetching the SmsUrl.
    SmsMethod optional Whether the request to SmsUrl is a GET or a POST. Default is POST.
    SmsStatusCallback optional If a message's ApplicationSid is set to this application's Sid, when a message receives a status change, SignalWire will send a POST request to this URL with the message's details.
    SmsUrl optional The URL to request when an SMS is received.
    StatusCallback optional The URL to pass status updates to the application.
    StatusCallbackMethod optional Whether the request to the StatusCallback URL is a GET or a POST. Default is POST.
    VoiceCallerIdLookup optional Whether or not to look up a caller's ID from the database. Possible values are true or false. Default is false.
    VoiceFallbackMethod optional Whether the request to VoiceFallbackUrl is a GET or a POST. Default is POST.
    VoiceFallbackUrl optional The URL SignalWire will request if errors occur when fetching the Url.
    VoiceMethod optional Whether the request to VoiceUrl is a GET or POST. Default is POST.
    VoiceUrl optional The URL to request when a phone number receives a call or fax.

    Retrieve an Application

    Retrieve an Application

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.applications('Sid')
          .fetch()
          .then(application => console.log(application.friendlyName))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var application = ApplicationResource.Fetch(
                pathSid: "Sid"
            );
    
            Console.WriteLine(application.FriendlyName);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    application = client.applications('Sid').fetch()
    
    print(application.friendly_name)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    application = @client.applications('Sid').fetch
    
    puts application.friendly_name
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $application = $client->applications("Sid")
                            ->fetch();
    
      print($application->friendlyName);
    ?>
    

    Retrieve a single application.

    Parameter
    Sid required The Application Sid that uniquely identifies the application to retrieve.

    List All Applications

    List All Applications

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Applications.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.applications.each(applications => console.log(applications.sid));
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var applications = ApplicationResource.Read();
    
            foreach(var record in applications)
            {
               Console.WriteLine(record.Sid);
            }
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    applications = client.applications.list()
    
    for record in applications:
        print(record.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    applications = @client.applications.list
    
    applications.each do |record|
      puts record.sid
    end
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $applications = $client->applications
                             ->read();
    
      foreach ($applications as $record) {
          print($record->sid);
      }
    ?>
    

    Response 200 OK

    {
      "applications": [
        {
          "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
          "api_version": "2010-04-01",
          "date_created": "Mon, 17 Sept 2018 20:00:00 +0000",
          "date_updated": "Tue, 18 Sept 2018 10:00:00 +0000",
          "friendly_name": "Application1",
          "message_status_callback": null,
          "sid": "b3877c40-da60-4998-90ad-b792e98472af",
          "sms_fallback_method": "POST",
          "sms_fallback_url": null,
          "sms_method": "POST",
          "sms_status_callback": null,
          "sms_url": null,
          "status_callback": null,
          "status_callback_method": "POST",
          "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications/b3877c40-da60-4998-90ad-b792e98472af.json",
          "voice_caller_id_lookup": false,
          "voice_fallback_method": "POST",
          "voice_fallback_url": null,
          "voice_method": "POST",
          "voice_url": null
        }
      ],
      "end": 0,
      "first_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications.json?PageSize=1&Page=0",
      "next_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications.json?PageSize=1&Page=1",
      "previous_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications.json?PageSize=1&Page=0",
      "page_size": 1,
      "page": 0,
      "start": 0,
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications.json?PageSize=1&Page=0",
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af"
    }
    

    The ability to read all of the applications that are associated with your account. This will be returned as a list of applications.

    Parameter
    FriendlyName optional Returns the applications whose FriendlyName exactly matches the one provided.

    Update an Application

    Update an Application

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json \
      -X POST \
      --data-urlencode "SmsUrl=http://your-application.com/docs/sms.xml" \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.applications('Sid')
          .update({smsUrl: 'http://your-application.com/docs/sms.xml'})
          .then(application => console.log(application.friendlyName))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var application = ApplicationResource.Update(
                smsUrl: new Uri("http://your-application.com/docs/sms.xml"),
                pathSid: "Sid"
            );
    
            Console.WriteLine(application.FriendlyName);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    application = client.applications('Sid') \
                        .update(sms_url='http://your-application.com/docs/sms.xml')
    
    print(application.friendly_name)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    application = @client.applications('Sid')
                         .update(
                            sms_url: 'http://your-application.com/docs/sms.xml'
                          )
    
    puts application.friendly_name
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $application = $client->applications("Sid")
                            ->update();
    
      print($application->friendlyName);
    ?>
    

    Response 200 OK

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "api_version": "2010-04-01",
      "date_created": "Sun, 16 Sept 2018 10:00:00 +0000",
      "date_updated": "Mon, 17 Sept 2018 20:00:00 +0000",
      "friendly_name": "Application1",
      "message_status_callback": "http://www.example.com/sms-status-callback",
      "sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "sms_fallback_method": "GET",
      "sms_fallback_url": "http://www.example.com/sms-fallback",
      "sms_method": "GET",
      "sms_status_callback": "http://www.example.com/sms-status-callback",
      "sms_url": "http://your-application.com/docs/sms.xml",
      "status_callback": "http://example.com",
      "status_callback_method": "GET",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications/b3877c40-da60-4998-90ad-b792e98472af.json",
      "voice_caller_id_lookup": false,
      "voice_fallback_method": "GET",
      "voice_fallback_url": "http://www.example.com/voice-callback",
      "voice_method": "GET",
      "voice_url": "http://example.com"
    }
    

    Allows you to modify the properties of an application.

    Parameter
    FriendlyName required The description, up to 64 characters long, of the application.
    MessageStatusCallback optional If a message's ApplicationSid is set to this application's Sid, when a message receives a status change, SignalWire will send a POST request to this URL with the message's details.
    SmsFallbackMethod optional Whether the request to SmsFallbackUrl is a GET or a POST. Default is POST.
    SmsFallbackUrl optional The URL SignalWire will request if errors occur when fetching the SmsUrl.
    SmsMethod optional Whether the request to SmsUrl is a GET or a POST. Default is POST.
    SmsStatusCallback optional If a message's ApplicationSid is set to this application's Sid, when a message receives a status change, SignalWire will send a POST request to this URL with the message's details.
    SmsUrl optional The URL to request when an SMS is received.
    StatusCallback optional The URL to pass call status updates to the application.
    StatusCallbackMethod optional Whether the request to the StatusCallback URL is a GET or a POST. Default is POST.
    VoiceFallbackMethod optional Whether the request to VoiceFallbackUrl is a GET or a POST. Default is POST.
    VoiceFallbackUrl optional The URL SignalWire will request if errors occur when fetching the Url.
    VoiceMethod optional Whether the request to VoiceUrl is a GET or POST. Default is POST.
    VoiceUrl optional The URL to request when a phone number receives a call or fax.

    Example: Update an Application's VoiceUrl

    Update an Application's VoiceUrl

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json \
      -X POST \
      --data-urlencode "VoiceUrl=http://your-application.com/docs/voice.xml"
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.applications('Sid')
          .update({
             voiceUrl: 'http://your-application.com/docs/voice.xml'
           })
          .then(application => console.log(application.friendlyName))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var application = ApplicationResource.Update(
                voiceUrl: new Uri("http://your-application.com/docs/voice.xml"),
                pathSid: "Sid"
            );
    
            Console.WriteLine(application.FriendlyName);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    application = client.applications('Sid') \
                        .update(
                             voice_url='http://your-application.com/docs/voice.xml'
                         )
    
    print(application.friendly_name)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    application = @client.applications('Sid')
                         .update(
                            voice_url: 'http://your-application.com/docs/voice.xml'
                          )
    
    puts application.friendly_name
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $application = $client->applications("Sid")
                            ->update(array("voiceUrl" => "http://your-application.com/docs/voice.xml"));
    
      print($application->friendlyName);
    ?>
    

    Update the URL that SignalWire will request when a call to your account is received.

    Delete an Application

    Delete an Application

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json \
      -X DELETE \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.applications('Sid')
          .remove()
          .then(application => console.log(application.sid))
          .done();
    
    using System;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            ApplicationResource.Delete(pathSid: "YourProjectID");
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    client.applications('Sid').delete()
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    @client.applications('Sid').delete
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $client->applications("Sid")
             ->delete();
    ?>
    

    Response 204 No Content

    Delete an application. If the delete is successful, a 204 response, with no body, will be returned.

    Parameter
    Sid required The Application Sid that uniquely identifies the application to delete.

    Available Phone Numbers

    The ability to search for local, toll-free, and mobile phone numbers to purchase.

    Properties

    A sample AvailablePhoneNumber returned from the API.

    {
      "friendly_name": "253-218-6751",
      "phone_number": "+12532186751",
      "lata": null,
      "rate_center": "AUBURN",
      "latitude": null,
      "longitude": null,
      "region": "WA",
      "postal_code": null,
      "iso_country": "US",
      "capabilities": {
        "voice": true,
        "SMS": true,
        "MMS": true
      },
      "beta": false
    }
    

    The properties listed below apply to local, toll-free, and mobile phone numbers.

    Attribute
    beta boolean New numbers on SignalWire are marked as beta. Possible values are true or false.
    capabilities object Whether or not a number can receive calls and messages. Possible values are Voice, SMS, MMS, and Fax. Each of these values have a boolean value of true or false.
    friendly_name string A formatted version of the number.
    iso_country string The ISO country code of the number.
    lata string The LATA of the number. Only available for numbers in US and Canada.
    latitude string The latitude of the number. Only available for numbers in US and Canada.
    longitude string The longitude of the number. Only available for numbers in US and Canada.
    phone_number string The number in E.164 format.
    postal_code string The postal/zip code of the number. Only available for numbers in US and Canada.
    rate_center string The rate center of the number. Only available for numbers in US and Canada.
    region string The state or province abbreviation of the number. Only available for numbers in US and Canada.

    Search for Local AvailablePhoneNumbers

    Search for Numbers within Washington region.

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/US/Local.json \
      -X GET \
      -d "InRegion=WA" \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client
      .availablePhoneNumbers('US')
      .local.list({
        inRegion: 'WA',
      })
      .then(availablePhoneNumbers => {
        console.log(availablePhoneNumbers);
      });
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    using Twilio.Rest.Api.V2010.Account.AvailablePhoneNumberCountry;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var localAvailableNumbers = LocalResource.Read("US", inRegion: "WA");
    
            Console.WriteLine(localAvailableNumbers);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    numbers = client.available_phone_numbers("US") \
                    .local \
                    .list(in_region="WA")
    
    print(numbers)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    @numbers = @client.api.available_phone_numbers('US').local
                      .list(in_region: 'WA')
    
    puts @numbers
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $numbers = $client->availablePhoneNumbers('US')->local->read(
          array("inRegion" => "WA")
      );
    
      echo $numbers;
    ?>
    

    Response 200 OK

    {
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/AvailablePhoneNumbers/US/Local?InRegion=WA",
      "available_phone_numbers": [
        {
          "friendly_name": "253-218-6751",
          "phone_number": "+12532186751",
          "lata": null,
          "rate_center": "AUBURN",
          "latitude": null,
          "longitude": null,
          "region": "WA",
          "postal_code": null,
          "iso_country": "US",
          "capabilities": {
            "voice": true,
            "SMS": true,
            "MMS": true
          },
          "beta": false
        },
        {
          "friendly_name": "253-218-6752",
          "phone_number": "+12532186752",
          "lata": null,
          "rate_center": "AUBURN",
          "latitude": null,
          "longitude": null,
          "region": "WA",
          "postal_code": null,
          "iso_country": "US",
          "capabilities": {
            "voice": true,
            "SMS": true,
            "MMS": true
          },
          "beta": false
        }
      ]
    }
    

    Search for available phone numbers that match your criteria.

    Attribute
    AreaCode optional Find numbers in the provided area code. Only available for numbers in US and Canada.
    Beta optional Whether or not to specify if a number is a new SignalWire number or not. Possible values are true or false. Default is true.
    Contains optional Find numbers based off of a pattern. Valid characters are [0-9a-zA-Z]. It is recommended to search for a pattern of at least three numbers for best results.
    ExcludeAllAddressRequired optional Whether or not to exclude numbers that require an address anywhere in the world. Possible values are true or false, default is false.
    ExcludeForeignAddressRequired optional Whether or not to exclude numbers that require a foreign address. Possible values are true or false, default is false.
    ExcludeLocalAddressRequired optional Whether or not to exclude numbers that require a local address. Possible values are true or false, default is false.
    FaxEnabled optional Whether or not a number can receive faxes. Possible values are true or false.
    InRegion optional Limits search to same region as number.
    MmsEnabled optional Whether or not a number can receive MMS messages. Possible values are true or false.
    SmsEnabled optional Whether or not a number can receive SMS messages. Possible values are true or false.
    VoiceEnabled optional Whether or not a number can receive calls. Possible values are true or false.

    Example: Find Local Numbers by Number Pattern

    Find Numbers by Number Pattern

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{IsoCountry}/Local.json \
      -X GET \
      -d "Contains=555" \
      -d "AreaCode=510" \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client
      .availablePhoneNumbers('US')
      .local.list({
        contains: '555',
        areaCode: '510',
      })
      .then(availablePhoneNumbers => {
        console.log(availablePhoneNumbers);
      });
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    using Twilio.Rest.Api.V2010.Account.AvailablePhoneNumberCountry;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var localAvailableNumbers = LocalResource.Read("US", contains: "555", areaCode: 510);
    
            Console.WriteLine(localAvailableNumbers);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    numbers = client.available_phone_numbers("US") \
                    .local \
                    .list(contains="555", area_code="510")
    
    print(numbers)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    @numbers = @client.api.available_phone_numbers('US').local
                      .list(contains: '555', area_code: '510')
    
    puts @numbers
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $numbers = $client->availablePhoneNumbers('US')->local->read(
          array("contains" => "555", "areaCode" => "510")
      );
    
      echo $numbers;
    ?>
    

    Find all local numbers in the United States, with area code 510, that contain the pattern '555'.

    Find All Toll-Free Numbers

    Find All Toll-Free Numbers

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{IsoCountry}/TollFree.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client
      .availablePhoneNumbers('US')
      .tollFree.list()
      .then(availablePhoneNumbers => {
        console.log(availablePhoneNumbers);
      });
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    using Twilio.Rest.Api.V2010.Account.AvailablePhoneNumberCountry;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var tollFreeAvailableNumbers = TollFreeResource.Read("US");
    
            Console.WriteLine(tollFreeAvailableNumbers);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    numbers = client.available_phone_numbers("US") \
                    .toll_free \
                    .list()
    
    print(numbers)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    @numbers = @client.api.available_phone_numbers('US').toll_free
                      .list()
    
    puts @numbers
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $numbers = $client->availablePhoneNumbers('US')->tollFree->read();
    
      echo $numbers;
    ?>
    

    Response 200 OK

    {
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/AvailablePhoneNumbers/US/TollFree",
      "available_phone_numbers": [
        {
          "friendly_name": "310-218-6751",
          "phone_number": "+13102186751",
          "iso_country": "US",
          "capabilities": {
            "voice": true,
            "SMS": true,
            "MMS": true
          },
          "beta": false
        },
        {
          "friendly_name": "310-218-6752",
          "phone_number": "+13102186752",
          "iso_country": "US",
          "capabilities": {
            "voice": true,
            "SMS": true,
            "MMS": true
          },
          "beta": false
        }
      ]
    }
    

    Find numbers available in the United States that are toll-free.

    Example: Find a Toll-Free Number by String

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{IsoCountry}/TollFree.json \
      -X GET \
      -d "Contains=WIN"
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client
      .availablePhoneNumbers('US')
      .tollFree.list({
        contains: 'WIN',
      })
      .then(availablePhoneNumbers => {
        console.log(availablePhoneNumbers);
      });
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    using Twilio.Rest.Api.V2010.Account.AvailablePhoneNumberCountry;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var tollFreeAvailableNumbers = TollFreeResource.Read("US", contains: "WIN");
    
            Console.WriteLine(tollFreeAvailableNumbers);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    numbers = client.available_phone_numbers("US") \
                    .toll_free \
                    .list(contains="WIN")
    
    print(numbers)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    @numbers = @client.api.available_phone_numbers('US').toll_free
                      .list(contains: 'WIN')
    
    puts @numbers
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $numbers = $client->availablePhoneNumbers('US')->tollFree->read(
          array("contains" => "WIN")
      );
    
      echo $numbers;
    ?>
    

    Find all toll-free numbers that contain WIN, or 946. Some examples of this include: 800-338-3946 or 888-946-3456.

    List of AvailablePhoneNumber Resources

    List of AvailablePhoneNumber Resources

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client
      .availablePhoneNumbers()
      .then(availablePhoneNumbers => {
        console.log(availablePhoneNumbers);
      });
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var availablePhoneNumbers = AvailablePhoneNumberCountryResource.Read();
    
            Console.WriteLine(availablePhoneNumbers);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    numbers = client.available_phone_numbers() \
                    .list()
    
    print(numbers)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    @numbers = @client.api.available_phone_numbers()
                      .list()
    
    puts @numbers
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $numbers = $client->availablePhoneNumbers->read();
    
      foreach ($numbers as $record) {
        print($record->country);
      }
    ?>
    

    Response 200 OK

    {
      "countries": [
        {
          "beta": false,
          "country": "United States",
          "country_code": "US",
          "subresource_uris": {
            "local": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AvailablePhoneNumbers/US/Local",
            "toll_free": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AvailablePhoneNumbers/US/TollFree"
          },
          "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AvailablePhoneNumbers/US"
        }
      ],
      "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AvailablePhoneNumbers"
    }
    

    Returns a list of URIs to phone number resources available to the account, categorized by type (Local, Toll-Free, Mobile, etc) and ISO country.

    Example: List of AvailablePhoneNumber Resources in US

    List of AvailablePhoneNumber Resources in US

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/US.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client
      .availablePhoneNumbers('US')
      .fetch()
      .then(availablePhoneNumbers => {
        console.log(availablePhoneNumbers);
      });
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var availablePhoneNumbers = AvailablePhoneNumberCountryResource.Fetch("US");
    
            Console.WriteLine(availablePhoneNumbers);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    numbers = client.available_phone_numbers("US") \
                    .fetch()
    
    print(numbers)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    @numbers = @client.api.available_phone_numbers('US')
                      .fetch()
    
    puts @numbers
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $numbers = $client->availablePhoneNumbers('US')->fetch();
    
      echo $numbers;
    ?>
    

    Response 200 OK

    {
      "beta": null,
      "country": "United States",
      "country_code": "US",
      "subresource_uris": {
        "local": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AvailablePhoneNumbers/US/Local.json",
        "toll_free": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AvailablePhoneNumbers/US/TollFree.json"
      },
      "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AvailablePhoneNumbers/US.json"
    }
    

    Returns a list of URIs to phone number resources available to the account in the US ISO country, categorized by type (Local, Toll-Free, Mobile, etc).

    Calls

    A call is a connection between SignalWire and another phone. Outbound calls are made from SignalWire numbers to other phone numbers. Inbound calls are made from other phone numbers to SignalWire numbers.

    Properties

    A sample call returned from the API.

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "annotation": null,
      "answered_by": null,
      "api_version": "2010-04-01",
      "caller_name": null,
      "date_created": "Wed, 19 Sept 2018 20:00:00 +0000",
      "date_updated": "Thur, 20 Sept 2018 10:00:00 +0000",
      "direction": "inbound",
      "duration": 20,
      "end_time": "Fri, 21 Sept 2018 10:00:00 +0000",
      "forwarded_from": "+13102259067",
      "from": "+13103384645",
      "formatted_from": "(310) 338-4645",
      "parent_call_sid": "b3877c40-da60-4998-90ad-b792e98472pa",
      "phone_number_sid": "b3877c40-da60-4998-90ad-b792e98472ph",
      "price": -0.00500,
      "price_unit": "USD",
      "sid": "b3877c40-da60-4998-90ad-b792e98472pa",
      "start_time": "Wed, 19 Sept 2018 20:00:01 +0000",
      "status": "completed",
      "subresource_uris": {
        "notifications": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472pa/Notifications.json",
        "recordings": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472pa/Recordings.json"
      },
      "to": "+13105678901",
      "formatted_to": "(310) 567-8901",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472pa.json",
      "url": "http://your-application.com/docs/voice.xml"
    }
    
    Attribute
    account_sid string The unique identifier for the account that created this call.
    annotation string The annotation for the call.
    answered_by string Who/what the call was answered by. Possible values are human or machine.
    api_version string The version of the SignalWire API.
    caller_name string The name of the caller. Only available if Caller ID lookup is enabled.
    date_created datetime The date, in RFC 2822 GMT format, this call was created.
    date_updated datetime The date, in RFC 2822 GMT format, this call was updated.
    direction string The direction of the call. Possible values are inbound or outbound.
    duration string The duration, in seconds, of the call.
    end_time datetime The time, in RFC 2822 GMT format, the call was terminated.
    forwarded_from string The number this call was forwarded from.
    from string The number, in E.164 format, that initiated the call.
    formatted_from string The formatted number that initiated the call.
    parent_call_sid string The unique identifier for the call that created this leg.
    phone_number_sid string Outbound call: the unique identifier for OutgoingCallerId. Inbound call: the unique identifier for IncomingPhoneNumber.
    price integer The charge for the call.
    price_unit string The currency, in ISO 4127 format, for the price of the call.
    sid string The unique identifier for the call.
    start_time datetime The time, in RFC 2822 GMT format, the call began.
    status string The status of the call. See below for all possible values.
    subresource_uris object A Map of available sub-resources.
    to string The number, in E.164 format, that received the call.
    formatted_to string The formatted number that received the call.
    uri string The URI for the call.



    The status attribute has the following values:

    Value
    queued The call is ready and waiting in line.
    ringing The call is ringing.
    in-progress The call was picked up and is in progress.
    canceled The call was terminated when ringing or queued.
    completed The call was picked up and terminated with no issues.
    busy The caller received a busy signal.
    failed The call was not completed because of a failure.

    Create a Call

    Create a Call

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Calls.json \
      -X POST \
      --data-urlencode "Url=http://your-application.com/docs/voice.xml" \
      --data-urlencode "To=+13105678901" \
      --data-urlencode "From=+13103384645" \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.calls
          .create({
             url: 'http://your-application.com/docs/voice.xml',
             to: '+13105678901',
             from: '+13103384645'
           })
          .then(call => console.log(call.sid))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var call = CallResource.Create(
                url: new Uri("http://your-application.com/docs/voice.xml"),
                to: new Twilio.Types.PhoneNumber("+13105678901"),
                from: new Twilio.Types.PhoneNumber("+13103384645")
            );
    
            Console.WriteLine(call.Sid);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    call = client.calls.create(
                            url='http://your-application.com/docs/voice.xml',
                            to='+13105678901',
                            from_='+13103384645'
                        )
    
    print(call.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    call = @client.calls.create(
                           url: 'http://your-application.com/docs/voice.xml',
                           to: '+13105678901',
                           from: '+13103384645'
                         )
    
    puts call.sid
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $call = $client->calls
                     ->create("+13105678901", // to
                              "+13103384645", // from
                              array("url" => "http://your-application.com/docs/voice.xml")
                     );
    
      print($call->sid);
    ?>
    

    Response 200 OK

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "annotation": null,
      "answered_by": null,
      "api_version": "2010-04-01",
      "caller_name": null,
      "date_created": "Wed, 19 Sept 2018 20:00:00 +0000",
      "date_updated": "Thur, 20 Sept 2018 10:00:00 +0000",
      "direction": "inbound",
      "duration": "20",
      "end_time": "Fri, 21 Sept 2018 10:00:00 +0000",
      "forwarded_from": "+13102259067",
      "from": "+13103384645",
      "from_formatted": "(310) 338-4645",
      "group_sid": "b3877c40-da60-4998-90ad-b792e98472pg",
      "parent_call_sid": "b3877c40-da60-4998-90ad-b792e98472pa",
      "phone_number_sid": "b3877c40-da60-4998-90ad-b792e98472ph",
      "price": -0.02000,
      "price_unit": "USD",
      "sid": "b3877c40-da60-4998-90ad-b792e98472pa",
      "start_time": "Wed, 19 Sept 2018 20:00:01 +0000",
      "status": "completed",
      "subresource_uris": {
        "notifications": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472pa/Notifications.json",
        "recordings": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472pa/Recordings.json",
        "feedback": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472pa/Feedback.json",
        "feedback_summaries": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/FeedbackSummary.json"
      },
      "to": "+13105678901",
      "to_formatted": "(310) 567-8901",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472pa.json",
      "url": "http://your-application.com/docs/voice.xml"
    }
    
    Parameter
    ApplicationSid required*if Url is not present The unique identifier of the application used to handle the call.
    From required The number that initiated the call.
    To required The number that received the call.
    Url required*if ApplicationSid is not present The URL of the call.
    CallerId optional The number, in E.164 format, or identifier of the caller.
    FallbackMethod optional Whether the request to FallbackUrl is a GET or a POST. Default is POST. If ApplicationSid is present, this parameter is ignored.
    FallbackUrl optional The URL SignalWire will request if errors occur when fetching the Url. If ApplicationSid is present, this parameter is ignored.
    MachineDetection optional Whether a human or machine picked up the call. Possible values are Enable, DetectMessageEnd and none.
    AsyncAmd optional Whether or not to execute machine detection asynchronously. Possible values are true or false. Default is false.
    AsyncAmdStatusCallback optional The URL to request when the machine detection is completed. This parameter is ignored if AsyncAmd is false.
    AsyncAmdStatusCallbackMethod optional Whether the request to AsyncAmdStatusCallback is a GET or a POST. Default is POST.
    MachineDetectionSilenceTimeout optional Number of milliseconds to wait for initial voice before giving up. Must be at least 2000 to a maximum of 10000. Default is 5000 milliseconds.
    MachineDetectionSpeechThreshold optional How many milliseconds of voice to decide if it is a machine. If a voice is detected for longer than this value, it is interpreted as a machine. Must be at least 1000 to a maximum of 6000. Default is 2400 milliseconds.
    MachineDetectionSpeechEndThreshold optional Number of milliseconds of silence before speech is considered finished. Must be at least 500 to a maximum of 5000. Default is 1200 milliseconds.
    MachineDetectionTimeout optional The time SignalWire will wait for machine detection before timing out. Default is 30 seconds.
    MachineWordsThreshold optional How many words counted to decide if it is a machine. If more words than this value are counted, it is interpreted as a machine. Must be at least one to a maximum of 100. Default is 6.
    MaxPricePerMinute optional The maximum price in USD acceptable for the call to be created. If the cost to create the call is calculated at greater than MaxPricePerMinute, the call will not be created and error 30010: MaxPricePerMinute was exceeded. This call's cost is XX. will be returned. You will not be charged. If MaxPricePerMinute is not set, all calls will be created. The price can have a maximum of four decimal places, i.e. 0.0075.
    Method optional Whether the request to Url is a GET or a POST. Default is POST. Ignored if ApplicationSid is present.
    Record optional Whether or not to record a call. Possible values are true or false. Default is false.
    RecordingChannels optional The number of channels in the recording. Can be mono (both legs of call recorded under one channel into one recording file) or dual (each leg of call recorded in separate channels into one recording file).
    RecordingStatusCallback optional The URL to request to when recording is available.
    RecordingStatusCallbackEvent optional The different recording statuses. Possible values are completed, in-progress, and absent. To specify multiple events, separate with a space. Defaults to completed.
    RecordingStatusCallbackMethod optional Whether the request to RecordingStatusCallback URL is a GET or a POST. Default is POST.
    RecordingTrack optional Specifies whether to record the inbound audio to SignalWire from the called party or the outbound audio from SignalWire to the called party or both the inbound and outbound audio. Defaults to both.
    SipAuthUsername optional The username to authenticate the caller when making an outbound SIP call.
    SipAuthPassword optional The password to authenticate the caller when making an outbound SIP call.
    SendDigits optional The digits to press after a call is connected. Possible values are (0-9), #, *, and w. Each w gives a 0.5 second pause before moving on to the next instruction.
    StatusCallback optional The URL SignalWire will send webhooks to on every requested StatusCallbackEvent event.
    StatusCallbackEvent optional The status events that trigger a SignalWire webhook. Possible values are initiated, ringing, answered, and completed. To specify multiple events, specify each one in a separate parameter of the same name. Default is completed.
    StatusCallbackMethod optional Whether the request to StatusCallback URL is a GET or a POST. Default is POST. Ignored if ApplicationSid is present.
    Timeout optional The time SignalWire will wait before assuming the call has no answer. Max wait time is 600 seconds. Default is 60 seconds.
    Trim optional Whether leading and trailing silence is trimmed from a recording. Possible values are trim-silence and do-not-trim. Default is trim-silence.

    StatusCallback Parameters

    In addition to the standard request parameters, the following are parameters passed back to your application when SignalWire makes a request to the StatusCallback URL.

    Parameter
    ForwardedFrom The number this call was forwarded from.
    CallerName The name of the caller. Only available if Caller ID lookup is enabled.
    CallDuration The duration, in seconds, of the call.
    RecordingUrl The URL of the recorded audio call.
    RecordingSid The unique identifier for the audio recording.
    RecordingDuration The duration, in seconds of the recording.
    Timestamp The timestamp, in RFC 2822 format, an event occurred.
    CallbackSource The source of the webhook.
    SequenceNumber The order in which events occur. Starts at 0. Although events are fired in order, they each take time and may not appear in the order you expect.



    The standard parameter, CallStatus, has the following values:

    Value
    queued The call is ready and waiting in line.
    ringing The call is ringing.
    in-progress The call was picked up and is in progress.
    canceled The call was terminated when ringing or queued.
    completed The call was picked up and terminated with no issues.
    busy The caller received a busy signal.
    failed The call was not completed because of a failure.

    RecordingStatusCallback Parameters

    In addition to the standard request parameters, the following are parameters passed back to your application when SignalWire makes a request to the RecordingStatusCallback URL.

    Parameter
    RecordingSid The unique identifier for the audio recording.
    RecordingUrl The URL of the recorded audio call.
    RecordingStatus The status of the recording. See below for all possible values.
    RecordingDuration The duration, in seconds of the recording.
    RecordingChannels The number of channels in the recording. Possible values are 1 and 2.
    RecordingSource The type of call that made the recording.
    RecordingTrack Which audio tracks are recorded. Can be inbound, outbound, or both.



    The RecordingStatus attribute has the following values:

    Value
    in-progress The recording of the call has begun.
    completed The recording of the call is completed and ready to access.
    failed The recording of the call is not accessible because of a failure.

    Retrieve a Call

    Retrieve a Call

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.calls('Sid')
          .fetch()
          .then(call => console.log(call.to))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var call = CallResource.Fetch(pathSid: "Sid");
    
            Console.WriteLine(call.To);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    call = client.calls('Sid').fetch()
    
    print(call.to)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    call = @client.calls('Sid').fetch
    
    puts call.to
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $call = $client->calls("Sid")
                     ->fetch();
    
      print($call->to);
    ?>
    

    Retrieve a single call.

    Parameter
    Sid required The Call Sid that uniquely identifies the call to retrieve.

    List All Calls

    List All Calls

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Calls.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.calls.each(calls => console.log(calls.sid));
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var calls = CallResource.Read();
    
            foreach(var record in calls)
            {
               Console.WriteLine(record.Sid);
            }
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    calls = client.calls.list()
    
    for record in calls:
        print(record.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    calls = @client.calls.list
    
    calls.each do |record|
      puts record.sid
    end
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $calls = $client->calls
                      ->read();
    
      foreach ($calls as $record) {
          print($record->sid);
      }
    ?>
    

    Response 200 OK

    {
      "calls": [
        {
          "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
          "annotation": null,
          "answered_by": null,
          "api_version": "2010-04-01",
          "caller_name": null,
          "date_created": "Wed, 19 Sept 2018 20:00:00 +0000",
          "date_updated": "Thur, 20 Sept 2018 10:00:00 +0000",
          "direction": "inbound",
          "duration": "20",
          "end_time": "Fri, 21 Sept 2018 10:00:00 +0000",
          "forwarded_from": "+13102259067",
          "from": "+13103384645",
          "from_formatted": "(310) 338-4645",
          "parent_call_sid": "b3877c40-da60-4998-90ad-b792e98472pa",
          "phone_number_sid": "b3877c40-da60-4998-90ad-b792e98472ph",
          "price": -0.00500,
          "price_unit": "USD",
          "sid": "b3877c40-da60-4998-90ad-b792e98472pa",
          "start_time": "Wed, 19 Sept 2018 20:00:01 +0000",
          "status": "completed",
          "subresource_uris": {
            "notifications": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472pa/Notifications.json",
            "recordings": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472pa/Recordings.json"
          },
          "to": "+13105678901",
          "to_formatted": "(310) 567-8901",
          "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472pa.json"
        }
      ],
      "end": 0,
      "first_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls.json?PageSize=1&Page=0",
      "next_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls.json?PageSize=1&Page=1",
      "page": 0,
      "page_size": 1,
      "previous_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls.json?PageSize=1&Page=0",
      "start": 0,
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls.json?PageSize=1&Page=0",
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af"
    }
    

    The ability to read all of the calls that are associated with your account. This will be returned as a list of calls.

    Parameter
    EndTime optional Returns calls that ended on the specified date.
    From optional Returns calls that are from a specified number.
    ParentCallSid optional Returns calls that created the leg of the call.
    StartTime optional Returns calls that started on the specified date. You can also append < or > to return a range of calls. For example, use StartTime< to return calls started on or before midnight of the date, or StartTime> to return calls started on or after midnight of the date.
    Status optional Returns calls with the specified status.
    To optional Returns calls that were made to the specified number.

    Update a Call

    Update a Call

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json \
      -X POST \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.calls('Sid')
          .update()
          .then(call => console.log(call.to))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var call = CallResource.Update(
                pathSid: "Sid"
            );
    
            Console.WriteLine(call.To);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    call = client.calls('Sid') \
                 .update()
    
    print(call.to)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    call = @client.calls('Sid')
                  .update()
    
    puts call.to
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $call = $client->calls("Sid")
                     ->update();
    
      print($call->to);
    ?>
    

    Allows you to modify an active call.

    Parameter
    Sid required The unique identifier for the call to update.
    FallbackMethod optional Whether the request to FallbackUrl is a GET or a POST. Default is POST.
    FallbackUrl optional The URL SignalWire will request if errors occur when fetching the Url.
    Method optional Whether the request to Url is a GET or a POST. Default is POST.
    Status optional Change the status of the call. Possible values are canceled and completed.
    StatusCallback optional The URL SignalWire will send webhooks to on every StatusCallbackEvent event. Default is completed.
    StatusCallbackMethod optional Whether the request to StatusCallback URL is a GET or a POST. Default is POST.
    Url optional The URL of a new Compatibility XML document to start executing.

    Example: Terminate a Call

    Terminate a Call

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json \
      -X POST \
      --data-urlencode "Status=completed" \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.calls('Sid')
          .update({status: 'completed'})
          .then(call => console.log(call.to))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var call = CallResource.Update(
                status: CallResource.UpdateStatusEnum.Completed,
                pathSid: "Sid"
            );
    
            Console.WriteLine(call.To);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    call = client.calls('Sid') \
                 .update(status='completed')
    
    print(call.to)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    call = @client.calls('Sid')
                  .update(status: 'completed')
    
    puts call.to
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $call = $client->calls("Sid")
                     ->update(array("status" => "completed"));
    
      print($call->to);
    ?>
    

    Terminate a call in progress by specifying the call status as completed.

    Delete a Call

    Delete a Call

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json \
      -X DELETE \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.calls('Sid')
          .remove()
          .then(call => console.log(call.sid))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            CallResource.Delete(pathSid: "Sid");
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    client.calls('Sid').delete()
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    @client.calls('Sid').delete
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $client->calls("Sid")
             ->delete();
    ?>
    

    Response 204 No Content

    Delete a call. If the delete is successful, a 204 response, with no body, will be returned.

    Parameter
    Sid required The Call Sid that uniquely identifies the call to delete.

    Conference Participants

    Conference participants refer to the participants that are actively connected to a conference call. You can mute or remove participants from a conference as well as retrieve a list of all participants, along with detailed information about each participant, in an active conference.

    Properties

    A sample participant returned from the API

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "call_sid": "b3877c40-da60-4998-90ad-b792e98472ca",
      "conference_sid": "b3877c40-da60-4998-90ad-b792e98472pa",
      "date_created": "Mon, 24 Sept 2018 21:00:00 +0000",
      "date_updated": "Tue, 25 Sept 2018 20:00:00 +0000",
      "end_conference_on_exit": false,
      "muted": false,
      "hold": false,
      "status": "complete",
      "start_conference_on_enter": true,
      "coaching": false,
      "call_sid_to_coach": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472pa/Participants/b3877c40-da60-4998-90ad-b792e98472ca.json"
    }
    
    Attribute
    account_sid string The unique identifier for the account that created this conference.
    call_sid string The unique identifier for the Participant call connected to this conference.
    call_sid_to_coach string The unique identifier of the participant who is being coached. The participant being coached is the only participant who can hear the participant who is coaching.
    coaching boolean Whether the participant is coaching another call. Possible values are true or false. If not present, defaults to false unless call_sid_to_coach is defined. If true, call_sid_to_coach must be defined.
    conference_sid string The unique identifier for the conference this participant is in.
    date_created datetime The date, in RFC 2822 format, this conference participant was created.
    date_updated datetime The date, in RFC 2822 format, this conference participant was updated.
    end_conference_on_exit boolean Whether or not a conference ends when a participant leaves the conference call. Possible values are true or false.
    muted boolean Whether or not a participant is muted. Possible values are true or false.
    hold boolean Whether or not a participant is on hold. Possible values are true or false.
    start_conference_on_enter boolean Whether or not a conference will begin when this participant enters the conference call. Possible values are true or false.
    uri string The URI for this conference participant.

    Retrieve a Participant

    Retrieve a Participant

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.conferences('ConferenceSid')
          .participants('CallSid')
          .fetch()
          .then(participant => console.log(participant.callSid))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account.Conference;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var participant = ParticipantResource.Fetch(
                pathConferenceSid: "ConferenceSid",
                pathCallSid: "CallSid"
            );
    
            Console.WriteLine(participant.CallSid);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    participant = client.conferences('ConferenceSid') \
                        .participants('CallSid') \
                        .fetch()
    
    print(participant.call_sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    participant = @client.conferences('ConferenceSid')
                         .participants('CallSid')
                         .fetch
    
    puts participant.call_sid
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $participant = $client->conferences("ConferenceSid")
                            ->participants("CallSid")
                            ->fetch();
    
      print($participant->callSid);
    ?>
    

    Retrieve a single participant.

    Parameter
    AccountSid required The unique identifier for the account that created this conference.
    CallSid required The unique identifier for the Participant call connected to this conference.
    ConferenceSid required The unique identifier for the conference this participant is in.

    List All Active Participants

    List All Active Participants

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.conferences('ConferenceSid')
          .participants
          .each(participants => console.log(participants.callSid));
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account.Conference;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var participants = ParticipantResource.Read(
                pathConferenceSid: "ConferenceSid"
            );
    
            foreach(var record in participants)
            {
               Console.WriteLine(record.CallSid);
            }
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    participants = client.conferences('ConferenceSid') \
                         .participants \
                         .list()
    
    for record in participants:
        print(record.call_sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    participants = @client.conferences('ConferenceSid')
                          .participants
                          .list
    
    participants.each do |record|
      puts record.call_sid
    end
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $participants = $client->conferences("ConferenceSid")
                             ->participants
                             ->read();
    
      foreach ($participants as $record) {
          print($record->callSid);
      }
    ?>
    

    Response 200 OK

    {
      "end": 0,
      "first_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472pa/Participants.json?Page=0&PageSize=50",
      "next_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472pa/Participants.json?Page=50",
      "page": 0,
      "page_size": 50,
      "participants": [
        {
          "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
          "call_sid": "b3877c40-da60-4998-90ad-b792e98472ca",
          "conference_sid": "b3877c40-da60-4998-90ad-b792e98472pa",
          "date_created": "Mon, 24 Sept 2018 21:00:00 +0000",
          "date_updated": "Tue, 25 Sept 2018 20:00:00 +0000",
          "end_conference_on_exit": false,
          "muted": false,
          "hold": false,
          "status": "complete",
          "start_conference_on_enter": true,
          "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472pa/Participants/b3877c40-da60-4998-90ad-b792e98472ca.json"
        }
      ],
      "previous_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472pa/Participants.json?Page=0&PageSize=50",
      "start": 0,
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472pa/Participants.json",
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "conference_sid": "b3877c40-da60-4998-90ad-b792e98472pa"
    }
    

    The ability to read all of the active participants that are associated with this conference call. This will be returned as a list of participants.

    Parameter
    AccountSid required The unique identifier for the account that created this conference.
    ConferenceSid required The unique identifier for the conference this participant is in.
    Muted optional Whether or not the participant is muted. Possible values are true or false.
    Hold optional Whether or not the participant is on hold. Possible values are true or false.

    Add a Participant

    In order to add a participant to a conference call, from the Compatibility REST API, create an outbound call to the participant's phone number and specify a Compatibility XML document that consists of something similar to:

    <?xml version="1.0" encoding="UTF-8"?>
    <Response>
      <Dial>
        <Conference>your-conference-name</Conference>
      </Dial>
    </Response>
    

    When the call is connected, the desired participant will be added to the conference call.

    Update a Participant

    Update a Participant

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json \
      -X POST \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.conferences('ConferenceSid')
          .participants('CallSid')
          .update()
          .then(participant => console.log(participant.callSid))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account.Conference;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var participant = ParticipantResource.Update(
                pathConferenceSid: "ConferenceSid",
                pathCallSid: "CallSid"
            );
    
            Console.WriteLine(participant.CallSid);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    participant = client.conferences('ConferenceSid') \
                        .participants('CallSid') \
                        .update()
    
    print(participant.call_sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    participant = @client.conferences('ConferenceSid')
                         .participants('CallSid')
                         .update()
    
    puts participant.call_sid
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $participant = $client->conferences("ConferenceSid")
                            ->participants("CallSid")
                            ->update();
    
      print($participant->callSid);
    ?>
    

    Allows you to modify the properties of participant in an active conference call.

    Parameter
    AccountSid required The unique identifier for the account that created this conference.
    CallSid required The unique identifier for the Participant call connected to this conference.
    ConferenceSid required The unique identifier for the conference this participant is in.
    CallSidToCoach optional The unique identifier for participant who is being coached. The participant being coached is the only participant who can hear the participant who is coaching.
    Coaching optional Whether the participant is coaching another call. Possible values are true or false.
    AnnounceMethod optional Whether the request to AnnounceUrl is a GET or a POST. Default is POST.
    AnnounceUrl optional The URL to send participant announcements to.
    Hold optional Whether or not the participant is on hold. Possible values are true or false.
    HoldMethod optional Whether the request to HoldUrl is a GET or a POST. Default is POST.
    HoldUrl optional The URL to send hold music to that will be played when participant is on hold.
    Muted optional Whether or not the participant is muted. Possible values are true or false.

    Example: Coaching a Participant

    Coaching a Participant

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json \
      -X POST \
      --data-urlencode "Muted=False" \
      --data-urlencode "Coaching=True" \
      --data-urlencode "Beep=False" \
      --data-urlencode "CallSidToCoach=CallSidToCoach" \
      -u "YourProjectID:YourAuthToken" 
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.conferences('ConferenceSid')
    .participants('CallSid')
    .update({Muted: false, Coaching: true, Beep: false, CallSidToCoach: 'CallSidToCoach'})
    .then(participant => console.log(participant.callSid))
    .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account.Conference;
    
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var participant = ParticipantResource.Update(
                muted: false,
                coaching: true, 
                callSidToCoach: "CallSidToCoach",
                beep: false,
                pathConferenceSid: "ConferenceSid",
                pathCallSid: "CallSid"
            );
    
            Console.WriteLine(participant.CallSid);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    participant = client.conferences('ConferenceSid') \
                        .participants('CallSid') \
                        .update(muted=False, coaching=True, beep=False, callSidToCoach='callSidToCoach')
    
    print(participant.call_sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    participant = @client.conferences('ConferenceSid')
                         .participants('CallSid')
                         .update(muted: false, coaching: true, beep: false, callSidToCoach: 'CallSidToCoach')
    
    puts participant.call_sid
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $participant = $client->conferences("ConferenceSid")
                            ->participants("CallSid")
                            ->update(array("muted" => False, "coaching" => True, "beep"=> False, "callSidToCoach" => 'CallSidToCoach'));
    
      print($participant->callSid);
    ?>
    

    Response 200 OK

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "call_sid": "b3877c40-da60-4998-90ad-b792e98472ca",
      "conference_sid": "b3877c40-da60-4998-90ad-b792e98472pa",
      "date_created": "Mon, 24 Sept 2018 21:00:00 +0000",
      "date_updated": "Tue, 25 Sept 2018 20:00:00 +0000",
      "end_conference_on_exit": false,
      "muted": false,
      "hold": false,
      "status": "complete",
      "start_conference_on_enter": true,
      "coaching": true,
      "call_sid_to_coach": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472pa/Participants/b3877c40-da60-4998-90ad-b792e98472ca.json"
    }
    

    Example: Monitoring a Conference

    Monitoring a Conference

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json \
      -X POST \
      --data-urlencode "Muted=True" \
      --data-urlencode "Coaching=True" \
      --data-urlencode "Beep=False" \
      --data-urlencode "CallSidToCoach=CallSidToCoach" \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.conferences('ConferenceSid')
    .participants('CallSid')
    .update({muted: true, coaching: true, beep: false, callSidToCoach: 'CallSidToCoach'})
    .then(participant => console.log(participant.callSid))
    .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account.Conference;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var participant = ParticipantResource.Update(
                muted: true,
                coaching: true, 
                beep: false,
                callSidToCoach: "CallSidToCoach",
                pathConferenceSid: "ConferenceSid",
                pathCallSid: "CallSid"
            );
    
            Console.WriteLine(participant.CallSid);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    participant = client.conferences('ConferenceSid') \
                        .participants('CallSid') \
                        .update(muted=True, coaching=True, beep=False, callSidToCoach='CallSidToCoach')
    
    print(participant.call_sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    participant = @client.conferences('ConferenceSid')
                         .participants('CallSid')
                         .update(muted: true, coaching: true, beep: false, callSidToCoach: 'CallSidToCoach')
    
    puts participant.call_sid
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $participant = $client->conferences("ConferenceSid")
                            ->participants("CallSid")
                            ->update(array("muted" => True, "coaching" => True, "beep" => False, "callSidToCoach" => 'CallSidToCoach'));
    
      print($participant->callSid);
    ?>
    

    Response 200 OK

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "call_sid": "b3877c40-da60-4998-90ad-b792e98472ca",
      "conference_sid": "b3877c40-da60-4998-90ad-b792e98472pa",
      "date_created": "Mon, 24 Sept 2018 21:00:00 +0000",
      "date_updated": "Tue, 25 Sept 2018 20:00:00 +0000",
      "end_conference_on_exit": false,
      "muted": true,
      "hold": false,
      "status": "complete",
      "start_conference_on_enter": true,
      "coaching": true,
      "call_sid_to_coach": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472pa/Participants/b3877c40-da60-4998-90ad-b792e98472ca.json"
    }
    

    Example: Barge a Conference

    Barge a Conference

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json \
      -X POST \
      --data-urlencode "Muted=False" \
      --data-urlencode "Coaching=False" \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.conferences('ConferenceSid')
    .participants('CallSid')
    .update({muted: false, coaching: false, callSidToCoach: ''})
    .then(participant => console.log(participant.callSid))
    .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account.Conference;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var participant = ParticipantResource.Update(
                muted: false,
                coaching: false, 
                pathConferenceSid: "ConferenceSid",
                pathCallSid: "CallSid"
            );
    
            Console.WriteLine(participant.CallSid);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    participant = client.conferences('ConferenceSid') \
                        .participants('CallSid') \
                        .update(muted=False, coaching=False)
    
    print(participant.call_sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    participant = @client.conferences('ConferenceSid')
                         .participants('CallSid')
                         .update(muted: false, coaching: false)
    
    puts participant.call_sid
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $participant = $client->conferences("ConferenceSid")
                            ->participants("CallSid")
                            ->update(array("muted" => False, "coaching" => False));
    
      print($participant->callSid);
    ?>
    

    Response 200 OK

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "call_sid": "b3877c40-da60-4998-90ad-b792e98472ca",
      "conference_sid": "b3877c40-da60-4998-90ad-b792e98472pa",
      "date_created": "Mon, 24 Sept 2018 21:00:00 +0000",
      "date_updated": "Tue, 25 Sept 2018 20:00:00 +0000",
      "end_conference_on_exit": false,
      "muted": false,
      "hold": false,
      "status": "complete",
      "start_conference_on_enter": true,
      "coaching": false,
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472pa/Participants/b3877c40-da60-4998-90ad-b792e98472ca.json"
    }
    

    Example: Mute a Participant

    Mute a Participant

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json \
      -X POST \
      --data-urlencode "Muted=True" \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.conferences('ConferenceSid')
          .participants('CallSid')
          .update({muted: true})
          .then(participant => console.log(participant.callSid))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account.Conference;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var participant = ParticipantResource.Update(
                muted: true,
                pathConferenceSid: "ConferenceSid",
                pathCallSid: "CallSid"
            );
    
            Console.WriteLine(participant.CallSid);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    participant = client.conferences('ConferenceSid') \
                        .participants('CallSid') \
                        .update(muted=True)
    
    print(participant.call_sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    participant = @client.conferences('ConferenceSid')
                         .participants('CallSid')
                         .update(muted: true)
    
    puts participant.call_sid
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $participant = $client->conferences("ConferenceSid")
                            ->participants("CallSid")
                            ->update(array("muted" => True));
    
      print($participant->callSid);
    ?>
    

    Response 200 OK

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "call_sid": "b3877c40-da60-4998-90ad-b792e98472ca",
      "conference_sid": "b3877c40-da60-4998-90ad-b792e98472pa",
      "date_created": "Mon, 24 Sept 2018 21:00:00 +0000",
      "date_updated": "Tue, 25 Sept 2018 20:00:00 +0000",
      "end_conference_on_exit": false,
      "muted": true,
      "hold": false,
      "status": "complete",
      "start_conference_on_enter": true,
      "coaching": false,
      "call_sid_to_coach": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472pa/Participants/b3877c40-da60-4998-90ad-b792e98472ca.json"
    }
    

    Example: Put a Participant on Hold

    Put a Participant on Hold

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json \
      -X POST \
      --data-urlencode "Hold=True" \
      --data-urlencode "HoldUrl=http://www.your-application.com/hold" \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.conferences('ConferenceSid')
          .participants('CallSid')
          .update({hold: true, holdUrl: 'http://www.your-application.com/hold'})
          .then(participant => console.log(participant.callSid))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account.Conference;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var participant = ParticipantResource.Update(
                hold: true,
                holdUrl: new Uri("http://www.your-application.com/hold"),
                pathConferenceSid: "ConferenceSid",
                pathCallSid: "CallSid"
            );
    
            Console.WriteLine(participant.CallSid);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    participant = client.conferences('ConferenceSid') \
                        .participants('CallSid') \
                        .update(hold=True, hold_url='http://www.your-application.com/hold')
    
    print(participant.call_sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    participant = @client.conferences('ConferenceSid')
                         .participants('CallSid')
                         .update(hold: true, hold_url: 'http://www.your-application.com/hold')
    
    puts participant.call_sid
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $participant = $client->conferences("ConferenceSid")
                            ->participants("CallSid")
                            ->update(array("hold" => True, "holdUrl" => "http://www.your-application.com/hold"));
    
      print($participant->callSid);
    ?>
    

    Response 200 OK

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "call_sid": "b3877c40-da60-4998-90ad-b792e98472ca",
      "conference_sid": "b3877c40-da60-4998-90ad-b792e98472pa",
      "date_created": "Mon, 24 Sept 2018 21:00:00 +0000",
      "date_updated": "Tue, 25 Sept 2018 20:00:00 +0000",
      "end_conference_on_exit": false,
      "muted": false,
      "hold": true,
      "hold_url": "http://www.your-application.com/hold",
      "status": "complete",
      "start_conference_on_enter": true,
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472pa/Participants/b3877c40-da60-4998-90ad-b792e98472ca.json"
    }
    

    This will place a participant, who is in an active conference, on hold and will play hold music.

    Delete a Participant

    Delete a Participant

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json \
      -X DELETE \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.conferences('ConferenceSid')
          .participants('CallSid')
          .remove()
          .then(participant => console.log(participant.callSid))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account.Conference;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            ParticipantResource.Delete(
                pathConferenceSid: "ConferenceSid",
                pathCallSid: "CallSid"
            );
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    client.conferences('ConferenceSid') \
          .participants('CallSid') \
          .delete()
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    @client.conferences('ConferenceSid')
           .participants('CallSid')
           .delete
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $client->conferences("ConferenceSid")
             ->participants("CallSid")
             ->delete();
    ?>
    

    Response 204 No Content

    Deleting a participant will take them out of a conference call. If the delete is successful, a 204 response, with no body, will be returned.

    Parameter
    AccountSid required The unique identifier for the account that created this conference.
    CallSid required The unique identifier for the Participant call connected to this conference.
    ConferenceSid required The unique identifier for the conference this participant is in.

    Conferences

    The Conference resource permits you to search, modify, and manage conferences in your SignalWire account.

    Properties

    A sample conference returned from the API

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "api_version": "2010-04-01",
      "date_created": "Mon, 24 Sept 2018 21:00:00 +0000",
      "date_updated": "Tue, 25 Sept 2018 20:00:00 +0000",
      "friendly_name": "Conference1",
      "sid": "b3877c40-da60-4998-90ad-b792e98472ca",
      "region": "us1",
      "status": "completed",
      "subresource_uris": {
        "participants": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472ca/Participants.json",
        "recordings": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472ca/Recordings.json"
      },
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472ca.json"
    }
    
    Attribute
    account_sid string The unique identifier for the account that created this conference.
    date_created datetime The date, in RFC 2822 format, this conference was created.
    date_updated datetime The date, in RFC 2822 format, this conference was updated.
    friendly_name string A description, up to 64 characters, of the conference room.
    region string The region where this conference audio was mixed. Possible values are us1, us2, ie1, de1, sg1, br1, au1, and jp1.
    sid string The unique identifier for this conference.
    status string The status of this conference.
    uri string The URI for this conference.

    Retrieve a Conference

    Retrieve a Conference

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.conferences('Sid')
          .fetch()
          .then(conference => console.log(conference.friendlyName))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var conference = ConferenceResource.Fetch(
                pathSid: "Sid"
            );
    
            Console.WriteLine(conference.FriendlyName);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    conference = client.conferences('Sid').fetch()
    
    print(conference.friendly_name)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    conference = @client.conferences('Sid').fetch
    
    puts conference.friendly_name
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $conference = $client->conferences("Sid")
                           ->fetch();
    
      print($conference->friendlyName);
    ?>
    

    Retrieve a single conference.

    Parameter
    Sid required The unique identifier for this conference.

    List All Conferences

    List All Conferences

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Conferences.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.conferences.each(conferences => console.log(conferences.sid));
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var conferences = ConferenceResource.Read();
    
            foreach(var record in conferences)
            {
               Console.WriteLine(record.Sid);
            }
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    conferences = client.conferences.list()
    
    for record in conferences:
        print(record.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    conferences = @client.conferences.list
    
    conferences.each do |record|
      puts record.sid
    end
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $conferences = $client->conferences
                            ->read();
    
      foreach ($conferences as $record) {
          print($record->sid);
      }
    ?>
    

    Response 200 OK

    {
      "conferences": [
        {
          "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
          "api_version": "2010-04-01",
          "date_created": "Mon, 24 Sept 2018 21:00:00 +0000",
          "date_updated": "Tue, 25 Sept 2018 20:00:00 +0000",
          "friendly_name": null,
          "region": "us1",
          "sid": "b3877c40-da60-4998-90ad-b792e98472ca",
          "status": "in-progress",
          "subresource_uris": {
            "participants": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472ca/Participants.json",
            "recordings": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472ca/Recordings.json"
          },
          "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472ca.json"
        }
      ],
      "end": 0,
      "first_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences.json?PageSize=1&Page=0",
      "next_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences.json?PageSize=1&Page=1",
      "page": 0,
      "page_size": 1,
      "previous_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences.json?PageSize=1&Page=0",
      "start": 0,
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences.json?PageSize=1",
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af"
    }
    

    The ability to read all of the conferences that are associated with your SignalWire account. This will be returned as a list of conferences.

    Parameter
    DateCreated optional Shows conferences that were created on the date provided. Format as YYYY-MM-DD in UTC. You can also append < or > to return a range of conferences. For example, use DateCreated< to return conferences created on or before midnight of the date, or DateCreated> to return conferences created on or after midnight of the date.
    DateUpdated optional Shows conferences that were updated on the date provided. Format as YYYY-MM-DD in UTC. You can also append < or > to return a range of conferences. For example, use DateCreated< to return conferences updated on or before midnight of the date, or DateCreated> to return conferences updated on or after midnight of the date.
    FriendlyName optional Shows conferences that exactly match the friendly name provided.
    Status optional The status of the conference. Possible values are init, in-progress, or completed.

    Update a Conference

    Update a Conference

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json \
      -X POST \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.conferences('Sid')
          .update()
          .then(conference => console.log(conference.friendlyName))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var conference = ConferenceResource.Update(
                pathSid: "Sid"
            );
    
            Console.WriteLine(conference.FriendlyName);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    conference = client.conferences('Sid') \
                       .update()
    
    print(conference.friendly_name)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    conference = @client.conferences('Sid')
                        .update()
    
    puts conference.friendly_name
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $conference = $client->conferences("Sid")
                           ->update();
    
      print($conference->friendlyName);
    ?>
    

    Allows you to modify the properties of a conference.

    Parameter
    AnnounceMethod optional Whether the request to AnnounceUrl is a GET or a POST. Default is POST.
    AnnounceUrl optional The URL to send conference announcements to.
    Status optional The status of the conference. If set to completed, the conference will end and all participants will be removed.

    Example: Terminate a Conference

    Terminate a Conference

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json \
      -X POST \
      --data-urlencode "Status=completed"
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.conferences('Sid')
          .update({status: 'completed'})
          .then(conference => console.log(conference.friendlyName))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var conference = ConferenceResource.Update(
                status: ConferenceResource.UpdateStatusEnum.Completed,
                pathSid: "Sid"
            );
    
            Console.WriteLine(conference.FriendlyName);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    conference = client.conferences('Sid') \
                       .update(status='completed')
    
    print(conference.friendly_name)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    conference = @client.conferences('Sid')
                        .update(status: 'completed')
    
    puts conference.friendly_name
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $conference = $client->conferences("Sid")
                           ->update(array("status" => "completed"));
    
      print($conference->friendlyName);
    ?>
    

    Response 200 OK

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "api_version": "2010-04-01",
      "date_created": "Mon, 4 Oct 2018 20:00:45 +0000",
      "date_updated": "Mon, 4 Oct 2018 20:00:46 +0000",
      "friendly_name": null,
      "region": "us1",
      "sid": "b3877c40-da60-4998-90ad-b792e98472ca",
      "status": "completed",
      "subresource_uris": {
        "participants": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472ca/Participants.json",
        "recordings": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472ca/Recordings.json"
      },
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Conferences/b3877c40-da60-4998-90ad-b792e98472ca.json"
    }
    

    End an active conference call by setting the status to completed.

    Faxes

    A Fax is a fax that has been sent to or received by a SignalWire phone number.

    Properties

    A sample Fax returned from the API.

    {
      "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": "queued",
      "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"
    }
    
    Attribute
    account_sid string The unique identifier for the account this fax is associated with.
    date_created string The date and time, in ISO 8601 format, the fax was created.
    date_updated string The date and time, in ISO 8601 format, the fax was updated.
    direction string The direction of the fax. Possible values are inbound or outbound.
    duration integer The time, in seconds, it took to deliver a fax.
    from string The phone number, in E.164 format, the fax was sent from.
    links object The URL links for resources associated with the fax.
    media_sid string The unique identifier for the media instance associated with the fax instance.
    media_url string The URL hosting the received media. Can use this URL to download incoming media.
    num_pages string The number of pages in the fax document.
    price string The cost of the fax.
    price_unit string The currency, in ISO 4217 format, of the price.
    quality string The quality of the fax. See below for possible values.
    sid string The unique identifier of the fax.
    status string The status of the fax. See below for possible values.
    to string The phone number, in E.164 format, the fax was sent to.
    url string The URL of this resource.



    The quality attribute has the following values:

    Value
    standard A low quality (204x98) fax resolution. This quality should be supported by all devices.
    fine A medium quality (204x196) fax resolution.
    superfine A high quality (204x392) fax resolution.



    The status attribute has the following values:

    Value
    queued The fax is queued and waiting for processing.
    processing The fax is being uploaded, downloaded, or converted to a different format.
    sending The fax is being sent.
    delivered The fax has been successfully sent.
    receiving The fax is being received.
    received The fax has been successfully received.
    no-answer The fax failed because the recipient didn't pick up.
    busy The fax failed because the receiving machine sent back a busy signal.
    failed The fax failed to send or receive.
    canceled The fax was canceled.

    Send a Fax

    Send a Fax by creating a new fax instance

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Faxes.json \
      -X POST \
      --data-urlencode "From=+13103383454" \
      --data-urlencode "To=+13104456789" \
      --data-urlencode "MediaUrl=https://example.com/fax.pdf" \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.fax.faxes
      .create({
         from: '+13103383454',
         to: '+13104456789',
         mediaUrl: 'https://example.com/fax.pdf'
       })
      .then(fax => console.log(fax.sid))
      .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"] = "<your-domain>.signalwire.com" });
    
            var fax = FaxResource.Create(
                from: "+13103383454",
                to: "+13104456789",
                mediaUrl: new Uri("https://example.com/fax.pdf")
            );
    
            Console.WriteLine(fax.Sid);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    fax = client.fax.faxes \
        .create(
             from_='+13103383454',
             to='+13104456789',
             media_url='https://example.com/fax.pdf'
         )
    
    print(fax.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    fax = @client.fax.faxes
      .create(
         from: '+13103383454',
         to: '+13104456789',
         media_url: 'https://example.com/fax.pdf'
       )
    puts fax.sid
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $fax = $client->fax->v1->faxes
                             ->create("+13104456789", // to
                                      "https://example.com/fax.pdf", // mediaUrl
                                      array("from" => "+13103383454")
                             );
    
      print($fax->sid);
    ?>
    

    Response 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"
    }
    

    Create a new fax instance.

    Parameter
    MediaUrl required The URL to the PDF used for the fax's media.
    To required The phone number, in E.164 format, the fax will be sent to.
    From optional The phone number, in E.164 format, the fax will be sent from.
    Quality optional The quality of the fax. Default is fine.
    StatusCallback optional The URL to send a POST request when the status of a fax changes. See below for parameters.
    Ttl optional The number of minutes, after a fax was initiated, SignalWire should wait before attempting to send a fax.



    The StatusCallback request contains the following parameters:

    Parameter
    RemoteStationId optional The transmitting subscriber identification (TSID) reported by the fax machine that sent in the fax.
    FaxStatus optional The status of the fax.
    OriginalMediaUrl optional The original URL passed when a fax is sent.
    NumPages optional The number of pages received from a successful fax.
    MediaSid optional The SID that uniquely identifies the fax media.
    MediaUrl optional The media URL to request to retrieve incoming media.
    ErrorCode optional The error code provides more information on a failed fax.
    ErrorMessage optional The message explaining the reason for fax failure.

    Retrieve a Fax

    Retrieve a Fax

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Faxes/{FaxSid}.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.fax.faxes('FaxSid')
              .fetch()
              .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"] = "<your-domain>.signalwire.com" });
    
            var fax = FaxResource.Fetch(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').fetch()
    
    print(fax.to)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    fax = @client.fax.faxes('FaxSid').fetch
    
    puts fax.to
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $fax = $client->fax->v1->faxes("FaxSid")
                             ->fetch();
    
      print($fax->to);
    ?>
    

    Response 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": "queued",
      "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"
    }
    

    Retrieve a single fax.

    Parameter
    FaxSid required The Sid that uniquely identifies the fax to retrieve.

    Update a Fax

    Update the Status of a Fax to Canceled

    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"] = "<your-domain>.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
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $fax = $client->fax->v1->faxes("FaxSid")
                             ->update(array("status" => "canceled"));
    
      print($fax->to);
    ?>
    

    Response 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"
    }
    

    Update a single fax.

    Parameter
    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.

    List All Faxes

    List all Faxes of an Account

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Faxes.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.fax.faxes.each(faxes => console.log(faxes.sid));
    
    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"] = "<your-domain>.signalwire.com" });
    
            var faxes = FaxResource.Read();
    
            foreach(var record in faxes)
            {
               Console.WriteLine(record.Sid);
            }
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    faxes = client.fax.faxes.list()
    
    for record in faxes:
        print(record.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    faxes = @client.fax.faxes.list
    
    faxes.each do |record|
      puts record.sid
    end
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $faxes = $client->fax->v1->faxes
                               ->read();
    
      foreach ($faxes as $record) {
          print($record->sid);
      }
    ?>
    

    Response 200 OK

    {
      "faxes": [
        {
          "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": "queued",
          "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"
        }
      ],
      "meta": {
        "first_page_url": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes?PageSize=50&Page=0",
        "key": "faxes",
        "next_page_url": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes?PageSize=50&Page=1",
        "page": 0,
        "page_size": 50,
        "previous_page_url": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes?PageSize=50&Page=0",
        "url": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes?PageSize=50&Page=0"
      }
    }
    

    List all faxes on your SignalWire account.

    Parameter
    date_created_after optional Filter the returned list of faxes to only those that were created after the specified date.
    date_created_on_or_before optional Filter the returned list of faxes to only those that were created on or before the specified date.
    from optional Filter the returned list of faxes to only those that were sent from the specified phone number.
    to optional Filter the returned list of faxes to only those that were sent to the specified phone number.

    Delete a Fax

    Delete a Fax

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Faxes/{FaxSid}.json \
      -X DELETE \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.fax.faxes('FaxSid')
          .remove()
          .then(fax => console.log(fax.sid))
          .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"] = "<your-domain>.signalwire.com" });
    
            FaxResource.Delete(pathSid: "FaxSid");
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    client.fax.faxes('FaxSid').delete()
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    @client.faxes('FaxSid').delete
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $client->fax->v1->faxes("FaxSid")
             ->delete();
    ?>
    

    Response 204 No Content

    Delete a fax. If the delete is successful, a 204 response, with no body, will be returned. Note: this action cannot be undone.

    Parameter
    FaxSid required The unique identifier of the fax.

    Fax Media

    The Fax Media resource provides detailed information about the media files attached to fax instances.

    Properties

    A sample fax media returned from the API

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
      "content_type": "application/pdf",
      "date_created": "2018-11-27T20:00:00Z",
      "date_updated": "2018-11-28T20:00:00Z",
      "fax_sid": "b3877c40-da60-4998-90ad-b792e98472fs",
      "sid": "b3877c40-da60-4998-90ad-b792e98472fx",
      "url": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes/b3877c40-da60-4998-90ad-b792e98472fs/Media/b3877c40-da60-4998-90ad-b792e98472fx"
    }
    
    Attribute
    account_sid string The unique identifier for the account this fax media is associated with.
    content_type string The content type of the stored media.
    date_created string The date and time, in ISO 8601 format, the fax media was created.
    date_updated string The date and time, in ISO 8601 format, the fax media was updated.
    fax_sid string The unique identifier of the fax that the media is associated with.
    sid string The unique identifier for the fax media.
    url string The URL of this resource.

    Retrieve a Fax Media Instance

    Retrieve a Fax Media Instance

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Faxes/{FaxSid}/Media/{MediaSid}.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.fax.faxes('FaxSid')
          .media('MediaSid')
          .fetch()
          .then(media => console.log(media.contentType))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Fax.V1.Fax;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var media = FaxMediaResource.Fetch(
                pathFaxSid: "FaxSid",
                pathSid: "MediaSid"
            );
    
            Console.WriteLine(media.ContentType);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    media = client.faxes('FaxSid') \
                  .media('MediaSid') \
                  .fetch()
    
    print(media.content_type)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    media = @client.faxes('FaxSid')
                   .media('MediaSid')
                   .fetch
    
    puts media.content_type
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $media = $client->fax->v1->faxes("FaxSid")
                      ->media("MediaSid")
                      ->fetch();
    
      print($media->contentType);
    ?>
    

    Response 200 OK

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
      "content_type": "application/pdf",
      "date_created": "2018-11-27T20:00:00Z",
      "date_updated": "2018-11-28T20:00:00Z",
      "fax_sid": "b3877c40-da60-4998-90ad-b792e98472fs",
      "sid": "b3877c40-da60-4998-90ad-b792e98472fx",
      "url": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes/b3877c40-da60-4998-90ad-b792e98472fs/Media/b3877c40-da60-4998-90ad-b792e98472fx"
    }
    

    Retrieve a single fax media.

    Parameter
    MediaSid required The Sid that uniquely identifies the fax media to retrieve.

    List All Media of a Fax

    List all Media of a Fax

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Faxes/{FaxSid}/Media.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.fax.faxes('FaxSid')
          .media
          .each(media => console.log(media.sid));
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Fax.V1.Fax;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var media = FaxMediaResource.Read(
                pathFaxSid: "FaxSid"
            );
    
            foreach(var record in media)
            {
               Console.WriteLine(record.Sid);
            }
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    media = client.fax.faxes('FaxSid').media.list()
    
    for record in media:
        print(record.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    media = @client.faxes('FaxSid').media.list
    
    media.each do |record|
      puts record.sid
    end
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $media = $client->fax->v1->faxes("FaxSid")
                      ->media
                      ->read();
    
      foreach ($media as $record) {
          print($record->sid);
      }
    ?>
    

    Response 200 OK

    {
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes/b3877c40-da60-4998-90ad-b792e98472fs/Media?Page=0&PageSize=50",
      "first_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes/b3877c40-da60-4998-90ad-b792e98472fs/Media?Page=0&PageSize=50",
      "next_page_uri": null,
      "previous_page_uri": null,
      "page": 0,
      "page_size": 50,
      "media": [
        {
          "account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
          "content_type": "application/pdf",
          "date_created": "2018-11-27T20:00:00Z",
          "date_updated": "2018-11-28T20:00:00Z",
          "fax_sid": "b3877c40-da60-4998-90ad-b792e98472fs",
          "sid": "b3877c40-da60-4998-90ad-b792e98472fx",
          "url": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes/b3877c40-da60-4998-90ad-b792e98472fs/Media/b3877c40-da60-4998-90ad-b792e98472fx"
        }
      ]
    }
    

    Returns a paged list of media belonging to this fax sorted with the most recent media appearing first.

    Delete a Fax Media

    Delete a Fax Media

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Faxes/{FaxSid}/Media/{MediaSid}.json \
      -X DELETE \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.fax.faxes('FaxSid')
          .media('MediaSid')
          .remove()
          .then(media => console.log(media.sid))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Fax.V1.Fax;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            FaxMediaResource.Delete(
                pathFaxSid: "FaxSid",
                pathSid: "MediaSid"
            );
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    client.fax.faxes('FaxSid') \
          .media('MediaSid') \
          .delete()
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    @client.faxes('FaxSid')
           .media('MediaSid')
           .delete
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $client->fax->v1->faxes("FaxSid")
             ->media("MediaSid")
             ->delete();
    ?>
    

    Response 204 No Content

    Delete a fax media instance. If the delete is successful, a 204 response, with no body, will be returned. Note: this action cannot be undone.

    Parameter
    MediaSid required The unique identifier of the fax media.

    Incoming Phone Numbers

    IncomingPhoneNumbers represent an account's phone numbers that were purchased through SignalWire.

    Properties

    A sample IncomingPhoneNumber returned from the API

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
      "address_requirements": "none",
      "address_sid": "b3877c40-da60-4998-90ad-b792e98472ad",
      "api_version": "2010-04-01",
      "beta": false,
      "capabilities": {
        "mms": true,
        "sms": false,
        "voice": true
      },
      "date_created": "Tue, 25 Sept 2018 23:00:00 +0000",
      "date_updated": "Wed, 26 Sept 2018 22:00:00 +0000",
      "emergency_address_sid": null,
      "emergency_status": "Inactive",
      "friendly_name": "310-338-6745",
      "identity_sid": "b3877c40-da60-4998-90ad-b792e98472ri",
      "origin": "origin",
      "phone_number": "+13103386745",
      "sid": "b3877c40-da60-4998-90ad-b792e98472pn",
      "sms_application_sid": null,
      "sms_fallback_method": "POST",
      "sms_fallback_url": "",
      "sms_method": "POST",
      "sms_url": "",
      "status_callback": "",
      "status_callback_method": "POST",
      "trunk_sid": "b3877c40-da60-4998-90ad-b792e98472tr",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/IncomingPhoneNumbers/b3877c40-da60-4998-90ad-b792e98472pn.json",
      "voice_application_sid": null,
      "voice_caller_id_lookup": false,
      "voice_fallback_method": "POST",
      "voice_fallback_url": null,
      "voice_method": "GET",
      "voice_url": "http://your-application.com/docs/voice.xml"
    }
    
    Attribute
    account_sid string The unique identifier for the account that is associated with this phone number.
    address_requirements string Whether or not a registered address with SignalWire is required. See below for possible values.
    address_sid string The unique identifier for the address associated with this phone number.
    api_version string The version of the SignalWire API.
    beta boolean New numbers on SignalWire are marked as beta. Possible values are true or false.
    capabilities object Whether or not a number can receive calls and messages. Possible values are Voice, SMS, MMS, and Fax. Each of these values have a boolean value of true or false.
    date_created datetime The date, in RFC 2822 format, this phone number was created.
    date_updated datetime The date, in RFC 2822 format, this phone number was updated.
    emergency_address_sid string The unique identifier of the address associated with E911 for this phone number.
    emergency_status string Whether the phone route has an active E911 address associated. Possible values are Active or Inactive.
    friendly_name string A formatted version of the number.
    identity_sid string The unique identifier for the identity associated with this phone number.
    origin string The origin of the phone number. SignalWire numbers are denoted as signalwire while hosted numbers are denoted as hosted.
    phone_number string The incoming number in E.164 format.
    sid string The unique identifier for this phone number.
    sms_application_sid string The unique identifier for the application associated with SMS handling on this phone number. If SmsApplicationSid is present, the URLs on the application will be used and all other URLs will be ignored.
    sms_fallback_method string Whether the request to SmsFallbackUrl is a GET or a POST. Default is POST.
    sms_fallback_url string The URL to request if errors occur when fetching SmsUrl.
    sms_method string Whether the request to SmsUrl is a GET or a POST. Default is POST.
    sms_url string The URL to request when an incoming SMS is received.
    status_callback string The URL to request to pass status updates to.
    status_callback_method string Whether the request to StatusCallback is a GET or a POST. Default is POST.
    trunk_sid string The unique identifier for the Trunk associated with this phone number.
    uri string The URI for this number.
    voice_application_sid string The unique identifier for the application associated with call handling on this phone number. If VoiceApplicationSid is present, the URLs on the application will be used and all other URLs will be ignored.
    voice_caller_id_lookup boolean Whether or not to look up a caller's name in the database. Possible values are true or false.
    voice_fallback_method string Whether the request to VoiceFallbackUrl is a GET or a POST. Default is POST.
    voice_fallback_url string The URL to request if errors occur when fetching Url.
    voice_method string Whether the request to Url is a GET or a POST. Default is POST.
    voice_url string The URL to request when an incoming call is received.



    The address_requirements attribute has the following values:

    Value
    none No address is required.
    any An address is required, but can be anywhere in the world.
    local An address is required and must be in the same country as the number.
    foreign An address is required and must be outside the country of the number.

    Create an IncomingPhoneNumber

    Create an IncomingPhoneNumber

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json \
      -X POST \
      --data-urlencode "FriendlyName=IncomingPhoneNumber1" \
      --data-urlencode "PhoneNumber=+13103386745" \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.incomingPhoneNumbers
          .create({
             friendlyName: 'IncomingPhoneNumber1',
             phoneNumber: '+13103386745'
           })
          .then(incoming_phone_number => console.log(incoming_phone_number.sid))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var incomingPhoneNumber = IncomingPhoneNumberResource.Create(
                friendlyName: "IncomingPhoneNumber1",
                phoneNumber: new Twilio.Types.PhoneNumber("+13103386745")
            );
    
            Console.WriteLine(incomingPhoneNumber.Sid);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    incoming_phone_number = client.incoming_phone_numbers \
        .create(
             friendly_name='IncomingPhoneNumber1',
             phone_number='+13103386745'
         )
    
    print(incoming_phone_number.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    incoming_phone_number = @client.incoming_phone_numbers
      .create(
         friendly_name: 'IncomingPhoneNumber1',
         phone_number: '+13103386745'
       )
    
    puts incoming_phone_number.sid
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $incoming_phone_number = $client->incomingPhoneNumbers
                                      ->create(array(
                                                   "friendlyName" => "IncomingPhoneNumber1",
                                                   "phoneNumber" => "+13103386745"
                                               )
                                      );
    
      print($incoming_phone_number->sid);
    ?>
    

    Response 201 CREATED

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
      "address_requirements": "none",
      "address_sid": "b3877c40-da60-4998-90ad-b792e98472ad",
      "api_version": "2010-04-01",
      "beta": false,
      "capabilities": {
        "mms": true,
        "sms": false,
        "voice": true
      },
      "date_created": "Tue, 25 Sept 2018 23:00:00 +0000",
      "date_updated": "Wed, 26 Sept 2018 22:00:00 +0000",
      "emergency_address_sid": null,
      "emergency_status": "Inactive",
      "friendly_name": "IncomingPhoneNumber1",
      "identity_sid": "b3877c40-da60-4998-90ad-b792e98472ri",
      "origin": "origin",
      "phone_number": "+13103386745",
      "sid": "b3877c40-da60-4998-90ad-b792e98472pn",
      "sms_application_sid": null,
      "sms_fallback_method": "POST",
      "sms_fallback_url": "",
      "sms_method": "POST",
      "sms_url": "",
      "status_callback": "",
      "status_callback_method": "POST",
      "trunk_sid": "b3877c40-da60-4998-90ad-b792e98472tr",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/IncomingPhoneNumbers/b3877c40-da60-4998-90ad-b792e98472pn.json",
      "voice_application_sid": null,
      "voice_caller_id_lookup": false,
      "voice_fallback_method": "POST",
      "voice_fallback_url": null,
      "voice_method": "GET",
      "voice_url": "http://your-application.com/docs/voice.xml"
    }
    
    Parameter
    AccountSid required The unique identifier of the account associated with this phone number.
    AreaCode required*if PhoneNumber is not present The area code of your new number. A new number within this area code will be generated for you.
    PhoneNumber required*if AreaCode is not present The new number, in E.164 format, you would like to buy.
    AddressSid optional The unique identifier for the address associated with this phone number.
    FriendlyName optional The formatted version of the phone number.
    IdentitySid optional The unique identifier for the identity associated with this phone number.
    SmsApplicationSid optional The unique identifier for the application associated with SMS handling on this phone number. If SmsApplicationSid is present, the URLs on the application will be used and all other URLs will be ignored.
    SmsFallbackMethod optional Whether the request to SmsFallbackUrl is a GET or a POST. Default is POST.
    SmsFallbackUrl optional The URL to request if errors occur when fetching SmsUrl.
    SmsMethod optional Whether the request to SmsUrl is a GET or a POST. Default is POST.
    SmsUrl optional The URL to request when an incoming SMS is received.
    StatusCallback optional The URL to request to pass status updates to.
    StatusCallbackMethod optional Whether the request to StatusCallback is a GET or a POST. Default is POST.
    TrunkSid optional The unique identifier for the Trunk associated with this phone number.
    VoiceApplicationSid optional The unique identifier for the application associated with call handling on this phone number. If VoiceApplicationSid is present, the URLs on the application will be used and all other URLs will be ignored.
    VoiceCallerIdLookup optional Whether or not to look up a caller's name in the database. Possible values are true or false.
    VoiceFallbackMethod optional Whether the request to VoiceFallbackUrl is a GET or a POST. Default is POST.
    VoiceFallbackUrl optional The URL to request if errors occur when fetching Url.
    VoiceMethod optional Whether the request to Url is a GET or a POST. Default is POST.
    VoiceReceiveMode optional Whether this number can receive calls or fax. Possible values are voice or fax. Default is voice.
    VoiceUrl optional The URL to request when a phone number receives a call or fax.

    Retrieve an IncomingPhoneNumber

    Retrieve an IncomingPhoneNumber

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{IncomingPhoneNumberSid}.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.incomingPhoneNumbers('IncomingPhoneNumberSid')
          .fetch()
          .then(incoming_phone_number => console.log(incoming_phone_number.friendlyName))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var incomingPhoneNumber = IncomingPhoneNumberResource.Fetch(
                pathSid: "IncomingPhoneNumberSid"
            );
    
            Console.WriteLine(incomingPhoneNumber.FriendlyName);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    incoming_phone_number = client \
        .incoming_phone_numbers('IncomingPhoneNumberSid') \
        .fetch()
    
    print(incoming_phone_number.friendly_name)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    incoming_phone_number = @client
      .incoming_phone_numbers('IncomingPhoneNumberSid')
      .fetch
    
    puts incoming_phone_number.friendly_name
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $incoming_phone_number = $client->incomingPhoneNumbers("IncomingPhoneNumberSid")
                                      ->fetch();
    
      print($incoming_phone_number->friendlyName);
    <?
    

    Response 200 OK

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
      "address_requirements": "none",
      "address_sid": "b3877c40-da60-4998-90ad-b792e98472ad",
      "api_version": "2010-04-01",
      "beta": false,
      "capabilities": {
        "mms": true,
        "sms": false,
        "voice": true
      },
      "date_created": "Tue, 25 Sept 2018 23:00:00 +0000",
      "date_updated": "Wed, 26 Sept 2018 22:00:00 +0000",
      "emergency_address_sid": null,
      "emergency_status": "Inactive",
      "friendly_name": "310-338-6745",
      "identity_sid": "b3877c40-da60-4998-90ad-b792e98472ri",
      "origin": "origin",
      "phone_number": "+13103386745",
      "sid": "b3877c40-da60-4998-90ad-b792e98472pn",
      "sms_application_sid": null,
      "sms_fallback_method": "POST",
      "sms_fallback_url": "",
      "sms_method": "POST",
      "sms_url": "",
      "status_callback": "",
      "status_callback_method": "POST",
      "trunk_sid": "b3877c40-da60-4998-90ad-b792e98472tr",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/IncomingPhoneNumbers/b3877c40-da60-4998-90ad-b792e98472pn.json",
      "voice_application_sid": null,
      "voice_caller_id_lookup": false,
      "voice_fallback_method": "POST",
      "voice_fallback_url": null,
      "voice_method": "GET",
      "voice_url": "http://your-application.com/docs/voice.xml"
    }
    

    Retrieve a single IncomingPhoneNumber.

    Parameter
    AccountSid required The unique identifier of the account associated with this phone number.
    Sid required The unique identifier of the incoming phone number.

    List All IncomingPhoneNumbers

    List All IncomingPhoneNumbers

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.incomingPhoneNumbers.each(incomingPhoneNumbers => console.log(incomingPhoneNumbers.sid));
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var incomingPhoneNumbers = IncomingPhoneNumberResource.Read();
    
            foreach(var record in incomingPhoneNumbers)
            {
               Console.WriteLine(record.Sid);
            }
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    incoming_phone_numbers = client.incoming_phone_numbers.list()
    
    for record in incoming_phone_numbers:
        print(record.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    incoming_phone_numbers = @client.incoming_phone_numbers.list
    
    incoming_phone_numbers.each do |record|
      puts record.sid
    end
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $incomingPhoneNumbers = $client->incomingPhoneNumbers
                                     ->read();
    
      foreach ($incomingPhoneNumbers as $record) {
          print($record->sid);
      }
    ?>
    

    Response 200 OK

    {
      "end": 0,
      "first_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/IncomingPhoneNumbers.json?PageSize=1&Page=0",
      "incoming_phone_numbers": [
        {
          "account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
          "address_requirements": "none",
          "address_sid": "b3877c40-da60-4998-90ad-b792e98472ad",
          "api_version": "2010-04-01",
          "beta": false,
          "capabilities": {
            "mms": true,
            "sms": false,
            "voice": true
          },
          "date_created": "Tue, 25 Sept 2018 23:00:00 +0000",
          "date_updated": "Wed, 26 Sept 2018 22:00:00 +0000",
          "emergency_address_sid": null,
          "emergency_status": "Inactive",
          "friendly_name": "310-338-6745",
          "identity_sid": "b3877c40-da60-4998-90ad-b792e98472ri",
          "origin": "origin",
          "phone_number": "+13103386745",
          "sid": "b3877c40-da60-4998-90ad-b792e98472pn",
          "sms_application_sid": null,
          "sms_fallback_method": "POST",
          "sms_fallback_url": "",
          "sms_method": "POST",
          "sms_url": "",
          "status_callback": "",
          "status_callback_method": "POST",
          "trunk_sid": "b3877c40-da60-4998-90ad-b792e98472tr",
          "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/IncomingPhoneNumbers/b3877c40-da60-4998-90ad-b792e98472pn.json",
          "voice_application_sid": null,
          "voice_caller_id_lookup": false,
          "voice_fallback_method": "POST",
          "voice_fallback_url": null,
          "voice_method": "GET",
          "voice_url": "http://your-application.com/docs/voice.xml"
        }
      ],
      "last_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/IncomingPhoneNumbers.json?PageSize=1&Page=2",
      "next_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/IncomingPhoneNumbers.json?PageSize=1&Page=1",
      "num_pages": 3,
      "page": 0,
      "page_size": 1,
      "previous_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/IncomingPhoneNumbers.json?PageSize=1&Page=0",
      "start": 0,
      "total": 3,
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/IncomingPhoneNumbers.json?PageSize=1",
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472ac"
    }
    

    The ability to read all of the IncomingPhoneNumbers that are associated with your SignalWire account. This will be returned as a list of IncomingPhoneNumbers.

    Parameter
    AccountSid required The unique identifier of the account associated with this phone number.
    Beta optional Shows new SignalWire numbers. Possible values are true or false. Default is true.
    FriendlyName optional Shows numbers that exactly match the provided friendly name.
    Origin optional Shows numbers that have the provided origin. SignalWire numbers are denoted as signalwire while hosted numbers are denoted as hosted.
    PhoneNumber optional Shows the numbers that exactly match the provided pattern.

    Update an IncomingPhoneNumber

    Update an IncomingPhoneNumber

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{IncomingPhoneNumberSid}.json \
      -X POST \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.incomingPhoneNumbers('IncomingPhoneNumberSid')
          .update()
          .then(incoming_phone_number => console.log(incoming_phone_number.friendlyName))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var incomingPhoneNumber = IncomingPhoneNumberResource.Update(
                accountSid: "YourProjectID",
                pathSid: "IncomingPhoneNumberSid"
            );
    
            Console.WriteLine(incomingPhoneNumber.FriendlyName);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    incoming_phone_number = client \
        .incoming_phone_numbers('IncomingPhoneNumberSid') \
        .update()
    
    print(incoming_phone_number.friendly_name)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    incoming_phone_number = @client
      .incoming_phone_numbers('IncomingPhoneNumberSid')
      .update()
    
    puts incoming_phone_number.friendly_name
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $incoming_phone_number = $client->incomingPhoneNumbers("IncomingPhoneNumberSid")
                                      ->update();
    
      print($incoming_phone_number->friendlyName);
    ?>
    

    Allows you to modify the properties of an incoming phone number.

    Parameter
    AccountSid required The unique identifier of the account associated with this phone number.
    AddressSid optional The unique identifier for the address associated with this phone number.
    EmergencyAddressSid optional The unique identifier of the address to be used for E911.
    FriendlyName optional The formatted version of the phone number.
    IdentitySid optional The unique identifier for the identity associated with this phone number.
    SmsApplicationSid optional The unique identifier for the application associated with SMS handling on this phone number. If SmsApplicationSid is present, the URLs on the application will be used and all other URLs will be ignored.
    SmsFallbackMethod optional Whether the request to SmsFallbackUrl is a GET or a POST. Default is POST.
    SmsFallbackUrl optional The URL to request if errors occur when fetching SmsUrl.
    SmsMethod optional Whether the request to SmsUrl is a GET or a POST. Default is POST.
    SmsUrl optional The URL to request when an incoming SMS is received.
    StatusCallback optional The URL to request to pass status updates to.
    StatusCallbackMethod optional Whether the request to StatusCallback is a GET or a POST. Default is POST.
    TrunkSid optional The unique identifier for the Trunk associated with this phone number.
    VoiceApplicationSid optional The unique identifier for the application associated with call handling on this phone number. If VoiceApplicationSid is present, the URLs on the application will be used and all other URLs will be ignored.
    VoiceCallerIdLookup optional Whether or not to look up a caller's name in the database. Possible values are true or false.
    VoiceFallbackMethod optional Whether the request to VoiceFallbackUrl is a GET or a POST. Default is POST.
    VoiceFallbackUrl optional The URL to request if errors occur when fetching Url.
    VoiceMethod optional Whether the request to Url is a GET or a POST. Default is POST.
    VoiceReceiveMode optional Whether this number can receive calls or fax. Possible values are voice or fax. Default is voice.
    VoiceUrl optional The URL to request when a phone number receives a call or fax.

    Example: Update an IncomingPhoneNumber's VoiceUrl

    Update an IncomingPhoneNumber's VoiceUrl

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{IncomingPhoneNumberSid}.json \
      -X POST \
      --data-urlencode "AccountSid=b3877c40-da60-4998-90ad-b792e98472ac" \
      --data-urlencode "VoiceUrl=http://your-application.com/docs/voice.xml" \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.incomingPhoneNumbers('IncomingPhoneNumberSid')
          .update({
             accountSid: 'b3877c40-da60-4998-90ad-b792e98472ac',
             voiceUrl: 'http://your-application.com/docs/voice.xml'
           })
          .then(incoming_phone_number => console.log(incoming_phone_number.friendlyName))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var incomingPhoneNumber = IncomingPhoneNumberResource.Update(
                accountSid: "b3877c40-da60-4998-90ad-b792e98472ac",
                voiceUrl: new Uri("http://your-application.com/docs/voice.xml"),
                pathSid: "IncomingPhoneNumberSid"
            );
    
            Console.WriteLine(incomingPhoneNumber.FriendlyName);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    incoming_phone_number = client \
        .incoming_phone_numbers('IncomingPhoneNumberSid') \
        .update(
             voice_url='http://your-application.com/docs/voice.xml',
             account_sid='b3877c40-da60-4998-90ad-b792e98472ac'
         )
    
    print(incoming_phone_number.friendly_name)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    incoming_phone_number = @client
      .incoming_phone_numbers('IncomingPhoneNumberSid')
      .update(
         account_sid: 'b3877c40-da60-4998-90ad-b792e98472ac',
         voice_url: 'http://your-application.com/docs/voice.xml'
       )
    
    puts incoming_phone_number.friendly_name
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $incoming_phone_number = $client->incomingPhoneNumbers("IncomingPhoneNumberSid")
                                      ->update(array(
                                                   "voiceUrl" => "http://your-application.com/docs/voice.xml"
                                               )
                                      );
    
      print($incoming_phone_number->friendlyName);
    ?>
    

    Response 200 OK

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
      "address_requirements": "none",
      "address_sid": "b3877c40-da60-4998-90ad-b792e98472ad",
      "api_version": "2010-04-01",
      "beta": false,
      "capabilities": {
        "mms": true,
        "sms": false,
        "voice": true
      },
      "date_created": "Tue, 25 Sept 2018 23:00:00 +0000",
      "date_updated": "Wed, 26 Sept 2018 22:00:00 +0000",
      "emergency_address_sid": null,
      "emergency_status": "Inactive",
      "friendly_name": "310-338-6745",
      "identity_sid": "b3877c40-da60-4998-90ad-b792e98472ri",
      "origin": "origin",
      "phone_number": "+13103386745",
      "sid": "b3877c40-da60-4998-90ad-b792e98472pn",
      "sms_application_sid": null,
      "sms_fallback_method": "POST",
      "sms_fallback_url": "",
      "sms_method": "POST",
      "sms_url": "",
      "status_callback": "",
      "status_callback_method": "POST",
      "trunk_sid": "b3877c40-da60-4998-90ad-b792e98472tr",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/IncomingPhoneNumbers/b3877c40-da60-4998-90ad-b792e98472pn.json",
      "voice_application_sid": null,
      "voice_caller_id_lookup": false,
      "voice_fallback_method": "POST",
      "voice_fallback_url": null,
      "voice_method": "GET",
      "voice_url": "http://your-application.com/docs/voice.xml"
    }
    

    Update the URL that SignalWire will request when a call to your account is received.

    Delete an IncomingPhoneNumber

    Delete an IncomingPhoneNumber

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{IncomingPhoneNumberSid}.json \
      -X DELETE \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.incomingPhoneNumbers('IncomingPhoneNumberSid')
          .remove()
          .then(incoming_phone_number => console.log(incoming_phone_number.sid))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            IncomingPhoneNumberResource.Delete(pathSid: "IncomingPhoneNumberSid");
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    client.incoming_phone_numbers('IncomingPhoneNumberSid').delete()
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    @client.incoming_phone_numbers('IncomingPhoneNumberSid').delete
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $client->incomingPhoneNumbers("IncomingPhoneNumberSid")
             ->delete();
    ?>
    

    Response 204 No Content

    Delete an IncomingPhoneNumber. If the delete is successful, a 204 response, with no body, will be returned.

    Parameter
    No Parameters

    LāML Bins

    LāML Bins are our serverless hosted service that allows you to easily serve static documents without setting up any infrastructure.

    The Compatibility XML Bin Object

    Example response of a Compatibility XML Bin

    {
      "sid": "5184b831-184f-4209-872d-ccdccc80f2f1",
      "date_created": "2019-11-26T20:00:00Z",
      "date_updated": "2020-05-05T20:00:00Z",
      "date_last_accessed": "2020-06-05T20:00:00Z",
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "name": "Death Star IVR",
      "contents": "<Response><Say>Hello!</Say></Response>",
      "request_url": "https://your-space.signalwire.com/laml-bins/5184b831-184f-4209-872d-ccdccc80f2f1",
      "num_requests": 1337,
      "api_version": "2010-04-01",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/LamlBins/5184b831-184f-4209-872d-ccdccc80f2f1",
    }
    
    Attribute
    sid string The unique identifier of the Compatibility XML Bin on SignalWire. This can be used to show, update, or delete the Bin programmatically.
    date_created string The date and time, in ISO 8601 format, the Bin was created.
    date_updated string The date and time, in ISO 8601 format, the Bin was updated.
    date_last_accessed string The date and time, in ISO 8601 format, the Bin was last accessed.
    account_sid string The unique identifier for the account this Bin is associated with.
    name string A friendly name given to the Compatibility XML Bin to help distinguish and search for different Bins within your project.
    contents string The contents of the Bin, this evaluate to valid XML, with additional support for mustache templating. You can read more about Compatibility XML in our documentation.
    request_url string The unique URL to the raw contents of the Compatibility XML Bin. Use this as the URL for configuring webhooks or anything needing the XML returned.
    num_requests int The number of times this Bin has been accessed.
    api_version string The version of the SignalWire API.
    uri string The URL of this resource.

    Create a Compatibility XML Bin

    POST /laml_bins

    curl https://your-space.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/LamlBins.JSON \
      -X POST \
      -u 'YourProjectID:YourAuthToken' \
      --data-urlencode "Name=Death Star IVR" \
      --data-urlencode "Contents=<Response><Say>Hello, welcome to the Death Star. Your call is very important to us.</Say><Hangup /></Response>"
    

    Response 201 CREATED

    {
      "sid": "5184b831-184f-4209-872d-ccdccc80f2f1",
      "date_created": "2019-11-26T20:00:00Z",
      "date_updated": "2020-05-05T20:00:00Z",
      "date_last_accessed": null,
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "name": "Death Star IVR",
      "contents": "<Response><Say>Hello, welcome to the Death Star. Your call is very important to us.</Say><Hangup /></Response>",
      "request_url": "https://your-space.signalwire.com/laml-bins/5184b831-184f-4209-872d-ccdccc80f2f1",
      "num_requests": 0,
      "api_version": "2010-04-01",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/LamlBins/5184b831-184f-4209-872d-ccdccc80f2f1",
    }
    

    To create a new Compatibility XML Bin, make a POST request to the Compatibility XML Bin resource.

    Parameter
    Name required A friendly name given to the Compatibility XML Bin to help distinguish and search for different Bins within your project.
    Contents optional The contents of the Compatibility XML Bin - if not provided, it will be created with the default contents: <?xml version="1.0" encoding="UTF-8"?>\n<Response>\n</Response>

    Retrieve a Compatibility XML Bin

    GET /laml_bins/{ID}

    curl https://your-space.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/LamlBins/5184b831-184f-4209-872d-ccdccc80f2f1 \
      -u 'YourProjectID:YourAuthToken'
    

    Response 200 OK

    {
      "sid": "5184b831-184f-4209-872d-ccdccc80f2f1",
      "date_created": "2019-11-26T20:00:00Z",
      "date_updated": "2020-05-05T20:00:00Z",
      "date_last_accessed": null,
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "name": "Death Star IVR",
      "contents": "<Response><Say>Hello, welcome to the Death Star. Your call is very important to us.</Say><Hangup /></Response>",
      "request_url": "https://your-space.signalwire.com/laml-bins/5184b831-184f-4209-872d-ccdccc80f2f1",
      "num_requests": 0,
      "api_version": "2010-04-01",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/LamlBins/5184b831-184f-4209-872d-ccdccc80f2f1",
    }
    

    Retrieves the details of a Laml Bin that has been previously created. Use the unique ID that was returned from your previous request to identify the specific instance.

    Parameter
    None

    Update a Compatibility XML Bin

    POST /laml_bins

    curl https://your-space.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/LamlBins/5184b831-184f-4209-872d-ccdccc80f2f1 \
      -X POST \
      -u 'YourProjectID:YourAuthToken' \
      --data-urlencode "Name=Hoth IVR"
    

    Response 200 OK

    {
      "sid": "5184b831-184f-4209-872d-ccdccc80f2f1",
      "date_created": "2019-11-26T20:00:00Z",
      "date_updated": "2020-05-05T20:00:00Z",
      "date_last_accessed": null,
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
      "name": "Hoth IVR",
      "contents": "<Response><Say>Hello, welcome to the Death Star. Your call is very important to us.</Say><Hangup /></Response>",
      "request_url": "https://your-space.signalwire.com/laml-bins/5184b831-184f-4209-872d-ccdccc80f2f1",
      "num_requests": 0,
      "api_version": "2010-04-01",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/LamlBins/5184b831-184f-4209-872d-ccdccc80f2f1",
    }
    

    To update a Compatibility XML Bin, make a PUT request to the Compatibility XML Bin resource. Use the unique ID that was returned from your previous request to identify the specific instance. Only parameters passed in will be updated, others will be ignored.

    Parameter
    Name optional A friendly name given to the Compatibility XML Bin to help distinguish and search for different Bins within your project.
    Contents optional The contents of the Compatibility XML Bin - if not provided, it will be created with the default contents: <?xml version="1.0" encoding="UTF-8"?>\n<Response>\n</Response>

    Delete a Compatibility XML Bin

    DELETE /laml_bins/{ID}

    curl https://your-space.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/LamlBins/5184b831-184f-4209-872d-ccdccc80f2f1 \
      -X DELETE \
      -u 'YourProjectID:YourAuthToken'
    

    Response 204 No Content

    To remove a Compatibility XML Bin from your Project. Use the unique ID that was returned from your previous request to identify the specific instance.

    Parameter
    None

    List all Compatibility XML Bins

    GET /laml_bins

    curl https://your-space.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/LamlBins?Name=Star \
      -u 'YourProjectID:YourAuthToken'
    

    Response 200 OK

    {
      "meta": {
        "first_page_url": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/LamlBins?PageSize=50&Page=0",
        "key": "faxes",
        "next_page_url": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/LamlBins?PageSize=50&Page=1",
        "page": 0,
        "page_size": 50,
        "previous_page_url": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/LamlBins?PageSize=50&Page=0",
        "url": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/LamlBins?PageSize=50&Page=0"
      },
      "laml_bins" : [
        {
          "sid": "5184b831-184f-4209-872d-ccdccc80f2f1",
          "date_created": "2019-11-26T20:00:00Z",
          "date_updated": "2020-05-05T20:00:00Z",
          "date_last_accessed": "2020-06-05T20:00:00Z",
          "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
          "name": "Death Star IVR",
          "contents": "<Response><Say>Hello, welcome to the Death Star. Your call is very important to us.</Say><Hangup /></Response>",
          "request_url": "https://your-space.signalwire.com/laml-bins/5184b831-184f-4209-872d-ccdccc80f2f1",
          "num_requests": 1337,
          "api_version": "2010-04-01",
          "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/LamlBins/5184b831-184f-4209-872d-ccdccc80f2f1",
        },
        {...},
        {...}
      ]
    }
    

    Returns a list of your Addresses. The addresses are returned sorted by creation date, with the most recent appearing first.

    Parameter
    Name optional The name given to the Compatibility XML Bin to distinguish different Bins within your project. Will return all Compatibility XML Bins containing this value as a substring.

    Messages

    A Message is an inbound or outbound message sent or received by your SignalWire project. Messages are identified by a unique, random ID, and can have attachments, called Media, associated with them. These Media files are managed separately from the Messages themselves, and are stored in Media subresource objects. To retrieve a list of the media associated with a message, use the Media subresource for that Message instance.

    The Message Object

    A sample message returned from the API.

    {
      "account_sid": "ea108133-d6b3-407c-9536-9fad8a929a6a",
      "api_version": "2010-04-01",
      "body": "Hello World!",
      "num_segments": 1,
      "num_media": 1,
      "date_created": "Mon, 13 Aug 2018 21:38:46 +0000",
      "date_sent": null,
      "date_updated": "Mon, 13 Aug 2018 21:38:46 +0000",
      "direction": "outbound-api",
      "error_code": null,
      "error_message": null,
      "from": "+15551234567",
      "price": 0.005,
      "price_unit": "USD",
      "sid": "0a059168-ead0-41af-9d1f-343dae832527",
      "status": "queued",
      "to": "+15557654321",
      "messaging_service_sid": null,
      "uri": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/0a059168-ead0-41af-9d1f-343dae832527",
      "subresource_uris": {
        "media": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/0a059168-ead0-41af-9d1f-343dae832527/Media"
      }
    }
    
    
    Attribute
    account_sid string The unique identifier of the project that sent or received this message.
    api_version string The version number of the SignalWire Compatibility REST API used to handle this message.
    body string The text of the message. Up to 1600 characters long and can be null if no message was sent.
    date_created datetime The date and time the message was created in RFC 2822 format.
    date_sent datetime The date and time the message was sent in RFC 2822 format.
    date_updated datetime The date and time the message was last updated in RFC 2822 format.
    direction string The direction of the message:
    • inbound for incoming messages.
    • outbound-api for messages created via the REST API.
    • outbound-call for messages created during a call.
    • outbound-reply for messages created in response to an inbound message.
    error_code string If an error has occurred on the message, the error code will give you a specific code to help lookup more information on the failure. If no error occurred, error_code will be null.
    error_message string A human readable description of the error that occurred. If no error occurred, error_message will be null.
    from string The phone number in E.164 format. For inbound messages, this will be the remote phone number who sent the message. For outbound messages, this will be one of your SignalWire phone numbers.
    messaging_service_sid string If a number group was used when sending an outbound message, the number group's ID will be present. If no number group was used, the value will be null.
    num_media integer The number of media files that were included with the message.
    num_segments integer The number of segments that make up the entire message. If the body of the message is larger than 160 GSM-7 characters or 70 UCS-2 characters, it will automatically be broken up into smaller messages and annotated to attempt proper reconstruction on the recipient handset. Not all carriers and handsets support this. SignalWire will recombine inbound messages into a single message. Your project will be charged for each segment sent or received.
    price decimal The cost of the individual message billed to your project.
    price_unit string The currency in which price is charged as.
    sid string A unique ID that identifies this specific message.
    status string Current status of the message. See Message Status for a detailed description of each status.
    subresource_uris object The URIs for any subresources associated with this message.
    to string The phone number in E.164 format that received the message. For inbound messages, this is one of your SignalWire phone numbers; for outbound messages, this is the remote phone number that received the message.
    uri string The URI of this particular message.

    Message Status

    The status attribute of a Message indicates the last known state of the Message.

    State
    queued The API request to send this message was processed successfully, and the message is currently waiting to be sent out.
    sending The message is currently being transmitted by SignalWire to the nearest carrier upstream in the network.
    sent The nearest carrier upstream in the network has accepted the message.
    delivered Confirmation of receipt of the message by the nearest carrier upstream in the network.
    undelivered SignalWire has received notice from the nearest carrier upstream in the network that the message was not delivered.
    failed SignalWire could not send the message. There is no charge for failed messages.
    receiving SignalWire has received and is currently processing an inbound message.
    received The message has been received by one of the numbers in your account. Applies to inbound messages only.

    Create a message

    Send an SMS message

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Messages.json \
      -X POST \
      --data-urlencode "From=+15551234567" \
      --data-urlencode "Body=Hello World\!" \
      --data-urlencode "To=+15557654321" \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.messages
          .create({from: '+15551234567', body: 'Hello World!', to: '+15557654321'})
          .then(message => console.log(message.sid))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var message = MessageResource.Create(
                from: new Twilio.Types.PhoneNumber("+15551234567"),
                body: "Hello World!",
                to: new Twilio.Types.PhoneNumber("+15557654321")
            );
    
            Console.WriteLine(message.Sid);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    message = client.messages.create(
                                  from_='+15551234567',
                                  body='Hello World!',
                                  to='+15557654321'
                              )
    
    print(message.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    message = @client.messages.create(
                                 from: '+15551234567',
                                 body: 'Hello World!',
                                 to: '+15557654321'
                               )
    
    puts message.sid
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $message = $client->messages
                        ->create("+15557654321", // to
                                 array("from" => "+15551234567", "body" => "Hello World!")
                        );
    
      print($message->sid);
    ?>
    

    Response 201 CREATED

    {
        "account_sid": "ea108133-d6b3-407c-9536-9fad8a929a6a",
        "api_version": "2010-04-01",
        "body": "Hello World",
        "num_segments": 1,
        "num_media": 0,
        "date_created": "Mon, 13 Aug 2018 23:08:35 +0000",
        "date_sent": null,
        "date_updated": "Mon, 13 Aug 2018 23:08:35 +0000",
        "direction": "outbound-api",
        "error_code": null,
        "error_message": null,
        "from": "+15551234567",
        "price": null,
        "price_unit": "USD",
        "sid": "b3877c40-da60-4998-90ad-b792e98472af",
        "status": "queued",
        "to": "+15557654321",
        "messaging_service_sid": null,
        "uri": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/b3877c40-da60-4998-90ad-b792e98472af",
        "subresource_uris": {
            "media": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/b3877c40-da60-4998-90ad-b792e98472af/Media"
        }
    }
    

    Send an outbound message from one of your SignalWire phone numbers.

    Parameter
    To required The recipient of the outbound message formatted in E.164 format.
    From required One of your SignalWire phone numbers or short codes used as the sender of the message. You must use one of your project's phone numbers or short codes that you have purchased from SignalWire and which are capable of messaging.
    Body required*if MediaUrl is not present The body of the message you want to send, up to a maximum of 1600 characters per message.
    MediaUrl required*if Body is not present URL of media you wish to attach and send with the message. Include multiple MediaUrl arguments if you which to send more than one media per message, up to a maximum of 10 media URLs per message. There is a limit of 5MB for the total combined media size per message. See the MIME Types section for a full list of content types supported by SignalWire.
    ApplicationSid optional The SID of a SignalWire Compatibility application used to configure the message's MessageStatusCallback attribute. If ApplicationSid and StatusCallback are specified, StatusCallback will take precedence.
    MaxPrice optional The maximum price in USD acceptable for the message to be sent. Once your message is queued, the cost to send the message is calculated and if it is greater than MaxPrice, the message will be set as failed and not sent. You will not be charged. If MaxPrice is not set, all messages will be sent. The price can have a maximum of four decimal places, i.e. 0.0075.
    StatusCallback optional A URL endpoint to receive callbacks each time the status of the message changes from queued, failed, sent, delivered or undelivered. See detailed information on the status callback parameters sent during the callback.
    ValidityPeriod optional The number of seconds a message will allow being queued before canceling. When sending high volume of messages, messages can sit in your sending queue. If the message should only be sent in in a specific timeframe, use ValidityPeriod to ensure you don't send messages after time-sensitive operations. It is not recommended to set a validity period of less than 5 seconds. Default value is 14400
    MessagingServiceSid optional The ID of a SignalWire Number Group to be used to automatically choose the best number from the number group to improve deliverability and optimize throughput. Only From or MessagingServiceSid need be set. If MessagingServiceSid is set, it will take precedence over any value of From.

    Retrieve a message

    Retrieve a message

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.messages('MessageSid')
          .fetch()
          .then(message => console.log(message.to))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var message = MessageResource.Fetch(pathSid: "MessageSid");
    
            Console.WriteLine(message.To);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    message = client.messages('MessageSid').fetch()
    
    print(message.to)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    message = @client.messages('MessageSid').fetch
    
    puts message.to
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $message = $client->messages("MessageSid")
                        ->fetch();
    
      print($message->to);
    ?>
    

    Response 200 OK

    {
        "account_sid": "ea108133-d6b3-407c-9536-9fad8a929a6a",
        "api_version": "2010-04-01",
        "body": "Hello World",
        "num_segments": 1,
        "num_media": 0,
        "date_created": "Mon, 13 Aug 2018 23:08:35 +0000",
        "date_sent": "Mon, 13 Aug 2018 23:08:40 +0000",
        "date_updated": "Mon, 13 Aug 2018 23:08:35 +0000",
        "direction": "outbound-api",
        "error_code": null,
        "error_message": null,
        "from": "+15551234567",
        "price": 0.005,
        "price_unit": "USD",
        "sid": "b3877c40-da60-4998-90ad-b792e98472af",
        "status": "delivered",
        "to": "+15557654321",
        "messaging_service_sid": null,
        "uri": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/b3877c40-da60-4998-90ad-b792e98472af",
        "subresource_uris": {
            "media": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/b3877c40-da60-4998-90ad-b792e98472af/Media"
        }
    }
    

    Retrieve a single message.

    Parameter
    No Parameters

    Update a message

    Update a message's body

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}.json \
      -X POST \
      --data-urlencode "Body=Overridden" \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.messages('MessageSid')
          .update({body: 'Overridden'})
          .then(message => console.log(message.to))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var message = MessageResource.Update(
                body: "Overridden",
                pathSid: "MessageSid"
            );
    
            Console.WriteLine(message.To);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    message = client.messages('MessageSid') \
                    .update(body='Overridden')
    
    print(message.to)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    message = @client.messages('MMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                     .update(body: 'Overridden')
    
    puts message.to
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $message = $client->messages("MessageSid")
                        ->update(array("body" => "Overridden"));
    
      print($message->to);
    ?>
    

    Response 200 OK

    {
        "account_sid": "ea108133-d6b3-407c-9536-9fad8a929a6a",
        "api_version": "2010-04-01",
        "body": "Overridden",
        "num_segments": 1,
        "num_media": 0,
        "date_created": "Mon, 13 Aug 2018 23:08:35 +0000",
        "date_sent": "Mon, 13 Aug 2018 23:08:40 +0000",
        "date_updated": "Mon, 13 Aug 2018 23:08:45 +0000",
        "direction": "outbound-api",
        "error_code": null,
        "error_message": null,
        "from": "+15551234567",
        "price": 0.005,
        "price_unit": "USD",
        "sid": "b3877c40-da60-4998-90ad-b792e98472af",
        "status": "delivered",
        "to": "+15557654321",
        "messaging_service_sid": null,
        "uri": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/b3877c40-da60-4998-90ad-b792e98472af",
        "subresource_uris": {
            "media": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/b3877c40-da60-4998-90ad-b792e98472af/Media"
        }
    }
    

    Update a message body after it has been sent. Useful for removing sensitive information from the body after the message has been received.

    Parameter
    Body required The new text with which to replace the body.

    Example: Redact a message

    Redact a message body

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}.json \
      -X POST \
      --data-urlencode "Body=" \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.messages('MessageSid')
          .update({body: ''})
          .then((message) => process.stdout.write(message.body));
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            const string sid = "MessageSid";
            var message = MessageResource.Update(sid, "");
    
            Console.WriteLine(message.Body);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    client.messages("MessageSid") \
          .update(body="")
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    @message = @client.api.messages('MessageSid').fetch
    
    @message.update(body: '')
    
    puts @message.body
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $message = $client
          ->messages("MessageSid")
          ->update(
              array("body" => "")
          );
    ?>
    

    Redact a message body by posting an empty string as the body to a sent message.

    Delete a message

    Delete a message.

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}.json \
      -X DELETE \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.messages('MessageSid')
          .remove()
          .then(message => console.log(message.sid))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            MessageResource.Delete(pathSid: "MessageSid");
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    client.messages('MessageSid').delete()
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    @client.messages('MessageSid').delete
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $client->messages("MessageSid")
             ->delete();
    ?>
    

    Response 204 No Content

    Delete a message from your project so it no longer appears in the dashboard or on the API. Any Media files that may be associated with this message are not deleted, and will still be available for access in the usual methods.

    Messages in progress may not be deleted, and attempting to do so results in an error.

    Parameter
    No Parameters

    List all messages

    List all messages on your account

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Messages.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.messages.each(messages => console.log(messages.sid));
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var messages = MessageResource.Read();
    
            foreach(var record in messages)
            {
               Console.WriteLine(record.Sid);
            }
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    messages = client.messages.list()
    
    for record in messages:
        print(record.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    messages = @client.messages.list
    
    messages.each do |record|
      puts record.sid
    end
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $messages = $client->messages
                         ->read();
    
      foreach ($messages as $record) {
          print($record->sid);
      }
    ?>
    

    Response 200 OK

    {
      "uri": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages?Page=0&PageSize=50",
      "first_page_uri": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages?Page=0&PageSize=50",
      "next_page_uri": null,
      "previous_page_uri": null,
      "page": 0,
      "page_size": 50,
      "messages": [
        {
          "account_sid": "ea108133-d6b3-407c-9536-9fad8a929a6a",
          "api_version": "2010-04-01",
          "body": "Hello World",
          "num_segments": 1,
          "num_media": 0,
          "date_created": "Mon, 13 Aug 2018 23:08:35 +0000",
          "date_sent": "Mon, 13 Aug 2018 23:08:40 +0000",
          "date_updated": "Mon, 13 Aug 2018 23:08:40 +0000",
          "direction": "outbound-api",
          "error_code": null,
          "error_message": null,
          "from": "+15551234567",
          "price": 0.005,
          "price_unit": "USD",
          "sid": "b3877c40-da60-4998-90ad-b792e98472af",
          "status": "delivered",
          "to": "+15557654321",
          "messaging_service_sid": null,
          "uri": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/b3877c40-da60-4998-90ad-b792e98472af",
          "subresource_uris": {
            "media": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/b3877c40-da60-4998-90ad-b792e98472af/Media"
          }
        }
      ]
    }
    

    Returns a paged list of messages sorted with the most recent messages appearing first.

    Parameter
    DateSent optional Only return messages sent on this particular date, formatted as YYYY-MM-DD in UTC. You can also append < or > to return a range of messages. For example, use DateSent< to return messages sent on or before midnight of the date, or DateSent> to return messages sent on or after midnight of the date.
    From optional Only return messages sent from this phone number.
    To optional Only return messages sent to this phone number.
    Status optional Only return messages that currently have the specified status.
    PageSize optional Specify the number of results to return on a single page. The default page size is 50 and the maximum is 1000.

    Example: Filter By Date and From

    Filter Messages

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Messages.json?From=%2b15551234567&DateSent>=2018-08-01 \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.messages.each({ dateSent: new Date(Date.UTC(2018, 8, 1, 0, 0, 0)), from: '+15551234567' },
                          messages => console.log(messages.sid)
                        );
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var messages = MessageResource.Read(
                dateSent: new DateTime(2018, 8, 1, 0, 0, 0),
                from: new Twilio.Types.PhoneNumber("+15551234567")
            );
    
            foreach(var record in messages)
            {
               Console.WriteLine(record.Sid);
            }
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    messages = client.messages.list(
                                   date_sent=datetime(2018, 8, 1, 0, 0),
                                   from_='+15551234567'
                               )
    
    for record in messages:
        print(record.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    messages = @client.messages.list(
                                  date_sent: Date.new(2018, 8, 1),
                                  from: '+15551234567'
                                )
    
    messages.each do |record|
      puts record.sid
    end
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $messages = $client->messages
                         ->read(array(
                                    "dateSent" => new \DateTime('2018-8-1'),
                                    "from" => "+15551234567"
                                )
                         );
    
      foreach ($messages as $record) {
          print($record->sid);
      }
    ?>
    

    Filter your messages, returning only those sent from +15551234567 on or after 2018-08-01.

    Subresources : Media

    Any media associated with a message can be listed using the media URI in the Subresources object:

    https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media

    StatusCallback Parameters

    In addition to the standard request parameters, the following are parameters passed back to your application when SignalWire sends an update to a message's StatusCallback URL.

    Parameter
    MessageStatus string The current status of the message at the time of the callback.
    ErrorCode string If your message has failed or is undelivered, the error code may provide you with more information about what went wrong.

    Media

    The Media object represents a single attachment or media file that is associated with a Message.

    To simplify sharing of the media files with external applications, the URLs to the files themselves are made publicly accessible. These URLs are random, long and hard to guess, so the contents of the media should stay private unless you choose to distribute the URL. This means that these URLS can be included in any web application to access the files without needing your credentials.

    A media object is created when an incoming message is received, or an outgoing message is created, that contain one or more attachments.

    The Media Object

    A sample media object from the API.

    {
      "sid": "b51dc3c6-df20-4af6-b774-a99de20d3fd8",
      "date_created": "Fri, 15 Jun 2018 17:59:25 +0000",
      "date_updated": "Fri, 15 Jun 2018 17:59:25 +0000",
      "account_sid": "446e9986-0848-4d46-a617-48793c5f5e07",
      "parent_sid": "3338f508-c98c-45a1-b2e3-1a2c345477a8",
      "content_type": "image/jpeg",
      "uri": "/api/laml/2010-04-01/Accounts/446e9986-0848-4d46-a617-48793c5f5e07/Messages/3338f508-c98c-45a1-b2e3-1a2c345477a8/Media/b51dc3c6-df20-4af6-b774-a99de20d3fd8.json"
    }
    
    
    Attribute
    account_sid string The unique identifier of the project that sent or received this message.
    content_type string The mime-type of the media file, for example image/gif.
    date_created datetime The date and time the message was sent in RFC 2822 format.
    date_updated datetime The date and time the message was sent in RFC 2822 format.
    parent_sid string The unique identifier of the resource that created this media resource.
    sid string A unique identifier for this media resource.
    uri string The URI for this resource, relative to your base URL.

    Media Size Restrictions

    All messages, both incoming and outgoing, are limited to 5 MB of associated media files.

    Incoming messages with more than 5 MB of media are not accepted.

    Outgoing messages are allowed a maximum of 10 Media files. If the total size of all Media is greater than 5 MB, the message will return an error code.

    Retrieve a media object

    Retrieve a media instance as JSON representation

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{MediaSid}.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.messages('MessageSid')
          .media('MediaSid')
          .fetch()
          .then(media => console.log(media.contentType))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account.Message;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var media = MediaResource.Fetch(
                pathMessageSid: "MessageSid",
                pathSid: "MediaSid"
            );
    
            Console.WriteLine(media.ContentType);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    media = client.messages('MessageSid') \
                  .media('MediaSid') \
                  .fetch()
    
    print(media.content_type)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    media = @client.messages('MessageSid')
                   .media('MediaSid')
                   .fetch
    
    puts media.content_type
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $media = $client->messages("MessageSid")
                      ->media("MediaSid")
                      ->fetch();
    
      print($media->contentType);
    ?>
    

    Response 200 OK

    {
      "sid": "b51dc3c6-df20-4af6-b774-a99de20d3fd8",
      "date_created": "Fri, 15 Jun 2018 17:59:25 +0000",
      "date_updated": "Fri, 15 Jun 2018 17:59:25 +0000",
      "account_sid": "446e9986-0848-4d46-a617-48793c5f5e07",
      "parent_sid": "3338f508-c98c-45a1-b2e3-1a2c345477a8",
      "content_type": "image/jpeg",
      "uri": "/api/laml/2010-04-01/Accounts/446e9986-0848-4d46-a617-48793c5f5e07/Messages/3338f508-c98c-45a1-b2e3-1a2c345477a8/Media/b51dc3c6-df20-4af6-b774-a99de20d3fd8.json"
    }
    
    

    Retrieve a single media record.

    Parameter
    No Parameters

    A media object can be returned in several representations:

    Direct Media

    Without specifying an extension, the media is returned directly using the mime-type detected.

    JSON

    By appending .json to the media URL, the JSON representation of the media will be returned.

    Delete a media object

    Delete a message.

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{MediaSid}.json \
      -X DELETE \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.messages('MessageSid')
          .media('MediaSid')
          .remove()
          .then(media => console.log(media.sid))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account.Message;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            MediaResource.Delete(
                pathMessageSid: "MessageSid",
                pathSid: "MediaSid"
            );
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    client.messages('MessageSid') \
          .media('MediaSid') \
          .delete()
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    @client.messages('MessageSid')
           .media('MediaSid')
           .delete
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $client->messages("MessageSid")
             ->media("MediaSid")
             ->delete();
    ?>
    

    Response 204 No Content

    Delete a media instance from your project so it no longer appears in the dashboard or on the API.

    Parameter
    No Parameters

    List all media

    List all media from a message

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.messages('MessageSid')
          .media
          .each(media => console.log(media.sid));
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account.Message;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var media = MediaResource.Read(
                pathMessageSid: "MessageSid"
            );
    
            foreach(var record in media)
            {
               Console.WriteLine(record.Sid);
            }
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    media = client.messages('MessageSid').media.list()
    
    for record in media:
        print(record.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    media = @client.messages('MessageSid').media.list
    
    media.each do |record|
      puts record.sid
    end
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $media = $client->messages("MessageSid")
                      ->media
                      ->read();
    
      foreach ($media as $record) {
          print($record->sid);
      }
    ?>
    

    Response 200 OK

    {
      "uri": "/api/laml/2010-04-01/Accounts/446e9986-0848-4d46-a617-48793c5f5e07/Messages/3338f508-c98c-45a1-b2e3-1a2c345477a8/Media?Page=0&PageSize=50",
      "first_page_uri": "/api/laml/2010-04-01/Accounts/446e9986-0848-4d46-a617-48793c5f5e07/Messages/3338f508-c98c-45a1-b2e3-1a2c345477a8/Media?Page=0&PageSize=50",
      "next_page_uri": null,
      "previous_page_uri": null,
      "page": 0,
      "page_size": 50,
      "media_list": [
        {
          "sid": "b51dc3c6-df20-4af6-b774-a99de20d3fd8",
          "date_created": "Fri, 15 Jun 2018 17:59:25 +0000",
          "date_updated": "Fri, 15 Jun 2018 17:59:25 +0000",
          "account_sid": "446e9986-0848-4d46-a617-48793c5f5e07",
          "parent_sid": "3338f508-c98c-45a1-b2e3-1a2c345477a8",
          "content_type": "image/jpeg",
          "uri": "/api/laml/2010-04-01/Accounts/446e9986-0848-4d46-a617-48793c5f5e07/Messages/3338f508-c98c-45a1-b2e3-1a2c345477a8/Media/b51dc3c6-df20-4af6-b774-a99de20d3fd8.json"
        }
      ]
    }
    

    Returns a paged list of media belonging to this message sorted with the most recent media appearing first.

    Parameter
    DateCreated optional Only return media created on this particular date, formatted as YYYY-MM-DD in UTC. You can also append < or > to return a range of media. For example, use DateCreated< to return media created on or before midnight of the date, or DateCreated> to return media created on or after midnight of the date.
    PageSize optional Specify the number of results to return on a single page. The default page size is 50 and the maximum is 1000.

    Recordings

    A Recording represents a recording of a voice or conference call. It allows you to see meta information about the recording as well as access the media file itself.

    Recordings can be initiated using the <Record> verb or by setting the record attribute for Calls or Conferences.

    Properties

    A sample Recording object returned from the API

    {
      "account_sid": "720796a0-8ee9-4350-83bd-2d07a3121f1e",
      "api_version": "2010-04-01",
      "call_sid": "43bb71ee-553f-4074-bb20-8e2747647cce",
      "conference_sid": "2071320d-ee82-4578-84e0-379fb227eb77",
      "channels": 1,
      "date_created": "Tue, 25 Sept 2018 23:00:00 +0000",
      "date_updated": "Wed, 26 Sept 2018 23:00:04 +0000",
      "start_time": "Tue, 25 Sept 2018 23:00:00 +0000",
      "end_time": "Wed, 26 Sept 2018 23:00:04 +0000",
      "price": "-0.0025",
      "price_unit": "USD",
      "duration": "4",
      "sid": "19e436af-5688-4307-b03b-bdb2b42b8142",
      "source": "DialVerb",
      "status": "completed",
      "error_code": null,
      "uri": "/api/laml/2010-04-01/Accounts/720796a0-8ee9-4350-83bd-2d07a3121f1e/Calls/058a869c-d387-4bef-8e62-6b0bc0895bed/Recordings/19e436af-5688-4307-b03b-bdb2b42b8142.json",
      "subresource_uris": {
        "transcriptions": "/api/laml/2010-04-01/Accounts/720796a0-8ee9-4350-83bd-2d07a3121f1e/Recordings/19e436af-5688-4307-b03b-bdb2b42b8142/Transcriptions.json"
      }
    }
    
    Attribute
    account_sid string The unique identifier for the account that is associated with this recording.
    api_version string The version of the SignalWire API.
    call_sid string The unique identifier for the call that is associated with this recording.
    channels integer The number of channels in a recording. Possible values are 1 or 2.
    conference_sid string The unique identifier for the conference that is associated with this recording.
    date_created datetime The date, in RFC 2822 format, this recording was created.
    date_updated datetime The date, in RFC 2822 format, this recording was updated.
    duration string The length, in seconds, of the recording.
    error_code Further details about a failed recording.
    price integer The cost for the recording.
    price_unit string The currency of the price of the recording.
    sid string The unique identifier for the recording.
    source string How the recording was made. Possible values are DialVerb, Conference, OutboundAPI, Trunking, RecordVerb, StartCallRecordingAPI, or StartConferenceRecording.
    start_time datetime The time, in RFC 2822 format, this recording began.
    status string The status of the recording.
    uri string The URI of the recording.

    Create a Recording

    Create a new Recording

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json \
      -X POST \
      -u "YourProjectID:YourAuthToken" \
      --data-urlencode "RecordingChannels=dual" \
      --data-urlencode "RecordingStatusCallbackEvent=completed,in-progress" \
      --data-urlencode "RecordingStatusCallback=http://your-application.com/callback" \
      --data-urlencode "Trim=do-not-trim" \
      --data-urlencode "RecordingTrack=both"
    

    Initiate a Recording for a Call. You can use this endpoint to start recording a Call that is already in progress. If you want to record the entire Call, you can specify recording params during creation of the Call.

    Parameter
    RecordingChannels optional The number of channels in the recording. Can be mono (both legs of call recorded under one channel into one recording file) or dual (each leg of call recorded in separate channels into one recording file).
    RecordingStatusCallback optional The URL to request to when recording is available.
    RecordingStatusCallbackEvent optional The different recording statuses. Possible values are completed, in-progress, and absent. To specify multiple events, separate with a space. Defaults to completed.
    RecordingStatusCallbackMethod optional Whether the request to RecordingStatusCallback URL is a GET or a POST. Default is POST.
    RecordingTrack optional Specifies whether to record the inbound audio to SignalWire from the called party or the outbound audio from SignalWire to the called party or both the inbound and outbound audio. Defaults to both.
    Trim optional Whether leading and trailing silence is trimmed from a recording. Possible values are trim-silence and do-not-trim. Default is do-not-trim.

    Retrieve a Recording

    Retrieve a Recording's meta data

    curl -L https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.recordings('Sid')
          .fetch()
          .then(recording => console.log(recording.callSid))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var recording = RecordingResource.Fetch(
                pathSid: "Sid"
            );
    
            Console.WriteLine(recording.CallSid);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    recording = client.recordings('Sid').fetch()
    
    print(recording.call_sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    recording = @client.recordings('Sid').fetch
    
    puts recording.call_sid
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $recording = $client->recordings("Sid")
                          ->fetch();
    
      print($recording->callSid);
    ?>
    

    Response 200 OK

    {
      "account_sid": "720796a0-8ee9-4350-83bd-2d07a3121f1e",
      "api_version": "2010-04-01",
      "call_sid": "43bb71ee-553f-4074-bb20-8e2747647cce",
      "conference_sid": "2071320d-ee82-4578-84e0-379fb227eb77",
      "channels": 1,
      "date_created": "Tue, 25 Sept 2018 23:00:00 +0000",
      "date_updated": "Wed, 26 Sept 2018 23:00:04 +0000",
      "start_time": "Tue, 25 Sept 2018 23:00:00 +0000",
      "end_time": "Wed, 26 Sept 2018 23:00:04 +0000",
      "price": "-0.0025",
      "price_unit": "USD",
      "duration": "4",
      "sid": "19e436af-5688-4307-b03b-bdb2b42b8142",
      "source": "StartConferenceRecordingAPI",
      "status": "completed",
      "error_code": null,
      "uri": "/api/laml/2010-04-01/Accounts/720796a0-8ee9-4350-83bd-2d07a3121f1e/Conferences/2071320d-ee82-4578-84e0-379fb227eb77/Recordings/19e436af-5688-4307-b03b-bdb2b42b8142.json",
      "subresource_uris": {
        "transcriptions": "/api/laml/2010-04-01/Accounts/720796a0-8ee9-4350-83bd-2d07a3121f1e/Recordings/19e436af-5688-4307-b03b-bdb2b42b8142/Transcriptions.json"
      }
    }
    

    Retrieve a single recording media or its metadata.

    Direct external access to recording files is useful for many external applications, so they are public and do not require Basic Auth to access. This allows external applications to embed recording URLs without exposing their SignalWire API credentials. SignalWire recording URLs are long and random, making them difficult to guess or exploit unless you reveal the URL.

    Retrieve WAV file

    When a recording URI has no extension or a .wav extension, the request will return a binary WAV version of the recording file.

    GET https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}

    Retrieve MP3 file

    Setting an extension of ".mp3" on the URI returns a binary MP3 version of the recording. For example:

    GET https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.mp3

    Retrieve Metadata

    A recording's metadata, such as duration, cost, time, can be returned by setting the Recording URI's extension to .json. For example:

    GET https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json

    Update a Recording

    Update a Recording

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json \
      -X POST \
      -u "YourProjectID:YourAuthToken" \
      --data-urlencode "Status=paused" \
      --data-urlencode "PauseBehavior=skip"
    

    Pause, resume or stop a Recording. You can control what happens while recording is paused (replace pause with silence or skip it).

    Parameter
    Status required The new status of the Recording. Possible values are paused, in-progress and stopped.
    PauseBehavior optional What to do while recording is paused. Possible values are skip and silence. Default value is silence.

    List All Recordings of an Account

    List All Recordings of an Account

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Recordings.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.recordings.each(recordings => console.log(recordings.sid));
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var recordings = RecordingResource.Read();
    
            foreach(var record in recordings)
            {
               Console.WriteLine(record.Sid);
            }
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    recordings = client.recordings.list()
    
    for record in recordings:
        print(record.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    recordings = @client.recordings.list
    
    recordings.each do |record|
      puts record.sid
    end
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $recordings = $client->recordings
                           ->read();
    
      foreach ($recordings as $record) {
          print($record->sid);
      }
    ?>
    

    Response 200 OK

    {
      "end": 0,
      "first_page_uri": "/api/laml/2010-04-01/Accounts/720796a0-8ee9-4350-83bd-2d07a3121f1e/Recordings.json?PageSize=1&Page=0",
      "next_page_uri": "/api/laml/2010-04-01/Accounts/720796a0-8ee9-4350-83bd-2d07a3121f1e/Recordings.json?PageSize=1&Page=1",
      "page": 0,
      "page_size": 1,
      "previous_page_uri": "/api/laml/2010-04-01/Accounts/720796a0-8ee9-4350-83bd-2d07a3121f1e/Recordings.json?PageSize=1&Page=0",
      "recordings": [
        {
          "account_sid": "720796a0-8ee9-4350-83bd-2d07a3121f1e",
          "api_version": "2010-04-01",
          "call_sid": "43bb71ee-553f-4074-bb20-8e2747647cce",
          "conference_sid": "2071320d-ee82-4578-84e0-379fb227eb77",
          "channels": 1,
          "date_created": "Tue, 25 Sept 2018 23:00:00 +0000",
          "date_updated": "Wed, 26 Sept 2018 23:00:04 +0000",
          "start_time": "Tue, 25 Sept 2018 23:00:00 +0000",
          "end_time": "Wed, 26 Sept 2018 23:00:04 +0000",
          "price": "-0.0025",
          "price_unit": "USD",
          "duration": "4",
          "sid": "19e436af-5688-4307-b03b-bdb2b42b8142",
          "source": "StartConferenceRecordingAPI",
          "status": "completed",
          "error_code": null,
          "uri": "/api/laml/2010-04-01/Accounts/720796a0-8ee9-4350-83bd-2d07a3121f1e/Conferences/2071320d-ee82-4578-84e0-379fb227eb77/Recordings/19e436af-5688-4307-b03b-bdb2b42b8142.json",
          "subresource_uris": {
            "transcriptions": "/api/laml/2010-04-01/Accounts/720796a0-8ee9-4350-83bd-2d07a3121f1e/Recordings/19e436af-5688-4307-b03b-bdb2b42b8142/Transcriptions.json"
          }
        }
      ],
      "start": 0,
      "uri": "/api/laml/2010-04-01/Accounts/720796a0-8ee9-4350-83bd-2d07a3121f1e/Recordings.json?PageSize=1&Page=0",
      "account_sid": "b720796a0-8ee9-4350-83bd-2d07a3121f1e"
    }
    

    Fetch all of the recordings that are associated with your SignalWire account. This will be returned as a list of recordings.

    Parameter
    CallSid optional The unique identifier of the call associated with this recording.
    ConferenceSid optional The unique identifier of the conference associated with this recording.
    DateCreated optional Shows recordings that were created on the date provided. Format as YYYY-MM-DD in UTC. You can also append < or > to return a range of recordings. For example, use DateCreated< to return recordings created on or before midnight of the date, or DateCreated> to return recordings created on or after midnight of the date.

    Example: List All Recordings of a Call

    List All Recordings of a Call

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Recordings.json?CallSid=43bb71ee-553f-4074-bb20-8e2747647cce \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.recordings.each({ callSid: '43bb71ee-553f-4074-bb20-8e2747647cce' }, recordings => console.log(recordings.sid));
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var recordings = RecordingResource.Read(
                callSid: "43bb71ee-553f-4074-bb20-8e2747647cce"
            );
    
            foreach(var record in recordings)
            {
               Console.WriteLine(record.Sid);
            }
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    recordings = client.recordings \
                       .list(call_sid='43bb71ee-553f-4074-bb20-8e2747647cce')
    
    for record in recordings:
        print(record.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    recordings = @client.recordings
                        .list(call_sid: '43bb71ee-553f-4074-bb20-8e2747647cce')
    
    recordings.each do |record|
      puts record.sid
    end
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $recordings = $client->recordings
                           ->read(array(
                                      "callSid" => "43bb71ee-553f-4074-bb20-8e2747647cce"
                                  )
                           );
    
      foreach ($recordings as $record) {
          print($record->sid);
      }
    ?>
    

    Example: List All Recordings on September 25, 2018

    List All Recordings on September 25, 2018

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Recordings.json?DateCreated=2018-09-25T00%3A00%3A00Z \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.recordings.each({ dateCreated: new Date(Date.UTC(2018, 9, 25, 0, 0, 0)) }, recordings => console.log(recordings.sid));
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var recordings = RecordingResource.Read(
                dateCreated: new DateTime(2018, 9, 25, 0, 0, 0)
            );
    
            foreach(var record in recordings)
            {
               Console.WriteLine(record.Sid);
            }
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    recordings = client.recordings.list(date_created=datetime(2018, 9, 25, 0, 0))
    
    for record in recordings:
        print(record.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    recordings = @client.recordings.list(date_created: Date.new(2018, 9, 25))
    
    recordings.each do |record|
      puts record.sid
    end
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $recordings = $client->recordings
                           ->read(array("dateCreated" => new \DateTime('2018-9-25'))
                           );
    
      foreach ($recordings as $record) {
          print($record->sid);
      }
    ?>
    

    Delete a Recording

    Delete a Recording

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json \
      -X DELETE \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.recordings('Sid')
          .remove()
          .then(recording => console.log(recording.sid))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            RecordingResource.Delete(pathSid: "Sid");
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    client.recordings('Sid').delete()
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    @client.recordings('Sid').delete
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $client->recordings("Sid")
             ->delete();
    ?>
    

    Response 204 No Content

    Delete recording. If the delete is successful, a 204 response, with no body, will be returned.

    Parameter
    Sid required The unique identifier of the recording.

    Recording Transcriptions

    Recording transcriptions are the transcribed texts that were generated from voice call recordings. Transcriptions are audio files that were converted into readable text.

    Properties

    A sample recording transcription returned from the API.

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
      "api_version": "2010-04-01",
      "date_created": "Thur, 27 Sept 2018 02:00:00 +0000",
      "date_updated": "Fri, 28 Sept 2018 03:00:00 +0000",
      "duration": "1",
      "price": -0.00025,
      "price_unit": "USD",
      "recording_sid": "b3877c40-da60-4998-90ad-b792e98472re",
      "sid": "b3877c40-da60-4998-90ad-b792e98472tr",
      "status": "failed",
      "transcription_text": "(blank)",
      "type": "fast",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Transcriptions/b3877c40-da60-4998-90ad-b792e98472tr.json"
    }
    
    Attribute
    account_sid string The unique identifier for the account that created this transcription.
    date_created datetime The date, in RFC 2822 GMT format, this transcription was created.
    date_updated datetime The date, in RFC 2822 GMT format, this transcription was updated.
    duration string The time, in seconds, of the transcribed audio.
    price integer The charge for the transcription.
    price_unit string The currency, in ISO 4127 format, for the price of the transcription.
    recording_sid string The unique identifier for the recording that this transcription was created from.
    sid string The unique identifier for the transcription.
    status string The status of the transcription. Possible values are in-progress, completed, or failed.
    transcription_text string The text content of a transcription.
    uri string The URI of the transcription.

    Retrieve a Transcription

    Retrieve a Transcription

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.transcriptions('Sid')
          .fetch()
          .then(transcription => console.log(transcription.dateCreated))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var transcription = TranscriptionResource.Fetch(
                pathSid: "Sid"
            );
    
            Console.WriteLine(transcription.DateCreated);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    transcription = client.transcriptions('Sid') \
                          .fetch()
    
    print(transcription.date_created)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    transcription = @client.transcriptions('Sid')
                           .fetch
    
    puts transcription.date_created
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $transcription = $client->transcriptions("Sid")
                              ->fetch();
    
      print($transcription->dateCreated->format());
    ?>
    

    Retrieve a single recording transcription.

    Parameter
    Sid required The Call Sid that uniquely identifies the recording transcription to retrieve.

    List All Transcriptions

    List All Transcriptions

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Transcriptions.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.transcriptions.each(transcriptions => console.log(transcriptions.sid));
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var transcriptions = TranscriptionResource.Read();
    
            foreach(var record in transcriptions)
            {
               Console.WriteLine(record.Sid);
            }
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    transcriptions = client.transcriptions.list()
    
    for record in transcriptions:
        print(record.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    transcriptions = @client.transcriptions.list
    
    transcriptions.each do |record|
      puts record.sid
    end
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $transcriptions = $client->transcriptions
                               ->read();
    
      foreach ($transcriptions as $record) {
          print($record->sid);
      }
    ?>
    

    Response 200 OK

    {
      "end": 0,
      "first_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Transcriptions.json?PageSize=1&Page=0",
      "last_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Transcriptions.json?PageSize=1&Page=3",
      "next_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Transcriptions.json?PageSize=1&Page=1",
      "num_pages": 4,
      "page": 0,
      "page_size": 1,
      "previous_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Transcriptions.json?PageSize=1&Page=0",
      "start": 0,
      "total": 4,
      "transcriptions": [
        {
          "account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
          "api_version": "2008-08-01",
          "date_created": "Thu, 27 Sept 2018 20:00:00 +0000",
          "date_updated": "Fri, 28 Sept 2018 21:00:00 +0000",
          "duration": "10",
          "price": "0.0",
          "price_unit": "USD",
          "recording_sid": "b3877c40-da60-4998-90ad-b792e98472re",
          "sid": "b3877c40-da60-4998-90ad-b792e98472tr",
          "status": "completed",
          "transcription_text": null,
          "type": "fast",
          "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Transcriptions/b3877c40-da60-4998-90ad-b792e98472tr.json"
        }
      ],
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Transcriptions.json?PageSize=1&Page=0",
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472ac"
    }
    

    The ability to read all of the recording transcriptions that are associated with your account. This will be returned as a list of transcriptions.

    Example: List All Transcriptions from a Recording

    List All Transcriptions from a Recording

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions.json \
      -X GET \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.transcriptions.each({RecordingSid: 'b3877c40-da60-4998-90ad-b792e98472re'}, transcriptions => console.log(transcriptions.sid));
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var transcriptions = TranscriptionResource.Read(
                pathSid: "RecordingSid"
            );
    
            foreach(var record in transcriptions)
            {
               Console.WriteLine(record.Sid);
            }
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    transcriptions = client.transcriptions \
                       .list(recording_sid='b3877c40-da60-4998-90ad-b792e98472re')
    
    for record in transcriptions:
        print(record.sid)
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    transcriptions = @client.transcriptions
                        .list(recording_sid: 'b3877c40-da60-4998-90ad-b792e98472re')
    
    transcriptions.each do |record|
      puts record.sid
    end
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $transcriptions = $client->transcriptions
                           ->read(array(
                                      "RecordingSid" => "b3877c40-da60-4998-90ad-b792e98472re"
                                  )
                           );
    
      foreach ($transcriptions as $record) {
          print($transcriptions->sid);
      }
    ?>
    

    The ability to read all of the transcriptions that were generated from a single recording.

    Delete a Recording Transcription

    Delete a Recording Transcription

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json \
      -X DELETE \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.transcriptions('Sid')
          .remove()
          .then(transcription => console.log(transcription.sid))
          .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            TranscriptionResource.Delete(pathSid: "Sid");
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    client.transcriptions('Sid').delete()
    
    require 'signalwire/sdk'
    
    @client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
    
    @client.transcriptions('Sid').delete
    
    <?php
      use SignalWire\Rest\Client;
    
      $client = new Client('YourProjectID', 'YourAuthToken', array("signalwireSpaceUrl" => "example.signalwire.com"));
    
      $client->transcriptions("Sid")
             ->delete();
    ?>
    

    Response 204 No Content

    Delete a recording transcription from your account. If the delete is successful, a 204 response, with no body, will be returned.

    Parameter
    Sid required The unique identifier that determines the transcription to delete.

    Queues

    Queue permits you to search and maintain individual call queues.

    Properties

    A sample Queue returned from the API

    {
      "account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
      "average_wait_time": 0,
      "current_size": 0,
      "date_created": "Wed, 26 Sept 2018 18:00:00 +0000",
      "date_updated": "Thur, 27 Sept 2018 19:00:00 +0000",
      "friendly_name": "0.361280134646222",
      "max_size": 123,
      "sid": "b3877c40-da60-4998-90ad-b792e98472qu",
      "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Queues/b3877c40-da60-4998-90ad-b792e98472qu.json"
    }
    
    Attribute
    average_wait_time integer The average wait time, in seconds, of callers in a queue.
    current_size integer The number of calls waiting in the queue.
    friendly_name string A description that distinguishes a queue.
    max_size integer The maximum number of calls that are allowed to wait in a queue.
    sid string The unique identifier for the queue.

    Create a Queue

    Create a Queue

    curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Queues.json \
      -X POST \
      --data-urlencode "FriendlyName=Queue1" \
      -u "YourProjectID:YourAuthToken"
    
    const { RestClient } = require('@signalwire/compatibility-api')
    const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
    
    client.queues.create({friendlyName: 'Queue1'})
                 .then(queue => console.log(queue.sid))
                 .done();
    
    using System;
    using System.Collections.Generic;
    using Twilio;
    using Twilio.Rest.Api.V2010.Account;
    
    class Program
    {
        static void Main(string[] args)
        {
            TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "<your-domain>.signalwire.com" });
    
            var queue = QueueResource.Create(friendlyName: "Queue1");
    
            Console.WriteLine(queue.Sid);
        }
    }
    
    from signalwire.rest import Client as signalwire_client
    
    client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
    
    queue = client.queues.create(friendly_name='Queue1'