Connectors Reference

Twilio

Twilio enables apps to send and receive global SMS, MMS and IP messages.

 

Status: Production

Tier: Standard

Version: 1.0

 

Actions:

Name

Summary

ListMessages ([Optional]string To, [Optional]string From, [Optional]string DateSent, [advanced][Optional]integer PageSize, [advanced][Optional]integer Page)

List Messages

SendMessage (SendMessageRequest sendMessageRequest)

Send Text Message (SMS)

GetMessage (string MessageId)

Get Message

ListIncomingPhoneNumbers ([Optional]string PhoneNumber, [Optional]string FriendlyName, [advanced][Optional]integer PageSize, [advanced][Optional]string Beta)

List Incoming Phone Numbers

AddIncomingNumber (AddIncomingPhoneNumberRequest addIncomingPhoneNumberRequest)

Add Incoming Number

GetIncomingPhoneNumber (string IncomingPhoneNumberSid)

Get Incoming Phone Number

GetAvailableTollFreeNumbers (string IsoCountryCode, [Optional]string AreaCode, [Optional]string Contains)

Get Available Toll Free Numbers

GetAvailableMobileNumbers (string IsoCountryCode, [Optional]string AreaCode, [Optional]string Contains, [advanced][Optional]boolean SmsEnabled, [advanced][Optional]boolean MmsEnabled, [advanced][Optional]boolean VoiceEnabled)

Get Available Mobile Numbers

GetAvailableLocalNumbers (string IsoCountryCode, [Optional]string AreaCode, [Optional]string Contains, [advanced][Optional]boolean SmsEnabled, [advanced][Optional]boolean MmsEnabled, [advanced][Optional]boolean VoiceEnabled, [Optional]string NearNumber, [Optional]string NearLatLong, [advanced][Optional]string InPostalCode, [advanced][Optional]string InRegion)

Get Available Local Numbers

ListUsage ([Optional]string Category, [advanced][Optional]string SubResource, [Optional]string EndDate, [Optional]string StartDate, [advanced][Optional]integer PageSize)

List Usage

 

Triggers:

Name

Summary

 

Objects:

Name

Summary

AddIncomingPhoneNumberRequest

 

AvailablePhoneNumbers

 

AvailablePhoneNumberWrapper

 

Capabilities

 

IncomingPhoneNumber

 

IncomingPhoneNumberList

 

Message

Message

MessageList

Message List

SendMessageRequest

 

UsageRecords

 

 

Actions:

ListMessages

Summary: List Messages

Description: Returns a list of messages associated with your account.

 

Syntax:

Twilio.ListMessages ([Optional]string To, [Optional]string From, [Optional]string DateSent, [advanced][Optional]integer PageSize, [advanced][Optional]integer Page)

 

Parameters:

Name

Type

Summary

Required

Related Action

To

string

(To Phone Number)

Only show messages to this phone number.

False

From

string

(From Phone Number)

Only show messages from this phone number.

False

ListIncomingPhoneNumbers

DateSent

string(date)

(Date Sent)

Only show messages sent on this date (in GMT format), given as YYYY-MM-DD. Example: DateSent=2009-07-06. You can also specify inequality, such as DateSent<=YYYY-MM-DD for messages that were sent on or before midnight on a date, and DateSent>=YYYY-MM-DD for messages sent on or after midnight on a date.

False

PageSize

integer(int32)

(Limit)

How many resources to return in each list page. Default is 50.

False

Page

integer(int32)

(Page)

Page number. Default is 0.

False

 

Returns:

          Type:MessageList

          Summary: Message List

          Description: List of one or more messages.

 

SendMessage

Summary: Send Text Message (SMS)

Description: This operation is used to send a new message to a mobile number.

 

Syntax:

Twilio.SendMessage (SendMessageRequest sendMessageRequest)

 

Parameters:

Name

Type

Summary

Required

Related Action

sendMessageRequest

SendMessageRequest

 

Request model for Send Message operation.

True

 

Returns:

          Type:Message

          Summary: Message

          Description: Proprties of a single message.

 

GetMessage

Summary: Get Message

Description: This operation returns a single message specified by the provided Message ID.

 

Syntax:

