Skip to content

Vonage Numbers

github-actions edited this page May 24, 2024 · 41 revisions

Vonage NumbersDocs


Documentation / Vonage Numbers

Vonage Numbers

Enumerations

Feature

Enumeration of features for a virtual number.

Enumeration Members

Enumeration Member Value Description
MMS "MMS" Supports Multimedia Messaging Service (MMS).
SMS "SMS" Supports Short Message Service (SMS).
VOICE "VOICE" Supports Voice calling.

LineType

Enumeration of line types for virtual numbers.

Enumeration Members

Enumeration Member Value Description
LANDLINE "landline" Landline type.
LANDLINE_TOLL_FREE "landline-toll-free" Landline toll-free type.
MOBILE_LVN "mobile-lvn" Mobile LVN (Local Virtual Number) type.

MessagesCallbackTypeEnum

Enumeration of messages callback types.

Enumeration Members

Enumeration Member Value Description
App "app" Callback type for an application.

SearchPattern

Enumeration of search patterns.

Enumeration Members

Enumeration Member Value Description
CONTAINS 1 Indicates a search for values that contain the given pattern.
ENDS_WITH 2 Indicates a search for values that end with the given pattern.
START_WITH 0 Indicates a search for values that start with the given pattern.

VoiceCallbackTypeEnum

Enumeration of voice callback types.

Enumeration Members

Enumeration Member Value Description
App "app" Callback type for an application.
Sip "sip" Callback type for SIP.
Tel "tel" Callback type for telephone (tel).

Classes

Numbers

Client for buying, canceling, and searching for phone numbers.

Examples

Create a standalone Numbers client

import { Numbers } from '@vonage/numbers';

const numbersClient = new Numbers({
 apiKey: VONAGE_API_KEY,
 apiSecret: VONAGE_API_SECRET
});

Create an Numbers client from the Vonage client

import { Vonage } from '@vonage/server-client';

const vonage = new Vonage({
  apiKey: VONAGE_API_KEY,
  apiSecret: VONAGE_API_SECRET
});

const numbersClient = vonage.numbers;

Extends

Constructors

new Numbers()
new Numbers(credentials, options?): Numbers

Creates a new instance of the Client.

Parameters

credentials: AuthParams | AuthInterface

The authentication credentials or an authentication instance.

options?: ConfigParams

Optional configuration settings for the client.

Returns

Numbers

Inherited from

Client.constructor

Source

server-client/dist/client.d.ts:30

Properties

auth
protected auth: AuthInterface;

The authentication instance responsible for generating authentication headers and query parameters.

Inherited from

Client.auth

Source

server-client/dist/client.d.ts:19

authType
protected authType: AuthenticationType = AuthenticationType.QUERY_KEY_SECRET;

The type of authentication used for the client's requests.

Overrides

Client.authType

Source

numbers/lib/numbers.ts:124

config
protected config: ConfigParams;

Configuration settings for the client, including default hosts for various services and other request settings.

Inherited from

Client.config

Source

server-client/dist/client.d.ts:23

transformers
static transformers: __module;

Static property containing utility transformers.

Inherited from

Client.transformers

Source

server-client/dist/client.d.ts:11

Methods

addAuthenticationToRequest()
addAuthenticationToRequest(request): Promise<VetchOptions>

Adds the appropriate authentication headers or parameters to the request based on the authentication type.

Parameters

request: VetchOptions

The request options to which authentication needs to be added.

Returns

Promise<VetchOptions>

  • The request options with the added authentication.
Inherited from

Client.addAuthenticationToRequest

Source

server-client/dist/client.d.ts:37

buyNumber()
buyNumber(params): Promise<NumbersEmptyResponse>

Buy a phone number.

Parameters

params: NumbersParams

The parameters for buying a number.

Returns

Promise<NumbersEmptyResponse>

A promise that resolves to an empty response or an error response.

Example

Buy a phone number

