Connectors Reference

Nexmo

Nexmo, the Vonage API Platform, enables you to add communications within the context of your applications, including SMS, Voice and Chat. Sign up for a Nexmo account here - https://www.nexmo.com/

 

Status: Preview

Tier: Premium

Version: 2.0

 

Actions:

Name

Summary

SendSms (string from, string to, string text, [advanced][Optional]string type, [advanced][Optional]number status-report-req, [advanced][Optional]string client-ref, [advanced][Optional]string vcard, [advanced][Optional]string vcal, [advanced][Optional]number ttl, [advanced][Optional]string callback, [advanced][Optional]number message-class, [advanced][Optional]string udh, [advanced][Optional]string protocol-id, [advanced][Optional]string body, [advanced][Optional]string title, [advanced][Optional]string url, [advanced][Optional]string validity)

Send an SMS

ListOwnedNumbers ([Optional]string Search Pattern, [advanced][Optional]number index, [advanced][Optional]number size, [advanced][Optional]number pattern)

List owned numbers

ListInboundNumbers (string country, [Optional]string Search Pattern, [advanced][Optional]number pattern, [advanced][Optional]string features, [advanced][Optional]number size, [advanced][Optional]number index)

List inbound numbers

SendTts (string to, [advanced][Optional]string from, string text, [advanced][Optional]string lg, [advanced][Optional]string voice, [advanced][Optional]number repeat, [advanced][Optional]string machine_detection, [advanced][Optional]number machine_timeout, [advanced][Optional]string callback, [advanced][Optional]string callback_method)

Send a speech file

ListApplications ([advanced][Optional]number page_size, [advanced][Optional]number page_index)

List applications

CreateApplication (string name, string type, [advanced]string answer_url, string event_url, [advanced][Optional]string answer_method, [advanced][Optional]string event_method)

Create new application

GetApplication (string application_id)

Get application by Id

UpdateApplication (string application_id, string name, string type, [advanced]string answer_url, string event_url, [advanced][Optional]string answer_method, [advanced][Optional]string event_method)

Update an application

DeleteApplication (string application_id)

Delete an application

 

Triggers:

Name

Summary

 

Objects:

Name

Summary

applicationResponse

 

common

 

ListApplicationsResponse

 

ListNumbersResponse

 

smsResponse

 

ttsResponse

 

 

Actions:

SendSms

Summary: Send an SMS

Description: This operation is used to send an SMS.

 

Syntax:

Nexmo.SendSms (string from, string to, string text, [advanced][Optional]string type, [advanced][Optional]number status-report-req, [advanced][Optional]string client-ref, [advanced][Optional]string vcard, [advanced][Optional]string vcal, [advanced][Optional]number ttl, [advanced][Optional]string callback, [advanced][Optional]number message-class, [advanced][Optional]string udh, [advanced][Optional]string protocol-id, [advanced][Optional]string body, [advanced][Optional]string title, [advanced][Optional]string url, [advanced][Optional]string validity)

 

Parameters:

Name

Type

Summary

Required

Related Action

from

string

(Sender Id)

An alphanumeric string.

True

to

string

(To Phone Number)

International format E.164.

True

text

string

(Text)

SMS body.

True

type

string

(Type)Values: [text, binary, wappush, unicode, vcal, vcard]

Defaults to text.

False

status-report-req

number

(Delivery Receipts)

Set to 1 to enable.

False

client-ref

string

(Client Reference)

For internal reporting.

False

vcard

string

(Business Card)

vCard format.

False

vcal

string

(Calendar Event)

vCal format.

False

ttl

number

(Lifespan of SMS)

In milliseconds.

False

callback

string(url)

(Callback URL)

Delivery receipt endpoint.

False

message-class

number

(Message Class)Values: [, , , ]

Pick a class.

False

udh

string

(User Data Header)

Hex encoded UDH.

False

protocol-id

string

(Higher Level Protocol)

Protocol id.

False

body

string

(Body (If type is binary.))

Hex encoded binary data.

False

title

string

(Title (If type is wappush.))

 

False