Twilio.GetMessage (string MessageId)

 

Parameters:

Name

Type

Summary

Required

Related Action

MessageId

string

(Message SID)

Unique SID of the message.

True

 

Returns:

          Type:Message

          Summary: Message

          Description: Proprties of a single message.

 

ListIncomingPhoneNumbers

Summary: List Incoming Phone Numbers

Description: This operation returns a list of incoming phone number resources, each representing a phone number given to your account.

 

Syntax:

Twilio.ListIncomingPhoneNumbers ([Optional]string PhoneNumber, [Optional]string FriendlyName, [advanced][Optional]integer PageSize, [advanced][Optional]string Beta)

 

Parameters:

Name

Type

Summary

Required

Related Action

PhoneNumber

string

(Phone Number)

Only show the incoming phone number resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit.

False

FriendlyName

string

(Friendly Name)

Only show the incoming phone number resources with friendly names that exactly match this name.

False

PageSize

integer(int32)

(Limit)

Maximum number of results.

False

Beta

string

(Beta)

Include phone numbers new to the Twilio platform. Possible values are either true or false. Default is false.

False

 

Returns:

          Type:IncomingPhoneNumberList

          Description: Response model for List Messages operation.

 

AddIncomingNumber

Summary: Add Incoming Number

Description: If a phone number is provided instead, adds a new phone number to your account. If an area code is provided, adds a random phone number available for the area depending on the Area Code provided.

 

Syntax:

Twilio.AddIncomingNumber (AddIncomingPhoneNumberRequest addIncomingPhoneNumberRequest)

 

Parameters:

Name

Type

Summary

Required

Related Action

addIncomingPhoneNumberRequest

AddIncomingPhoneNumberRequest

 

Request model for Add Incoming Number operation

True

 

Returns:

          Type:IncomingPhoneNumber

          Description: Incoming Phone Number

 

GetIncomingPhoneNumber

Summary: Get Incoming Phone Number

Description: Fetches the details of a phone number purchased from Twilio.

 

Syntax:

Twilio.GetIncomingPhoneNumber (string IncomingPhoneNumberSid)

 

Parameters:

Name

Type

Summary

Required

Related Action

IncomingPhoneNumberSid

string

(Incoming Phone Number ID)

Incoming Phone number ID

True

 

Returns:

          Type:IncomingPhoneNumber

          Description: Incoming Phone Number

 

GetAvailableTollFreeNumbers

Summary: Get Available Toll Free Numbers

Description: Returns a list of toll-free available phone numbers, each representing a phone number that is currently available for your account

 

Syntax:

Twilio.GetAvailableTollFreeNumbers (string IsoCountryCode, [Optional]string AreaCode, [Optional]string Contains)

 

Parameters:

Name

Type

Summary

Required

Related Action

IsoCountryCode

string

(ISO Country Code)

Iso country code of the Toll Free Numbers

True

AreaCode

string

(Area Code)

Area Code of the Toll Free Numbers

False

Contains

string

(Contains)

Toll Free Numbers Contains a specific number

False

 

Returns:

          Type:AvailablePhoneNumberWrapper

          Description: Available Phone Numbers

 

GetAvailableMobileNumbers

Summary: Get Available Mobile Numbers

Description: Returns a list of mobile available phone numbers, each representing a phone number that is currently available for your account

 

Syntax:

Twilio.GetAvailableMobileNumbers (string IsoCountryCode, [Optional]string AreaCode, [Optional]string Contains, [advanced][Optional]boolean SmsEnabled, [advanced][Optional]boolean MmsEnabled, [advanced][Optional]boolean VoiceEnabled)

 

Parameters:

Name

Type

Summary

Required

Related Action

IsoCountryCode

string

(ISO Country Code)

Iso country code of the Mobile Numbers

True

AreaCode

string

(Area Code)

Area Code of the Toll Free Numbers

False

Contains

string

(Contains)

Mobile Numbers Contains a specific number

False

SmsEnabled

boolean

(SMS Enabled)

Sms Enabled on the numbers?

False

MmsEnabled

boolean

(MMS Enabled)

Mms Enabled on the numbers?

False

VoiceEnabled

boolean

(Voice Enabled)