import { Country } from '@vonage/numbers';
const resp = await numbersClient.buyNumber({
  country: Country.US,
  msisdn: '15555555555'
});

if (resp.errorCode) {
  console.log(`Error: ${resp.errorCodeLabel}`);
} else {
  console.log('Number bought successfully');
}
Source

numbers/lib/numbers.ts:148

cancelNumber()
cancelNumber(params): Promise<NumbersEmptyResponse>

Cancel a phone number.

Parameters

params: NumbersParams

The parameters for canceling a number.

Returns

Promise<NumbersEmptyResponse>

A promise that resolves to an empty response or an error response.

Example

Cancel a phone number

const resp = await numbersClient.cancelNumber({
 msisdn: '15555555555'
});

if (resp.errorCode) {
  console.log(`Error: ${resp.errorCodeLabel}`);
} else {
  console.log('Number cancled successfully');
}
Source

numbers/lib/numbers.ts:184

getAvailableNumbers()
getAvailableNumbers(filter): Promise<NumbersAvailableList>

Retrieves a list of available phone numbers based on the provided filter criteria.

Parameters

filter: NumbersSearchFilter

The filter criteria for searching available numbers.

Returns

Promise<NumbersAvailableList>

A promise that resolves to a list of available phone numbers or an error response.

Example

Search for available numbers that can send SMS and make voice calls

import { Country, Feature } from '@vonage/numbers';

const resp = await numbersClient.getAvailableNumbers({
  country: Country.US,
  features: [Feature.SMS, Feature.VOICE],
});

console.log(`There are ${resp.count} numbers available`);

for (const number of resp.numbers) {
  console.log(number.msisdn);
  console.log(number.cost);
  console.log(number.type);
}
Source

numbers/lib/numbers.ts:222

getOwnedNumbers()
getOwnedNumbers(filter?): Promise<NumbersOwnedList>

Retrieves a list of owned phone numbers based on the provided filter criteria.

Parameters

filter?: NumbersOwnedFilter

The filter criteria for searching owned numbers.

Returns

Promise<NumbersOwnedList>

A promise that resolves to a list of owned phone numbers or an error response.

Example

Search for owned numbers

const resp = await numbersClient.getOwnedNumbers();
console.log(`There are ${resp.count} numbers owned`);
for (const number of resp.numbers) {
  console.log(number.msisdn);
  console.log(number.type);
}
Source

numbers/lib/numbers.ts:264

parseResponse()
protected parseResponse<T>(request, response): Promise<VetchResponse<T>>

Parses the response based on its content type.

Type parameters

T

The expected type of the parsed response data.

Parameters

request: VetchOptions

The request options.

response: Response

The raw response from the request.

Returns

Promise<VetchResponse<T>>

  • The parsed response.
Inherited from

Client.parseResponse

Source

server-client/dist/client.d.ts:134

prepareBody()
protected prepareBody(request): undefined | string

Prepares the body for the request based on the content type.

Parameters

request: VetchOptions

The request options.

Returns

undefined | string

  • The prepared request body as a string or undefined.
Inherited from

Client.prepareBody

Source

server-client/dist/client.d.ts:124

prepareRequest()
protected prepareRequest(request): Promise<VetchOptions>

Prepares the request with necessary headers, authentication, and query parameters.

Parameters

request: VetchOptions

The initial request options.

Returns

Promise<VetchOptions>

  • The modified request options.
Inherited from

Client.prepareRequest

Source

server-client/dist/client.d.ts:117

sendDeleteRequest()
sendDeleteRequest<T>(url): Promise<VetchResponse<T>>

Sends a DELETE request to the specified URL.

Type parameters

T

Parameters

url: string

The URL endpoint for the DELETE request.

Returns

Promise<VetchResponse<T>>

  • The response from the DELETE request.
Inherited from

Client.sendDeleteRequest

Source

server-client/dist/client.d.ts:44

sendFormSubmitRequest()
sendFormSubmitRequest<T>(url, payload?): Promise<VetchResponse<T>>

