create

View as MarkdownOpen in Claude

Create a new application.

Path parameters

AccountSidstringRequiredformat: "uuid"
The Account ID that has the Application.

Request

FriendlyNamestringRequired<=64 characters
A named unique identifier for the resource.
VoiceUrlstringOptionalformat: "uri"
The URL to request when a phone number receives a call or fax.
VoiceMethodenumOptionalDefaults to POST
Whether the request to `VoiceUrl` is a `GET` or a `POST`. Default is `POST`.
Allowed values:
VoiceFallbackUrlstringOptionalformat: "uri"
The URL SignalWire will request if errors occur when fetching the `VoiceUrl`.
VoiceFallbackMethodenumOptionalDefaults to POST
Whether the request to `VoiceFallbackUrl` is a `GET` or a `POST`. Default is `POST`.
Allowed values:
StatusCallbackstringOptionalformat: "uri"
The URL to pass status updates to the Application.
StatusCallbackMethodenumOptionalDefaults to POST
Whether the request to the `StatusCallback` URL is a `GET` or a `POST`. Default is `POST`.
Allowed values:
SmsUrlstringOptionalformat: "uri"
The URL to request when an SMS is received.
SmsMethodenumOptionalDefaults to POST
Whether the request to `SmsUrl` is a `GET` or a `POST`. Default is `POST`.
Allowed values:
SmsFallbackUrlstringOptionalformat: "uri"
The URL SignalWire will request if errors occur when fetching the `SmsUrl`.
SmsFallbackMethodenumOptionalDefaults to POST
Whether the request to `SmsFallbackUrl` is a `GET` or a `POST`. Default is `POST`.
Allowed values:
SmsStatusCallbackstringOptionalformat: "uri"
The URL to receive status updates for messages sent via this Application.
SmsStatusCallbackMethodenumOptionalDefaults to POST
Whether the request to `SmsStatusCallback` is a `GET` or a `POST`. Default is `POST`.
Allowed values:

Response

sidstringRequiredformat: "uuid"
The unique identifier for the Application.
account_sidstringRequiredformat: "uuid"
The unique identifier for the Account that created this Application.
api_versionstringRequired
The version of the SignalWire API.
date_createdstringRequired
The date, in RFC 2822 GMT format, this Application was created.
date_updatedstringRequired
The date, in RFC 2822 GMT format, this Application was updated.
friendly_namestringRequired
A named unique identifier for the resource.
uristringRequired
The URI for this Application.
voice_urlstring or nullRequired
The URL to request when a phone number receives a call or fax.
voice_methodstring or nullRequired
Whether the request to `VoiceUrl` is a `GET` or a `POST`. Default is `POST`.
voice_fallback_urlstring or nullRequired
The URL SignalWire will request if errors occur when fetching the `VoiceUrl`.
voice_fallback_methodstring or nullRequired
Whether the request to `VoiceFallbackUrl` is a `GET` or a `POST`. Default is `POST`.
status_callbackstring or nullRequired
The URL to pass status updates to the Application.
status_callback_methodstring or nullRequired
Whether the request to the `StatusCallback` URL is a `GET` or a `POST`. Default is `POST`.
voice_caller_id_lookupboolean or nullRequired
Whether or not to look up a caller's ID from the database. Always null.
sms_urlstring or nullRequired
The URL to request when an SMS is received.
sms_methodstring or nullRequired
Whether the request to `SmsUrl` is a `GET` or a `POST`. Default is `POST`.
sms_fallback_urlstring or nullRequired
The URL SignalWire will request if errors occur when fetching the `SmsUrl`.
sms_fallback_methodstring or nullRequired
Whether the request to `SmsFallbackUrl` is a `GET` or a `POST`. Default is `POST`.
sms_status_callbackstring or nullRequired
The URL to receive status updates for messages sent via this Application.
sms_status_callback_methodstring or nullRequired
Whether the request to `SmsStatusCallback` is a `GET` or a `POST`. Default is `POST`.
message_status_callbackstring or nullRequired
The URL to receive status updates for messages sent via this Application.

Response Example

Response
1{
2 "sid": "b3877c40-da60-4998-90ad-b792e98472af",
3 "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
4 "api_version": "2010-04-01",
5 "date_created": "Sat, 15 Sept 2018 10:00:00 +0000",
6 "date_updated": "Sat, 16 Sept 2018 10:00:00 +0000",
7 "friendly_name": "My Friendly Name",
8 "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications/b3877c40-da60-4998-90ad-b792e98472af.json",
9 "voice_url": "http://example.com",
10 "voice_method": "POST",
11 "voice_fallback_url": "http://example.com",
12 "voice_fallback_method": "POST",
13 "status_callback": "http://example.com",
14 "status_callback_method": "POST",
15 "sms_url": "http://example.com",
16 "sms_method": "POST",
17 "sms_fallback_url": "http://www.example.com/sms-fallback",
18 "sms_fallback_method": "POST",
19 "sms_status_callback": "http://www.example.com/sms-status-callback",
20 "sms_status_callback_method": "POST",
21 "message_status_callback": "http://www.example.com/sms-status-callback"
22}

Example

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient({
4 project: "your-project-id",
5 token: "your-api-token",
6 host: "your-space.signalwire.com",
7});
8
9const app = await client.compat.applications.create({
10 FriendlyName: "My App",
11 VoiceUrl: "https://example.com/voice",
12 SmsUrl: "https://example.com/sms",
13});