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

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
{
"sid": "b3877c40-da60-4998-90ad-b792e98472af",
"account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
"api_version": "2010-04-01",
"date_created": "Sat, 15 Sept 2018 10:00:00 +0000",
"date_updated": "Sat, 16 Sept 2018 10:00:00 +0000",
"friendly_name": "My Friendly Name",
"uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Applications/b3877c40-da60-4998-90ad-b792e98472af.json",
"voice_url": "http://example.com",
"voice_method": "POST",
"voice_fallback_url": "http://example.com",
"voice_fallback_method": "POST",
"status_callback": "http://example.com",
"status_callback_method": "POST",
"voice_caller_id_lookup": null,
"sms_url": "http://example.com",
"sms_method": "POST",
"sms_fallback_url": "http://www.example.com/sms-fallback",
"sms_fallback_method": "POST",
"sms_status_callback": "http://www.example.com/sms-status-callback",
"sms_status_callback_method": "POST",
"message_status_callback": "http://www.example.com/sms-status-callback"
}

Example

import { RestClient } from "@signalwire/sdk";
const client = new RestClient({
project: "your-project-id",
token: "your-api-token",
host: "your-space.signalwire.com",
});
const app = await client.compat.applications.create({
FriendlyName: "My App",
VoiceUrl: "https://example.com/voice",
SmsUrl: "https://example.com/sms",
});