url

string(url)

(Url (If type is wappush.))

Website Url.

False

validity

string

(Availability (If type is wappush.))

In milliseconds.

False

 

Returns:

          Type:smsResponse

 

ListOwnedNumbers

Summary: List owned numbers

Description: This operation retrieves all numbers associated with your account.

 

Syntax:

Nexmo.ListOwnedNumbers ([Optional]string Search Pattern, [advanced][Optional]number index, [advanced][Optional]number size, [advanced][Optional]number pattern)

 

Parameters:

Name

Type

Summary

Required

Related Action

Search Pattern

string

Values: [1, 2, 3]

Pick a pattern.

False

index

number

(Page Index)

Index in the response.

False

size

number

(Result Count)

Default 10 Max 100.

False

pattern

number

(Pattern)

Number pattern to search for.

False

 

Returns:

          Type:ListNumbersResponse

 

ListInboundNumbers

Summary: List inbound numbers

Description: This operation is used to retrieve all the inbound numbers that are avialble for a given country.

 

Syntax:

Nexmo.ListInboundNumbers (string country, [Optional]string Search Pattern, [advanced][Optional]number pattern, [advanced][Optional]string features, [advanced][Optional]number size, [advanced][Optional]number index)

 

Parameters:

Name

Type

Summary

Required

Related Action

country

string

(Country)

Code in ISO 3166-1 alpha-2 format.

True

Search Pattern

string

Values: [1, 2, 3]

Pick a pattern.

False

pattern

number

(Pattern)

Number pattern to search for.

False

features

string

(Available Features)

SMS or VOICE

False

size

number

(Result Count)

Default 10.

False

index

number

(Page Index)

Index in the response.

False

 

Returns:

          Type:ListNumbersResponse

 

SendTts

Summary: Send a speech file

Description: This operation is used to send a synthesized speech or recorded sound file to a phone number.

 

Syntax:

Nexmo.SendTts (string to, [advanced][Optional]string from, string text, [advanced][Optional]string lg, [advanced][Optional]string voice, [advanced][Optional]number repeat, [advanced][Optional]string machine_detection, [advanced][Optional]number machine_timeout, [advanced][Optional]string callback, [advanced][Optional]string callback_method)

 

Parameters:

Name

Type

Summary

Required

Related Action

to

string

(To Phone Number)

International format E.164.

True

from

string

(From Phone Number)

Voice-enabled Nexmo number.

False

text

string

(Message)

Speech text.

True

lg

string

(Language)

To synthesize the message in.

False

voice

string

(Gender)Values: [male, female]

Male or female.

False

repeat

number

(Repeat Count)Values: [, , , , , , , , , ]

Up to 10 times.

False

machine_detection

string

(Allow Machine Detection)

True or hangup.

False

machine_timeout

number

(Machine Timeout)

400ms to 10000ms.

False

callback

string(url)

(Callback URL)

 

False

callback_method

string

(Callback Method)Values: [GET, POST]

GET or POST.

False

 

Returns:

          Type:ttsResponse

 

ListApplications

Summary: List applications

Description: Retrieves a list of all applications associated with your account.

 

Syntax:

Nexmo.ListApplications ([advanced][Optional]number page_size, [advanced][Optional]number page_index)

 

Parameters:

Name

Type

Summary

Required

Related Action

page_size

number

(Result Count)

Items returned on each call (Default 10).

False

page_index

number

(Page Index)

Offset from first page (Default 0).

False

 

Returns:

          Type:ListApplicationsResponse

 

CreateApplication

Summary: Create new application

Description: This operation is used to create a new application in your account.

 

Syntax:

Nexmo.CreateApplication (string name, string type, [advanced]string answer_url, string event_url, [advanced][Optional]string answer_method, [advanced][Optional]string event_method)

 

Parameters:

Name

Type

Summary

Required

Related Action

name

string

(Name)

 

True

type

string

(Type)

 

True

answer_url

string

(Answer Url)

Where your webhook delivers the Nexmo Call Control Object.

True

event_url

string

(Events Url)

Started, ringing or complete