Sends a POST request with form data to the specified URL.

Type parameters

T

Parameters

url: string

The URL endpoint for the POST request.

payload?: Record<string, string>

Optional payload containing form data to send with the POST request.

Returns

Promise<VetchResponse<T>>

  • The response from the POST request.
Inherited from

Client.sendFormSubmitRequest

Source

server-client/dist/client.d.ts:52

sendGetRequest()
sendGetRequest<T>(url, queryParams?): Promise<VetchResponse<T>>

Sends a GET request to the specified URL with optional query parameters.

Type parameters

T

Parameters

url: string

The URL endpoint for the GET request.

queryParams?

Optional query parameters to append to the URL. These should be compatible with Node's URLSearchParams.

Returns

Promise<VetchResponse<T>>

  • The response from the GET request.
Inherited from

Client.sendGetRequest

Source

server-client/dist/client.d.ts:60

sendPatchRequest()
sendPatchRequest<T>(url, payload?): Promise<VetchResponse<T>>

Sends a PATCH request to the specified URL with an optional payload.

Type parameters

T

Parameters

url: string

The URL endpoint for the PATCH request.

payload?

Optional payload to be sent as the body of the PATCH request.

Returns

Promise<VetchResponse<T>>

  • The response from the PATCH request.
Inherited from

Client.sendPatchRequest

Source

server-client/dist/client.d.ts:70

sendPostRequest()
sendPostRequest<T>(url, payload?): Promise<VetchResponse<T>>

Sends a POST request to the specified URL with an optional payload.

Type parameters

T

Parameters

url: string

The URL endpoint for the POST request.

payload?

Optional payload to be sent as the body of the POST request.

Returns

Promise<VetchResponse<T>>

  • The response from the POST request.
Inherited from

Client.sendPostRequest

Source

server-client/dist/client.d.ts:80

sendPutRequest()
sendPutRequest<T>(url, payload?): Promise<VetchResponse<T>>

Sends a PUT request to the specified URL with an optional payload.

Type parameters

T

Parameters

url: string

The URL endpoint for the PUT request.

payload?

Optional payload to be sent as the body of the PUT request.

Returns

Promise<VetchResponse<T>>

  • The response from the PUT request.
Inherited from

Client.sendPutRequest

Source

server-client/dist/client.d.ts:90

sendRequest()
sendRequest<T>(request): Promise<VetchResponse<T>>

Sends a request adding necessary headers, handling authentication, and parsing the response.

Type parameters

T

Parameters

request: VetchOptions

The options defining the request, including URL, method, headers, and data.

Returns

Promise<VetchResponse<T>>

  • The parsed response from the request.
Inherited from

Client.sendRequest

Source

server-client/dist/client.d.ts:110

sendRequestWithData()
sendRequestWithData<T>(
   method, 
   url, 
payload?): Promise<VetchResponse<T>>

Sends a request with JSON-encoded data to the specified URL using the provided HTTP method.

Type parameters

T

Parameters

method: POST | PUT | PATCH

The HTTP method to be used for the request (only POST, PATCH, or PUT are acceptable).

url: string

The URL endpoint for the request.

payload?

Optional payload to be sent as the body of the request, JSON-encoded.

Returns

Promise<VetchResponse<T>>

  • The response from the request.
Inherited from

Client.sendRequestWithData

Source

server-client/dist/client.d.ts:101

updateNumber()
updateNumber(params?): Promise<NumbersEmptyResponse>

Updates the settings of a phone number.

Parameters

params?: NumbersUpdateParams

The parameters for updating a phone number.

Returns

Promise<NumbersEmptyResponse>

A promise that resolves to an empty response or an error response.

Example
const resp = await numbersClient.updateNumber({
  msisdn: '15555555555',
  voiceCallbackType: 'app',
  voiceCallbackValue: 'APPLICATION_ID',
  voiceStatusCallback: 'https://example.com/webhooks/voice',
});