Voice Enabled on the numbers?

False

 

Returns:

          Type:AvailablePhoneNumberWrapper

          Description: Available Phone Numbers

 

GetAvailableLocalNumbers

Summary: Get Available Local Numbers

Description: Returns a list of local available phone numbers, each representing a phone number that is currently available for your account

 

Syntax:

Twilio.GetAvailableLocalNumbers (string IsoCountryCode, [Optional]string AreaCode, [Optional]string Contains, [advanced][Optional]boolean SmsEnabled, [advanced][Optional]boolean MmsEnabled, [advanced][Optional]boolean VoiceEnabled, [Optional]string NearNumber, [Optional]string NearLatLong, [advanced][Optional]string InPostalCode, [advanced][Optional]string InRegion)

 

Parameters:

Name

Type

Summary

Required

Related Action

IsoCountryCode

string

(ISO Country Code)

Iso country code of the Local Numbers

True

AreaCode

string

(Area Code)

Area Code of the Toll Free Numbers

False

Contains

string

(Contains)

Local Numbers Contains a specific number.

False

SmsEnabled

boolean

(SMS Enabled)

Sms Enabled on the numbers?

False

MmsEnabled

boolean

(MMS Enabled)

Mms Enabled on the numbers?

False

VoiceEnabled

boolean

(Voice Enabled)

Voice Enabled on the numbers?

False

NearNumber

string

(Given a phone number, find a geographically close number within Distance miles. Distance defaults to 25 miles.)

Given a phone number, find a geographically close number within Distance miles. Distance defaults to 25 miles.

False

NearLatLong

string

(Given a latitude/longitude pair lat,long find geographically close numbers within Distance miles.)

Given a latitude/longitude pair lat,long find geographically close numbers within Distance miles.

False

InPostalCode

string

(In Postal Code)

Postal code of the number

False

InRegion

string

(In Region)

Number belongs to which region

False

 

Returns:

          Type:AvailablePhoneNumberWrapper

          Description: Available Phone Numbers

 

ListUsage

Summary: List Usage

Description: Returns Usage records for usage categories

 

Syntax:

Twilio.ListUsage ([Optional]string Category, [advanced][Optional]string SubResource, [Optional]string EndDate, [Optional]string StartDate, [advanced][Optional]integer PageSize)

 

Parameters:

Name

Type

Summary

Required

Related Action

Category

string

(Category)

Category of usage

False

SubResource

string

(Sub Resource)

Sub Resource

False

EndDate

string

(End Date)

List usage upto a given date

False

StartDate

string

(Start Date)

List usage from a given date

False

PageSize

integer(int32)

(Max Results)

Maximum number of results

False

 

Returns:

          Type:array of (UsageRecords)

 


 

AddIncomingPhoneNumberRequest

Summary:

Description: Request model for Add Incoming Number operation

 

          Properties:

Name

Type

Summary

PhoneNumber

string

 

Phone Number

AreaCode

string

 

Area Code

FriendlyName

string

 

Friendly Name


 

AvailablePhoneNumbers

Summary:

Description: Available Phone Numbers

 

          Properties:

Name

Type

Summary

phone_number

string

 

Phone Number

friendly_name

string

 

Friendly Name

lata

string

 

Local Access Transport Area

latitude

string

 

Latitude

longitude

string

 

Longitude

postal_code

string

 

Postal Code

rate_center

string

 

Rate Center

region

string

 

Region

MMS

boolean

 

Mms Enabled?

SMS

boolean

 

Sms Enabled?

voice

boolean

 

Voice Enabled?


 

AvailablePhoneNumberWrapper

Summary:

Description: Available Phone Numbers

 

          Properties:

Name

Type

Summary

available_phone_numbers

array of (AvailablePhoneNumbers)

 

 


 

Capabilities

Summary:

Description: Phone Number Capabilities

 

          Properties:

Name

Type

Summary

mms

boolean

 

Mms Enabled?

sms

boolean

 

Sms Enabled?

voice

boolean

 

Voice Enabled?


 

IncomingPhoneNumber

Summary:

Description: Incoming Phone Number

 

          Properties:

Name

Type

Summary

phone_number

string

 

Phone Number

friendly_name

string

 