True

answer_method

string

(Answer Method)

HTTP method (Default GET).

False

event_method

string

(Event Method)

HTTP method (Default POST).

False

 

Returns:

          Type:applicationResponse

 

GetApplication

Summary: Get application by Id

Description: This operation is used to retrieve information about a single application, given its id.

 

Syntax:

Nexmo.GetApplication (string application_id)

 

Parameters:

Name

Type

Summary

Required

Related Action

application_id

string

(Application Id)

 

True

 

Returns:

          Type:applicationResponse

 

UpdateApplication

Summary: Update an application

Description: This operation is used to modify an existing application in your account.

 

Syntax:

Nexmo.UpdateApplication (string application_id, string name, string type, [advanced]string answer_url, string event_url, [advanced][Optional]string answer_method, [advanced][Optional]string event_method)

 

Parameters:

Name

Type

Summary

Required

Related Action

application_id

string

(Application Id)

 

True

name

string

(Name)

 

True

type

string

(Type)

 

True

answer_url

string

(Answer Url)

Where your webhook delivers the Nexmo Call Control Object.

True

event_url

string

(Events Url)

Started, ringing or complete

True

answer_method

string

(Answer Method)

HTTP method (Default GET).

False

event_method

string

(Event Method)

HTTP method (Default POST).

False

 

Returns:

          Type:applicationResponse

 

DeleteApplication

Summary: Delete an application

Description: This operation is used to delete an existing application in your account.

 

Syntax:

Nexmo.DeleteApplication (string application_id)

 

Parameters:

Name

Type

Summary

Required

Related Action

application_id

string

(Application Id)

 

True

 

Returns:

          Type:common

 


 

applicationResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

id

string

Id

Nexmo application id.

name

string

Name

Application name.

keys

Keys

 

keys

 

Keys

Summary:

Description: keys

 

          Properties:

Name

Type

Summary

public_key

string

Keys

The public key used to validate the jwt in a https://en.wikipedia.org/wiki/JSON_Web_Token.

 


 

common

Summary:

Description:

 

          Properties:

Name

Type

Summary

type

string

Response

Human readable message.

error_title

string

Error Text

Title of error returned if failed.

invalid_parameters

Invalid_parameters

 

message for invalid parameters

 

Invalid_parameters

Summary:

Description: message for invalid parameters

 

          Properties:

Name

Type

Summary

type

string

 

error string

 


 

ListApplicationsResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

_embedded

_embedded

 

 

 

_embedded

Summary:

Description:

 

          Properties:

Name

Type

Summary

applications

array of (applicationResponse)

 

 

 


 

ListNumbersResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

count

integer(int32)

Count

Result count.

numbers

array of (NumbersItem)

Numbers Array

List of all numbers.

 

NumbersItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

cost

string

Cost

Number cost.

country

string

Country

ISO 3166-1 alpha-2 format.

msisdn

string

Inbound Number

Inbound virtual number.

type

string

Type

Type of number.

 


 

smsResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

message-count

number

Message Count

Number of parts the message was split into.

messages

array of (MessagesItem)

Messages Array

Contains each message part.

 

MessagesItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

status

number

Status

Shows how the SMS send is processing.

message-id

string

Message Id

Id of the SMS that was submitted (8 to 16 characters).

to

string

To Phone Number

Number your request was sent to.

client-ref

string

Client Reference

The client-ref you set in the request.

remaining-balance

string

Remaining Balance

Balance in your account. The value is in EUR.

message-price

string

Message Price

Amount charged for your request. The value is in EUR.

network

string

Network

Mobile Country Code Mobile Network Code (MCCMNC) for the carrier that to is registered with.

error-text

string

Error Text

If an error occurred, this explains what happened.

 


 

ttsResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

call_id

number

Call Id

Unique alphanumeric 32 character ID for this call.

to

number

To Phone Number

Number of the user you sent the TTS or TTS Prompt to.

status

number

Status

Response code for this TTS or TTS prompt.

error_text

string

Error Text

If an error occurred, this explains what happened.