if (resp.errorCode) {
  console.log(`Error: ${resp.errorCodeLabel}`);
} else {
  console.log('Number bought successfully');
}
Source

numbers/lib/numbers.ts:300

Type Aliases

Country

type Country: 
  | "AD"
  | "AE"
  | "AF"
  | "AG"
  | "AI"
  | "AL"
  | "AM"
  | "AO"
  | "AQ"
  | "AR"
  | "AS"
  | "AT"
  | "AU"
  | "AW"
  | "AX"
  | "AZ"
  | "BA"
  | "BB"
  | "BD"
  | "BE"
  | "BF"
  | "BG"
  | "BH"
  | "BI"
  | "BJ"
  | "BL"
  | "BM"
  | "BN"
  | "BO"
  | "BQ"
  | "BR"
  | "BS"
  | "BT"
  | "BV"
  | "BW"
  | "BY"
  | "BZ"
  | "CA"
  | "CC"
  | "CD"
  | "CF"
  | "CG"
  | "CH"
  | "CI"
  | "CK"
  | "CL"
  | "CM"
  | "CN"
  | "CO"
  | "CR"
  | "CU"
  | "CV"
  | "CW"
  | "CX"
  | "CY"
  | "CZ"
  | "DE"
  | "DJ"
  | "DK"
  | "DM"
  | "DO"
  | "DZ"
  | "EC"
  | "EE"
  | "EG"
  | "EH"
  | "ER"
  | "ES"
  | "ET"
  | "FI"
  | "FJ"
  | "FK"
  | "FM"
  | "FO"
  | "FR"
  | "GA"
  | "GB"
  | "GD"
  | "GE"
  | "GF"
  | "GG"
  | "GH"
  | "GI"
  | "GL"
  | "GM"
  | "GN"
  | "GP"
  | "GQ"
  | "GR"
  | "GS"
  | "GT"
  | "GU"
  | "GW"
  | "GY"
  | "HK"
  | "HM"
  | "HN"
  | "HR"
  | "HT"
  | "HU"
  | "ID"
  | "IE"
  | "IL"
  | "IM"
  | "IN"
  | "IO"
  | "IQ"
  | "IR"
  | "IS"
  | "IT"
  | "JE"
  | "JM"
  | "JO"
  | "JP"
  | "KE"
  | "KG"
  | "KH"
  | "KI"
  | "KM"
  | "KN"
  | "KP"
  | "KR"
  | "KW"
  | "KY"
  | "KZ"
  | "LA"
  | "LB"
  | "LC"
  | "LI"
  | "LK"
  | "LR"
  | "LS"
  | "LT"
  | "LU"
  | "LV"
  | "LY"
  | "MA"
  | "MC"
  | "MD"
  | "ME"
  | "MF"
  | "MG"
  | "MH"
  | "MK"
  | "ML"
  | "MM"
  | "MN"
  | "MO"
  | "MP"
  | "MQ"
  | "MR"
  | "MS"
  | "MT"
  | "MU"
  | "MV"
  | "MW"
  | "MX"
  | "MY"
  | "MZ"
  | "NA"
  | "NC"
  | "NE"
  | "NF"
  | "NG"
  | "NI"
  | "NL"
  | "NO"
  | "NP"
  | "NR"
  | "NU"
  | "NZ"
  | "OM"
  | "PA"
  | "PE"
  | "PF"
  | "PG"
  | "PH"
  | "PK"
  | "PL"
  | "PM"
  | "PN"
  | "PR"
  | "PS"
  | "PT"
  | "PW"
  | "PY"
  | "QA"
  | "RE"
  | "RO"
  | "RS"
  | "RU"
  | "RW"
  | "SA"
  | "SB"
  | "SC"
  | "SD"
  | "SE"
  | "SG"
  | "SH"
  | "SI"
  | "SJ"
  | "SK"
  | "SL"
  | "SM"
  | "SN"
  | "SO"
  | "SR"
  | "SS"
  | "ST"
  | "SV"
  | "SX"
  | "SY"
  | "SZ"
  | "TC"
  | "TD"
  | "TF"
  | "TG"
  | "TH"
  | "TJ"
  | "TK"
  | "TL"
  | "TM"
  | "TN"
  | "TO"
  | "TR"
  | "TT"
  | "TV"
  | "TW"
  | "TZ"
  | "UA"
  | "UG"
  | "US"
  | "UY"
  | "UZ"
  | "VA"
  | "VC"
  | "VE"
  | "VG"
  | "VI"
  | "VN"
  | "VU"
  | "WF"
  | "WS"
  | "YE"
  | "YT"
  | "ZA"
  | "ZM"
  | "ZW"
  | string;

