Methods
This combined technical reference documents all available methods for the various REST Client SDKs. These methods correspond to the Compatibility REST API Endpoints.
Selecting the tab for a given language will display code samples and instructions for that SDK throughout this reference.
- cURL
- Node.js
- C#
- Python
- Ruby
# Create (send) an outbound SMS using cURL.
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"
// Create (send) an outbound SMS using the Node Compatibility REST Client SDK.
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();
// Create (send) an outbound SMS using the C# Compatibility REST Client SDK.
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"] = "{SPACE}.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);
}
}
# Create (send) an outbound SMS using the Python Compatibility REST Client SDK.
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)
# Create (send) an outbound SMS using the Ruby Compatibility REST Client SDK.
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
Refer to the Overview of REST Client SDKs for instructions for installing each SDK and initializing the client.
🗃️ Accounts
3 items
🗃️ Applications
4 items
🗃️ Available Phone Numbers
3 items
🗃️ Calls
5 items
🗃️ Conference Participants
5 items
🗃️ Conferences
3 items
🗃️ cXML Applications
5 items
🗃️ Fax Media
3 items
🗃️ Faxes
5 items
🗃️ Incoming Phone Numbers
5 items
🗃️ Media
3 items
🗃️ Messaging
5 items
🗃️ Queue Members
3 items
🗃️ Queues
6 items
🗃️ Recording Transcriptions
3 items
🗃️ Recordings
5 items