Friendly Name

sid

string

 

Id

account_sid

string

 

Account Sid

date_created

string(date-time)

 

Date Created

date_updated

string(date-time)

 

Date Updated

capabilities

Capabilities

 

Phone Number Capabilities

status_callback

string(uri)

 

The URL that Twilio will request to pass status parameters (such as call ended) to your application

status_callback_method

string

 

The HTTP method Twilio will use to make requests to the StatusCallback URL. Either GET or POST.

api_version

string

 

API version


 

IncomingPhoneNumberList

Summary:

Description: Response model for List Messages operation.

 

          Properties:

Name

Type

Summary

incoming_phone_numbers

array of (IncomingPhoneNumber)

 

 

page

integer(int32)

 

Page number

page_size

integer(int32)

 

Page Size

num_pages

integer(int32)

 

Number of Pages

uri

string(uri)

 

relative URI for this list

first_page_uri

string(uri)

 

relative URI for the first page

next_page_uri

string(uri)

 

relative URI for the next page


 

Message

Summary: Message

Description: Proprties of a single message.

 

          Properties:

Name

Type

Summary

body

string

 

Body of the message.

from

string

 

Phone number from which the message was sent.

to

string

 

Phone number to which the message was sent.

status

string

 

Sent status of the message.

sid

string

 

SID of the sent message.

account_sid

string

 

SID of the account associated with the sent message.

api_version

string

 

Version of the API used to send the message.

num_segments

string

 

Number of segments the message was divided into.

num_media

string

 

Number of media files associated with the sent message.

date_created

string(date-time)

 

yyyy-MM-ddTHH:mm:ss.fffZ (UTC format)

date_sent

string(date-time)

 

yyyy-MM-ddTHH:mm:ss.fffZ (UTC format)

date_updated

string(date-time)

 

yyyy-MM-ddTHH:mm:ss.fffZ (UTC format)

direction

string

 

Direction associated with the sent message.

error_code

string

 

Error codes associated with the sent message, if any.

error_message

string

 

Error messages associated with the sent message, if any.

price

string

 

Cost of the sent message.

price_unit

string

 

Price unit used to evaluate the cost of the message.

uri

string(uri)

 

Relative URI for this resource.

subresource_uris

array of (string(uri))

 

Relative URIs for any subresources.

messaging_service_sid

string

 

Unique id of the messaging Service.


 

MessageList

Summary: Message List

Description: List of one or more messages.

 

          Properties:

Name

Type

Summary

messages

array of (Message)

 

 

page

integer(int32)

 

Page number of the respone.

page_size

integer(int32)

 

Page size of the response.

num_pages

integer(int32)

 

Total number of pages in the response.

uri

string(uri)

 

Relative URI for this list.

first_page_uri

string(uri)

 

Relative URI for the first page.

next_page_uri

string(uri)

 

Relative URI for the next page.

total

integer(int32)

 

Total number of messages.

previous_page_uri

string(uri)

 

Relative URI for the previous page.


 

SendMessageRequest

Summary:

Description: Request model for Send Message operation.

 

          Properties:

Name

Type

Summary

from

string

 

A Twilio phone number (in E.164 format) or alphanumeric sender ID enabled for the type of message you wish to send.

to

string

 

The destination phone number. Format with a '+' and country code e.g., +16175551212 (E.164 format).

body

string

 

The text of the message you want to send, limited to 1600 characters.

media_url

array of (string(uri))

 

List of URIs of media to be sent.

status_callback

string(uri)

 

A URL that Twilio will POST to each time your message status changes.

messaging_service_sid

string

 

Unique id of the Messaging Service.

application_sid

string

 

SID of Twilio Application which is configured with the required Message status call back.

max_price

string

 

The total maximum price limit for the message.


 

UsageRecords

Summary:

Description: Usage Records class

 

          Properties:

Name

Type

Summary

category

string

 

Category

usage

string

 

Usage

usage_unit

string

 

Usage Unit

description

string

 

Description

price

number(double)

 

Price

price_unit

string

 

Price Unit

count

string

 

Count

count_unit

string

 

Count Unit

start_date

string(date-time)

 

Start Date

end_date

string(date-time)

 

End Date