ISO 3166-1 alpha-2 country codes.

Source

numbers/lib/types/Country.ts:4


NumbersAvailableList

type NumbersAvailableList: object;

Represents a list of available numbers.

Type declaration

count?
optional count: number;

The total count of available numbers.

numbers?
optional numbers: NumbersAvailableNumber[];

An array of available numbers and their details.

Source

numbers/lib/types/NumbersAvailableList.ts:6


NumbersAvailableNumber

type NumbersAvailableNumber: object;

Represents an available phone number with its details.

Type declaration

cost?
optional cost: string;

The cost associated with the phone number. Example: "$10.00".

country?
optional country: Country;

The two-character country code in ISO 3166-1 alpha-2 format. Example: "US" for the United States.

features?
optional features: Feature[];

The capabilities/features of the phone number, such as SMS, VOICE, or MMS. Example: ["SMS", "VOICE"].

msisdn?
optional msisdn: string;

An available inbound virtual phone number. Example: "447700900000".

type?
optional type: LineType;

The type of phone number. Example: "mobile-lvn" or "landline".

Source

numbers/lib/types/NumbersAvailableNumber.ts:7


NumbersClassParameters

type NumbersClassParameters: AuthParams & VetchOptions & object;

Represents the parameters for configuring the NumbersClass.

Deprecated

This is no longer in use

Type declaration

auth?
optional auth: AuthInterface;

The authentication configuration.

Source

numbers/lib/types/NumbersClassParameters.ts:9


NumbersEmptyResponse

type NumbersEmptyResponse: object;

Represents a response with optional error code and label for empty number-related operations.

Type declaration

error-code?
optional error-code: 200 | 401 | number;

The error code, if an error occurred during the operation. Example: "E001".

error-code-label?
optional error-code-label: string;

A human-readable label or description of the error code. Example: "Invalid request."

errorCode?
optional errorCode: string;

The error code, if an error occurred during the operation. Example: "E001".

errorCodeLabel?
optional errorCodeLabel: string;

A human-readable label or description of the error code. Example: "Invalid request."

Source

numbers/lib/types/NumbersEmptyResponse.ts:4


NumbersOwnedFilter

type NumbersOwnedFilter: object;

Represents filters for searching owned numbers.

Type declaration

applicationId?
optional applicationId: string;

An Application ID. Example: "aaaaaaaa-bbbb-cccc-dddd-0123456789ab".

country?
optional country: Country;

The two-character country code in ISO 3166-1 alpha-2 format. Example: "US" for the United States.

hasApplication?
optional hasApplication: boolean;

Indicates whether numbers have an associated application.

index?
optional index: number;

The starting index for paginated results.

pattern?
optional pattern: string;

A pattern to filter numbers.

searchPattern?
optional searchPattern: SearchPattern;

The search pattern type. Example: SearchPattern.START_WITH.

size?
optional size: number;

The maximum number of results to return.

Source

numbers/lib/types/NumbersOwnedFilter.ts:7


NumbersOwnedList

type NumbersOwnedList: object;

Represents a list of owned numbers.

Type declaration

count?
optional count: number;

The total count of owned numbers.

