Functions
delete-incoming-phone-number
fn (request: DeleteIncomingPhoneNumberRequest): Bool
fn (request: DeleteIncomingPhoneNumberRequest, opts: Map): Bool
fn (client: ::twilio::api/Client, request: DeleteIncomingPhoneNumberRequest): Bool
DELETE /Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json - Release a phone number. The number is returned to Twilio's inventory and will no longer incur charges. This cannot be undone.
twilio.account.sid
get-account
fn (): Account
fn (opts: Map): Account
fn (client: ::twilio::api/Client): Account
GET /Accounts/{AccountSid}.json - Get the account's details: SID, friendly name, status, type, and subresource URIs. A cheap credentials check.
Example
::accounts ::twilio::accounts
response ::accounts/get-account()
response.sid // => "AC..."
response.friendly_name // => "My Twilio Account"
response.status // => "active"
response.type // => "Full"
twilio.account.sid
get-incoming-phone-number
fn (request: GetIncomingPhoneNumberRequest): IncomingPhoneNumber
fn (request: GetIncomingPhoneNumberRequest, opts: Map): IncomingPhoneNumber
fn (client: ::twilio::api/Client, request: GetIncomingPhoneNumberRequest): IncomingPhoneNumber
GET /Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json - Get details of a specific phone number by SID.
twilio.account.sid
get-incoming-phone-numbers
fn (request: GetIncomingPhoneNumbersRequest): GetIncomingPhoneNumbersResponse
fn (request: GetIncomingPhoneNumbersRequest, opts: Map): GetIncomingPhoneNumbersResponse
fn (client: ::twilio::api/Client, request: GetIncomingPhoneNumbersRequest): GetIncomingPhoneNumbersResponse
GET /Accounts/{AccountSid}/IncomingPhoneNumbers.json - List your Twilio phone numbers. Filter by PhoneNumber (matches any part), FriendlyName, or Origin (twilio or hosted).
Example
::accounts ::twilio::accounts
response ::accounts/get-incoming-phone-numbers(::accounts/GetIncomingPhoneNumbersRequest({}))
numbers response.incoming_phone_numbers
// => [{sid: "PN...", phone_number: "+15017122661", friendly_name: "My Number", ...}]
twilio.account.sid
mark-auth-token
fn (body: Map): Map
Mask the auth_token of an account response in call records. Returns body unchanged. Exposed for testing.
update-account
fn (request: UpdateAccountRequest): Account
fn (request: UpdateAccountRequest, opts: Map): Account
fn (client: ::twilio::api/Client, request: UpdateAccountRequest): Account
POST /Accounts/{AccountSid}.json - Update account settings. Can change the FriendlyName, or set Status to "active", "suspended", or "closed" (subaccounts; closing is permanent).
twilio.account.sid
update-incoming-phone-number
fn (request: UpdateIncomingPhoneNumberRequest): IncomingPhoneNumber
fn (request: UpdateIncomingPhoneNumberRequest, opts: Map): IncomingPhoneNumber
fn (client: ::twilio::api/Client, request: UpdateIncomingPhoneNumberRequest): IncomingPhoneNumber
POST /Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json - Update a phone number's settings: point its voice/SMS webhooks at your Hot endpoints, or at a TwiML App.
Example
::accounts ::twilio::accounts
::accounts/update-incoming-phone-number(::accounts/UpdateIncomingPhoneNumberRequest({
sid: "PN123",
SmsUrl: "https://myapp.hot.dev/twilio/sms",
VoiceUrl: "https://myapp.hot.dev/twilio/voice"
}))
twilio.account.sid
update-incoming-phone-number-body
fn (request: UpdateIncomingPhoneNumberRequest): Map
The form parameters update-incoming-phone-number sends (the request without its path sid). Exposed for testing.
Types
Account
Account type {
sid: Str?,
friendly_name: Str?,
status: Str?,
type: Str?,
date_created: Str?,
date_updated: Str?,
auth_token: Str?,
uri: Str?,
owner_account_sid: Str?,
subresource_uris: Map?
}
DeleteIncomingPhoneNumberRequest
DeleteIncomingPhoneNumberRequest type {
sid: Str
}
GetIncomingPhoneNumberRequest
GetIncomingPhoneNumberRequest type {
sid: Str
}
GetIncomingPhoneNumbersRequest
GetIncomingPhoneNumbersRequest type {
PhoneNumber: Str?,
FriendlyName: Str?,
Beta: Bool?,
Origin: Str?,
PageSize: Int?,
Page: Int?,
PageToken: Str?
}
GetIncomingPhoneNumbersResponse
GetIncomingPhoneNumbersResponse type {
incoming_phone_numbers: Vec<Map>?,
end: Int?,
first_page_uri: Str?,
next_page_uri: Str?,
page: Int?,
page_size: Int?,
previous_page_uri: Str?,
start: Int?,
uri: Str?
}
IncomingPhoneNumber
IncomingPhoneNumber type {
sid: Str?,
account_sid: Str?,
phone_number: Str?,
friendly_name: Str?,
capabilities: Map?,
status: Str?,
origin: Str?,
voice_url: Str?,
voice_method: Str?,
voice_fallback_url: Str?,
voice_application_sid: Str?,
sms_url: Str?,
sms_method: Str?,
sms_fallback_url: Str?,
sms_application_sid: Str?,
status_callback: Str?,
date_created: Str?,
date_updated: Str?,
uri: Str?
}
UpdateAccountRequest
UpdateAccountRequest type {
FriendlyName: Str?,
Status: Str?
}
UpdateIncomingPhoneNumberRequest
UpdateIncomingPhoneNumberRequest type {
sid: Str,
FriendlyName: Str?,
SmsUrl: Str?,
SmsMethod: Str?,
SmsFallbackUrl: Str?,
SmsFallbackMethod: Str?,
SmsApplicationSid: Str?,
VoiceUrl: Str?,
VoiceMethod: Str?,
VoiceFallbackUrl: Str?,
VoiceFallbackMethod: Str?,
VoiceApplicationSid: Str?,
VoiceCallerIdLookup: Bool?,
VoiceReceiveMode: Str?,
StatusCallback: Str?,
StatusCallbackMethod: Str?
}