numbers?
optional numbers: NumbersOwnedNumber[];

An array of owned numbers and their details.

Source

numbers/lib/types/NumbersOwnedList.ts:6


NumbersOwnedNumber

type NumbersOwnedNumber: object;

Represents an owned phone number with its details.

Type declaration

country?
optional country: Country;

The two-character country code in ISO 3166-1 alpha-2 format. Example: "US" for the United States.

features?
optional features: Feature[];

The capabilities/features of the phone number, such as SMS, VOICE, or MMS. Example: ["SMS", "VOICE"].

messagesCallbackType?
optional messagesCallbackType: string;

The type of messages callback for the number. Example: "app".

messagesCallbackValue?
optional messagesCallbackValue: string;

The value associated with the messages callback. Example: "aaaaaaaa-bbbb-cccc-dddd-0123456789ab".

moHttpUrl?
optional moHttpUrl: string;

The URL of the webhook endpoint that handles inbound messages for the number. Example: "https://example.com/webhooks/inbound-sms".

msisdn?
optional msisdn: string;

The owned phone number. Example: "447700900000".

type?
optional type: LineType;

The type of phone number. Example: "mobile-lvn" or "landline".

voiceCallbackType?
optional voiceCallbackType: string;

The type of voice callback for the number. Example: "app" or "sip".

voiceCallbackValue?
optional voiceCallbackValue: string;

The value associated with the voice callback. Example: "aaaaaaaa-bbbb-cccc-dddd-0123456789ab".

Source

numbers/lib/types/NumbersOwnedNumber.ts:7


NumbersParams

type NumbersParams: object;

Represents parameters for configuring a phone number.

Type declaration

country
country: Country;

The two-character country code in ISO 3166-1 alpha-2 format. Example: "US" for the United States.

msisdn
msisdn: string;

The phone number. Example: "447700900000".

targetApiKey?
optional targetApiKey: string;

An optional target API key.

Source

numbers/lib/types/NumbersParams.ts:6


NumbersQueryOwnedFilter

type NumbersQueryOwnedFilter: object;

Represents filters for querying owned numbers.

Type declaration

application_id?
optional application_id: string;

An Application ID. Example: "aaaaaaaa-bbbb-cccc-dddd-0123456789ab".

country?
optional country: Country;

The two-character country code in ISO 3166-1 alpha-2 format. Example: "US" for the United States.

has_application?
optional has_application: boolean;

Indicates whether numbers have an associated application.

index?
optional index: number;

The starting index for paginated results.

pattern?
optional pattern: string;

A pattern to filter numbers.

search_pattern?
optional search_pattern: number;

The search pattern type. Example: 0 for "START_WITH".

size?
optional size: number;

The maximum number of results to return.

Source

numbers/lib/types/NumbersQueryOwnedFilter.ts:6


NumbersQueryParams

type NumbersQueryParams: object;

Represents parameters for querying phone numbers.

Type declaration

country
country: Country;

The two-character country code in ISO 3166-1 alpha-2 format. Example: "US" for the United States.

msisdn
msisdn: string;

The phone number. Example: "447700900000".

target_api_key?
optional target_api_key: string;

An optional target API key.

Source

numbers/lib/types/NumbersQueryParams.ts:6


NumbersQuerySearchFilter

type NumbersQuerySearchFilter: object;

Represents filters for searching phone numbers.

Type declaration

country?
optional country: Country;

The two-character country code in ISO 3166-1 alpha-2 format. Example: "US" for the United States.

index?
optional index: number;

The starting index for paginated results.

pattern?
optional pattern: string;

A pattern to filter numbers.

search_pattern?
optional search_pattern: number;

The search pattern type. Example: 0 for "START_WITH".

size?
optional size: number;

The maximum number of results to return.

Source

numbers/lib/types/NumbersQuerySearchFilter.ts:6


NumbersQueryUpdateParams

type NumbersQueryUpdateParams: object;

Represents parameters for updating phone number settings.

Type declaration

app_id?
optional app_id: string;

An Application ID. Example: "aaaaaaaa-bbbb-cccc-dddd-0123456789ab".

country
country: Country;

The two-character country code in ISO 3166-1 alpha-2 format. Example: "US" for the United States.

messagesCallbackType?
optional messagesCallbackType: MessagesCallbackTypeEnum;

The messages callback type.

Deprecated
messagesCallbackValue?
optional messagesCallbackValue: string;

The messages callback value.

Deprecated
moHttpUrl?
optional moHttpUrl: string;

The HTTP URL for handling MO (Mobile Originated) messages.

moSmppSysType?
optional moSmppSysType: string;

The SMPP system type for MO (Mobile Originated) messages.

msisdn
msisdn: string;

The phone number. Example: "447700900000".

voiceCallbackType?
optional voiceCallbackType: VoiceCallbackTypeEnum;

The voice callback type.

voiceCallbackValue?
optional voiceCallbackValue: string;

The voice callback value.

voiceStatusCallback?
optional voiceStatusCallback: string;

The voice status callback URL.

Source

numbers/lib/types/NumbersQueryUpdateParams.ts:7


NumbersResponse<T>

type NumbersResponse<T>: VetchResponse<T>;

Represents a response for phone numbers.

Type parameters

T

The type of the response data.

Source

numbers/lib/types/NumbersResponse.ts:7


NumbersSearchFilter

type NumbersSearchFilter: object;

Represents filters for searching phone numbers.

Type declaration

country
country: Country;

The two-character country code in ISO 3166-1 alpha-2 format. Example: "US" for the United States.

features?
optional features: Feature[];

The capabilities or features of the number.

index?
optional index: number;

The starting index for paginated results.

pattern?
optional pattern: string;

A pattern to filter numbers.

searchPattern?
optional searchPattern: SearchPattern;

The search pattern type. Example: 0 for "START_WITH".

size?
optional size: number;

The maximum number of results to return.

type?
optional type: LineType;

The type of the phone number.

Source

numbers/lib/types/NumbersSearchFilter.ts:7


NumbersSearchSimple

type NumbersSearchSimple: object;

Represents simple search options for phone numbers.

Type declaration

contains?
optional contains: string;

Filter numbers that contain a specific string.

endsWith?
optional endsWith: string;

Filter numbers that end with a specific string.

startsWith?
optional startsWith: string;

Filter numbers that start with a specific string.

Source

numbers/lib/types/NumbersSearchSimple.ts:4


NumbersUpdateParams

type NumbersUpdateParams: object;

Represents parameters for updating phone numbers.

Type declaration

appId?
optional appId: string;

The application ID associated with the phone number.

applicationId?
optional applicationId: string;

The application ID associated with the phone number.

Deprecated

Please use app_id

country
country: Country;

The two-character country code in ISO 3166-1 alpha-2 format. Example: "US" for the United States.

messagesCallbackType?
optional messagesCallbackType: MessagesCallbackTypeEnum;

The type of messages callback: "app".

Deprecated

Use voiceCallbackType instead.

messagesCallbackValue?
optional messagesCallbackValue: string;

The value for messages callback.

Deprecated

Use voiceCallbackValue instead.

moHttpUrl?
optional moHttpUrl: string;

The URL of the webhook endpoint that handles inbound messages.

moSmppSysType?
optional moSmppSysType: string;

The system type for SMPP MO messages.

msisdn
msisdn: string;

The phone number in E.164 format. Example: "+1234567890".

voiceCallbackType?
optional voiceCallbackType: VoiceCallbackTypeEnum;

The type of voice callback: "sip", "tel", or "app".

voiceCallbackValue?
optional voiceCallbackValue: string;

The value for voice callback.

voiceStatusCallback?
optional voiceStatusCallback: string;

The URL of the voice status callback.

Source

numbers/lib/types/NumbersUpdateParams.ts:7

Clone this wiki locally