Skip to content

Vonage Messages

github-actions edited this page Jan 10, 2025 · 77 revisions

Vonage Messages


Documentation / Vonage Messages

Vonage Messages

Other

Channels

Defined in: messages/lib/enums/Channels.ts:1

Enumeration Members

Enumeration Member Value Defined in
MESSENGER "messenger" messages/lib/enums/Channels.ts:2
MMS "mms" messages/lib/enums/Channels.ts:3
RCS "rcs" messages/lib/enums/Channels.ts:7
SMS "sms" messages/lib/enums/Channels.ts:4
VIBER "viber_service" messages/lib/enums/Channels.ts:6
WHATSAPP "whatsapp" messages/lib/enums/Channels.ts:5

MessengerCategory

Defined in: messages/lib/enums/Messenger/MessengerCategory.ts:6

Enum representing categories for Facebook Messenger messages.

Enumeration Members

Enumeration Member Value Description Defined in
MESSAGE_TAG "message_tag" Represents a message tag message category. messages/lib/enums/Messenger/MessengerCategory.ts:20
RESPONSE "response" Represents a response message category. messages/lib/enums/Messenger/MessengerCategory.ts:10
UPDATE "update" Represents an update message category. messages/lib/enums/Messenger/MessengerCategory.ts:15

MessengerTags

Defined in: messages/lib/enums/Messenger/MessengerTags.ts:8

Enum representing message tags for Facebook Messenger messages.

These tags are used to categorize the purpose and relevance of the message.

Enumeration Members

Enumeration Member Value Description Defined in
ACCOUNT_UPDATE "ACCOUNT_UPDATE" Represents an account update message tag. messages/lib/enums/Messenger/MessengerTags.ts:22
APPOINTMENT_UPDATE "APPOINTMENT_UPDATE" Represents an appointment update message tag. messages/lib/enums/Messenger/MessengerTags.ts:47
CONFIRMED_EVENT_UPDATE "CONFIRMED_EVENT_UPDATE" Represents a confirmed event update message tag. messages/lib/enums/Messenger/MessengerTags.ts:12
FEATURE_FUNCTIONALITY_UPDATE "FEATURE_FUNCTIONALITY_UPDATE" Represents a feature functionality update message tag. messages/lib/enums/Messenger/MessengerTags.ts:62
GAME_EVENT "GAME_EVENT" Represents a game event message tag. messages/lib/enums/Messenger/MessengerTags.ts:52
HUMAN_AGENT "HUMAN_AGENT" Represents a message tag for human agent communication. messages/lib/enums/Messenger/MessengerTags.ts:27
ISSUE_RESOLUTION "ISSUE_RESOLUTION" Represents a message tag for issue resolution. messages/lib/enums/Messenger/MessengerTags.ts:42
PAYMENT_UPDATE "PAYMENT_UPDATE" Represents a payment update message tag. messages/lib/enums/Messenger/MessengerTags.ts:72
PERSONAL_FINANCE_UPDATE "PERSONAL_FINANCE_UPDATE" Represents a personal finance update message tag. messages/lib/enums/Messenger/MessengerTags.ts:77
POST_PURCHASE_UPDATE "POST_PURCHASE_UPDATE" Represents a post-purchase update message tag. messages/lib/enums/Messenger/MessengerTags.ts:17
RESERVATION_UPDATE "RESERVATION_UPDATE" Represents a reservation update message tag. messages/lib/enums/Messenger/MessengerTags.ts:37
SHIPPING_UPDATE "SHIPPING_UPDATE" Represents a shipping update message tag. messages/lib/enums/Messenger/MessengerTags.ts:32
TICKET_UPDATE "TICKET_UPDATE" Represents a ticket update message tag. messages/lib/enums/Messenger/MessengerTags.ts:67
TRANSPORTATION_UPDATE "TRANSPORTATION_UPDATE" Represents a transportation update message tag. messages/lib/enums/Messenger/MessengerTags.ts:57

UpdateMessageStatus

Defined in: messages/lib/enums/UpdateMessageStatus.ts:2

Enumeration Members

Enumeration Member Value Description Defined in
READ "read" The status to set for the message. Setting the status of an inbound WhatsApp message to read indicates to the sender of the message that the message has been read (blue ticks are shown on that message in the WhatsApp UI). The status of an outbound WhatsApp message cannot be updated via this endpoint. messages/lib/enums/UpdateMessageStatus.ts:10
REVOKED "revoked" The status to set for the message. Setting the status of an outbound RCS message to revoked revokes that message if possible. messages/lib/enums/UpdateMessageStatus.ts:17

ViberCategory

Defined in: messages/lib/enums/Viber/ViberCategory.ts:8

Enum representing message categories for Viber messages.

These categories are used to classify the type and purpose of Viber messages.

Enumeration Members

Enumeration Member Value Description Defined in
PROMOTION "promotion" Represents the promotion message category. messages/lib/enums/Viber/ViberCategory.ts:17
TRANSACTION "transaction" Represents the transaction message category. messages/lib/enums/Viber/ViberCategory.ts:12

WhatsAppLanguageCode

Defined in: messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:8

Enum representing language codes for WhatsApp messages.

These language codes are used to specify the language of WhatsApp messages.

Enumeration Members

Enumeration Member Value Defined in
AFRIKAANS "af" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:9
ALBANIAN "sq" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:10
ARABIC "ar" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:11
AZERBAIJANI "az" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:12
BENGALI "bn" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:13
BULGARIAN "bg" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:14
CATALAN "ca" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:15
CHINESE_CHN "zh_CN" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:16
CHINESE_HKG "zh_HK" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:17
CHINESE_TAI "zh_TW" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:18
CROATIAN "hr" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:19
CZECH "cs" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:20
DANISH "da" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:21
DUTCH "nl" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:22
ENGLISH "en" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:23
ENGLISH_UK "en_GB" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:24
ENGLISH_US "en_US" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:25
ESTONIAN "et" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:26
FILIPINO "fil" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:27
FINNISH "fi" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:28
FRENCH "fr" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:29
GEORGIAN "ka" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:30
GERMAN "de" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:31
GREEK "el" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:32
GUJARATI "gu" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:33
HAUSA "ha" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:34
HEBREW "he" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:35
HINDI "hi" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:36
HUNGARIAN "hu" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:37
INDONESIAN "id" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:38
IRISH "ga" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:39
ITALIAN "it" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:40
JAPANESE "ja" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:41
KANNADA "kn" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:42
KAZAKH "kk" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:43
KINYARWANDA "rw_RW" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:44
KOREAN "ko" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:45
KYRGYZ_KYRGYZSTAN "ky_KG" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:46
LAO "lo" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:47
LATVIAN "lv" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:48
LITHUANIAN "lt" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:49
MACEDONIAN "mk" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:50
MALAY "ms" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:51
MALAYALAM "ml" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:52
MARATHI "mr" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:53
NORWEGIAN "nb" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:54
PERSIAN "fa" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:55
POLISH "pl" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:56
PORTUGUESE_BR "pt_BR" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:57
PORTUGUESE_POR "pt_PT" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:58
PUNJABI "pa" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:59
ROMANIAN "ro" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:60
RUSSIAN "ru" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:61
SERBIAN "sr" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:62
SLOVAK "sk" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:63
SLOVENIAN "sl" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:64
SPANISH "es" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:65
SPANISH_ARG "es_AR" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:66
SPANISH_MEX "es_MX" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:68
SPANISH_SPA "es_ES" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:67
SWAHILI "sw" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:69
SWEDISH "sv" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:70
TAMIL "ta" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:71
TELUGU "te" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:72
THAI "th" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:73
TURKISH "tr" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:74
UKRAINIAN "uk" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:75
URDU "ur" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:76
UZBEK "uz" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:77
VIETNAMESE "vi" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:78
ZULU "zu" messages/lib/enums/WhatsApp/WhatsAppLanguageCodes.ts:79

abstract AbstractAudioMessage

Defined in: messages/lib/classes/AbstractAudioMessage.ts:8

An abstract base class for audio messages.

Extends

Extended by

Implements

Constructors

new AbstractAudioMessage()
new AbstractAudioMessage(params): AbstractAudioMessage

Defined in: messages/lib/classes/AbstractAudioMessage.ts:20

Constructs a new AbstractAudioMessage instance.

Parameters
params

MessageParamsAudio

The parameters for creating an audio message.

Returns

AbstractAudioMessage

Overrides

AbstractMessage

Properties

audio
audio: MessageAudioType;

Defined in: messages/lib/classes/AbstractAudioMessage.ts:13

The audio message content.

Implementation of
MessageParamsAudio.audio
clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
MessageParamsAudio.clientRef
Inherited from

AbstractMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
MessageParamsAudio.from
Inherited from

AbstractMessage

messageType
messageType: "audio";

Defined in: messages/lib/classes/AbstractAudioMessage.ts:12

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
MessageParamsAudio.to
Inherited from

AbstractMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
MessageParamsAudio.webhookUrl
Inherited from

AbstractMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
MessageParamsAudio.webhookVersion
Inherited from

AbstractMessage


abstract AbstractFileMessage

Defined in: messages/lib/classes/AbstractFileMessage.ts:7

An abstract base class for file messages.

Extends

Extended by

Implements

Constructors

new AbstractFileMessage()
protected new AbstractFileMessage(params): AbstractFileMessage

Defined in: messages/lib/classes/AbstractFileMessage.ts:19

Constructs a new AbstractFileMessage instance.

Parameters
params

MessageParamsFile

The parameters for creating a file message.

Returns

AbstractFileMessage

Overrides

AbstractMessage

Properties

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
MessageParamsFile.clientRef
Inherited from

AbstractMessage

file
file: MessageFileType;

Defined in: messages/lib/classes/AbstractFileMessage.ts:12

The file attachment content.

Implementation of
MessageParamsFile.file
from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
MessageParamsFile.from
Inherited from

AbstractMessage

messageType
messageType: "file";

Defined in: messages/lib/classes/AbstractFileMessage.ts:11

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
MessageParamsFile.to
Inherited from

AbstractMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
MessageParamsFile.webhookUrl
Inherited from

AbstractMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
MessageParamsFile.webhookVersion
Inherited from

AbstractMessage


abstract AbstractImageMessage

Defined in: messages/lib/classes/AbstractImageMessage.ts:8

An abstract base class for image messages.

Extends

Extended by

Implements

Constructors

new AbstractImageMessage()
new AbstractImageMessage(params): AbstractImageMessage

Defined in: messages/lib/classes/AbstractImageMessage.ts:20

Constructs a new AbstractImageMessage instance.

Parameters
params

MessageParamsImage

The parameters for creating an image message.

Returns

AbstractImageMessage

Overrides

AbstractMessage

Properties

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
MessageParamsImage.clientRef
Inherited from

AbstractMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
MessageParamsImage.from
Inherited from

AbstractMessage

image
image: MessageImageType;

Defined in: messages/lib/classes/AbstractImageMessage.ts:13

The image attachment content.

Implementation of
MessageParamsImage.image
messageType
messageType: "image";

Defined in: messages/lib/classes/AbstractImageMessage.ts:12

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
MessageParamsImage.to
Inherited from

AbstractMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
MessageParamsImage.webhookUrl
Inherited from

AbstractMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
MessageParamsImage.webhookVersion
Inherited from

AbstractMessage


abstract AbstractMessage

Defined in: messages/lib/classes/AbstractMessage.ts:6

An abstract base class for message objects.

Extended by

Implements

Constructors

new AbstractMessage()
new AbstractMessage(params): AbstractMessage

Defined in: messages/lib/classes/AbstractMessage.ts:43

Constructs a new AbstractMessage instance.

Parameters
params

MessageParams

The parameters for creating a message.

Returns

AbstractMessage

Properties

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
MessageParams.clientRef
from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
MessageParams.from
to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
MessageParams.to
webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
MessageParams.webhookUrl
webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
MessageParams.webhookVersion

abstract AbstractTextMessage

Defined in: messages/lib/classes/AbstractTextMessage.ts:7

An abstract base class for text message objects.

Extends

Extended by

Implements

Constructors

new AbstractTextMessage()
new AbstractTextMessage(params): AbstractTextMessage

Defined in: messages/lib/classes/AbstractTextMessage.ts:26

Constructs a new AbstractTextMessage instance for text messages.

Parameters
params

MessageParamsText

The parameters for creating a text message.

Returns

AbstractTextMessage

Overrides

AbstractMessage

Properties

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
MessageParamsText.clientRef
Inherited from

AbstractMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
MessageParamsText.from
Inherited from

AbstractMessage

messageType
messageType: "text";

Defined in: messages/lib/classes/AbstractTextMessage.ts:14

The type of message, which is 'text' for text messages.

text
text: string;

Defined in: messages/lib/classes/AbstractTextMessage.ts:19

The text content of the message.

Implementation of
MessageParamsText.text
to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
MessageParamsText.to
Inherited from

AbstractMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
MessageParamsText.webhookUrl
Inherited from

AbstractMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
MessageParamsText.webhookVersion
Inherited from

AbstractMessage


abstract AbstractVcardMessage

Defined in: messages/lib/classes/AbstractVcardMessage.ts:8

An abstract base class for vCard (contact card) message objects.

Extends

Extended by

Implements

Constructors

new AbstractVcardMessage()
new AbstractVcardMessage(params): AbstractVcardMessage

Defined in: messages/lib/classes/AbstractVcardMessage.ts:27

Constructs a new AbstractVcardMessage instance for vCard messages.

Parameters
params

MessageParamsVcard

The parameters for creating a vCard message.

Returns

AbstractVcardMessage

Overrides

AbstractMessage

Properties

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
MessageParamsVcard.clientRef
Inherited from

AbstractMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
MessageParamsVcard.from
Inherited from

AbstractMessage

messageType
messageType: "vcard";

Defined in: messages/lib/classes/AbstractVcardMessage.ts:15

The type of message, which is 'vcard' for vCard messages.

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
MessageParamsVcard.to
Inherited from

AbstractMessage

vcard
vcard: MessageVcardType;

Defined in: messages/lib/classes/AbstractVcardMessage.ts:20

The vCard (contact card) content of the message.

Implementation of
MessageParamsVcard.vcard
webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
MessageParamsVcard.webhookUrl
Inherited from

AbstractMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
MessageParamsVcard.webhookVersion
Inherited from

AbstractMessage


abstract AbstractVideoMessage

Defined in: messages/lib/classes/AbstractVideoMessage.ts:8

An abstract base class for video message objects.

Extends

Extended by

Implements

Constructors

new AbstractVideoMessage()
new AbstractVideoMessage(params): AbstractVideoMessage

Defined in: messages/lib/classes/AbstractVideoMessage.ts:27

Constructs a new AbstractVideoMessage instance for video messages.

Parameters
params

MessageParamsVideo

The parameters for creating a video message.

Returns

AbstractVideoMessage

Overrides

AbstractMessage

Properties

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
MessageParamsVideo.clientRef
Inherited from

AbstractMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
MessageParamsVideo.from
Inherited from

AbstractMessage

messageType
messageType: "video";

Defined in: messages/lib/classes/AbstractVideoMessage.ts:15

The type of message, which is 'video' for video messages.

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
MessageParamsVideo.to
Inherited from

AbstractMessage

video
video: MessageVideoType;

Defined in: messages/lib/classes/AbstractVideoMessage.ts:20

The video content of the message.

Implementation of
MessageParamsVideo.video
webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
MessageParamsVideo.webhookUrl
Inherited from

AbstractMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
MessageParamsVideo.webhookVersion
Inherited from

AbstractMessage


Messages

Defined in: messages/lib/messages.ts:47

Client class to interact with the Messages API which enables users to manage send messages through various channels programmatically.

See

https://developer.nexmo.com/en/messages/overview

Examples

Create a standalone Messages client

import { Messages } from '@vonage/messages';

const messagesClient = new Messages({
 apiKey: VONAGE_API_KEY,
 apiSecret: VONAGE_API_SECRET
});

Create an Messages client from the Vonage client

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

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

const messagesClient = vonage.messages;

Extends

Constructors

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

Defined in: server-client/dist/lib/client.d.ts:35

Creates a new instance of the Client.

Parameters
credentials

The authentication credentials or an authentication instance.

AuthInterface | AuthParams

options?

ConfigParams

Optional configuration settings for the client.

Returns

Messages

Inherited from

Client.constructor

Methods

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

Defined in: messages/lib/messages.ts:57

Adds authentication details to the given request based on the configured authentication type. Handle various ways the Messages API handles auth The Messages API handles both JWT (preferred) as well as Basic so we cannot just set a local authType

Parameters
request

VetchOptions

The request to which authentication should be added.

Returns

Promise<VetchOptions>

A promise that resolves to the request with added authentication.

Overrides

Client.addAuthenticationToRequest

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

Defined in: server-client/dist/lib/client.d.ts:71

Adds basic authentication headers to the request.

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

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

Defined in: server-client/dist/lib/client.d.ts:64

Adds a JWT to the request.

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

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

Defined in: server-client/dist/lib/client.d.ts:57

Adds API key and secret to the request.

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

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

Defined in: server-client/dist/lib/client.d.ts:50

Adds API key and secret to the request body.

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

getConfig()
getConfig(): ConfigParams

Defined in: server-client/dist/lib/client.d.ts:36

Returns

ConfigParams

Inherited from

Client.getConfig

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

Defined in: server-client/dist/lib/client.d.ts:168

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

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

Defined in: server-client/dist/lib/client.d.ts:158

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

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

Defined in: server-client/dist/lib/client.d.ts:151

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

send()
send(message): Promise<MessageSuccess>

Defined in: messages/lib/messages.ts:82

Sends a message using the Vonage API.

Parameters
message

The message to be sent.

AnyChannel

Returns

Promise<MessageSuccess>

A promise that resolves to a success response with a message UUID.

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

Defined in: server-client/dist/lib/client.d.ts:78

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

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

Defined in: server-client/dist/lib/client.d.ts:86

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, undefined | 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

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

Defined in: server-client/dist/lib/client.d.ts:94

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

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

Defined in: server-client/dist/lib/client.d.ts:104

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

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

Defined in: server-client/dist/lib/client.d.ts:114

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

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

Defined in: server-client/dist/lib/client.d.ts:124

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

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

Defined in: server-client/dist/lib/client.d.ts:144

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

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

Defined in: server-client/dist/lib/client.d.ts:135

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

Type Parameters

T

Parameters
method

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

POST | PUT | PATCH

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

updateMessage()
updateMessage(messageId, status): Promise<true>

Defined in: messages/lib/messages.ts:131

Update the status of outbound and/or inbound messages for certain channels. For example, you can revoke outbound messages or mark inbound messages as read.

Please not that this endpoint is region specifc. You will need to set the region when you create the client.

Parameters
messageId

string

The ID of the message to update.

status

string

The status to update the message to.

Returns

Promise<true>

A promise that resolves to true if the message was updated successfully.

Example

Update the status of a WhatsApp message to "read"

const vonage = new Vonage(
  {
    applicationId: myAppId,
    privateKey: myPrivateKey
  },
  {
    apiHost: 'https://api-eu.vonage.com'
  }
)

await vonage.messages.updateMessage(messageId, UpdateMessageStatus.READ);

Properties

auth
protected auth: AuthInterface;

Defined in: server-client/dist/lib/client.d.ts:24

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

Inherited from

Client.auth

authType?
protected optional authType: AuthenticationType;

Defined in: server-client/dist/lib/client.d.ts:20

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

Inherited from

Client.authType

config
protected config: ConfigParams;

Defined in: server-client/dist/lib/client.d.ts:28

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

Inherited from

Client.config

transformers
static transformers: object;

Defined in: server-client/dist/lib/client.d.ts:11

Static property containing utility transformers.

camelCaseObjectKeys
camelCaseObjectKeys: PartialTransformFunction;
kebabCaseObjectKeys
kebabCaseObjectKeys: PartialTransformFunction;
omit()
omit: (keys, obj) => TransformedObject;
Parameters
keys

string[]

obj

ObjectToTransform

Returns

TransformedObject

snakeCaseObjectKeys
snakeCaseObjectKeys: PartialTransformFunction;
Inherited from

Client.transformers


MessengerAudio

Defined in: messages/lib/classes/Messenger/MessengerAudio.ts:9

Represents an audio message for the Messenger channel.

Extends

Implements

Constructors

new MessengerAudio()
new MessengerAudio(params): MessengerAudio

Defined in: messages/lib/classes/Messenger/MessengerAudio.ts:43

Sends an audio message to the Facebook Messenger channel.

Parameters
params

MessengerAudioParams

The parameters for creating a Messenger audio message.

Returns

MessengerAudio

Example
import { MessengerAudio } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new MessengerAudio({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 audio: {
   url: 'https://example.com/audio.mp3',
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractAudioMessage

Properties

audio
audio: MessageAudioType;

Defined in: messages/lib/classes/AbstractAudioMessage.ts:13

The audio message content.

Implementation of
MessengerAudioParams.audio
Inherited from

AbstractAudioMessage

channel
channel: "messenger";

Defined in: messages/lib/classes/Messenger/MessengerAudio.ts:16

The channel for this message (always 'messenger').

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
MessengerAudioParams.clientRef
Inherited from

AbstractAudioMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
MessengerAudioParams.from
Inherited from

AbstractAudioMessage

messageType
messageType: "audio";

Defined in: messages/lib/classes/AbstractAudioMessage.ts:12

Inherited from

AbstractAudioMessage

messenger
messenger: MessengerType;

Defined in: messages/lib/classes/Messenger/MessengerAudio.ts:21

The messenger information for this message.

Implementation of
MessengerAudioParams.messenger
to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
MessengerAudioParams.to
Inherited from

AbstractAudioMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
MessengerAudioParams.webhookUrl
Inherited from

AbstractAudioMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
MessengerAudioParams.webhookVersion
Inherited from

AbstractAudioMessage


MessengerFile

Defined in: messages/lib/classes/Messenger/MessengerFile.ts:9

Represents a file message for the Messenger channel.

Extends

Implements

Constructors

new MessengerFile()
new MessengerFile(params): MessengerFile

Defined in: messages/lib/classes/Messenger/MessengerFile.ts:45

Sends a file message to the Facebook Messenger channel.

Parameters
params

MessageParams

The parameters for creating a Messenger file message.

Returns

MessengerFile

Example
import { MessengerFile } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new MessengerFile({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 file: {
   url: 'https://example.com/image.jpg',
   caption: 'This is an image',
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractFileMessage

Properties

channel
channel: "messenger";

Defined in: messages/lib/classes/Messenger/MessengerFile.ts:16

The channel for this message (always 'messenger').

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
MessageParams.clientRef
Inherited from

AbstractFileMessage

file
file: MessageFileType;

Defined in: messages/lib/classes/AbstractFileMessage.ts:12

The file attachment content.

Implementation of
MessengerFileParams.file
Inherited from

AbstractFileMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
MessageParams.from
Inherited from

AbstractFileMessage

messageType
messageType: "file";

Defined in: messages/lib/classes/AbstractFileMessage.ts:11

Inherited from

AbstractFileMessage

messenger
messenger: MessengerType;

Defined in: messages/lib/classes/Messenger/MessengerFile.ts:21

The messenger information for this message.

Implementation of
MessengerFileParams.messenger
to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
MessageParams.to
Inherited from

AbstractFileMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
MessageParams.webhookUrl
Inherited from

AbstractFileMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
MessageParams.webhookVersion
Inherited from

AbstractFileMessage


MessengerImage

Defined in: messages/lib/classes/Messenger/MessengerImage.ts:12

Represents an image message for the Messenger channel.

This class extends the AbstractImageMessage class and implements the MessengerImageParams interface. It is used for sending image messages on the Messenger channel.

Extends

Implements

Constructors

new MessengerImage()
new MessengerImage(params): MessengerImage

Defined in: messages/lib/classes/Messenger/MessengerImage.ts:47

Send an image message using the Facebook Messenger channel.

Parameters
params

MessengerImageParams

The parameters for the image message.

Returns

MessengerImage

Example
import { MessengerImage } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new MessengerImage({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 image: {
   url: 'https://example.com/image.jpg',
   caption: 'This is an image',
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractImageMessage

Properties

channel
channel: "messenger";

Defined in: messages/lib/classes/Messenger/MessengerImage.ts:19

The channel for sending the message, which is set to 'messenger'.

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
MessengerImageParams.clientRef
Inherited from

AbstractImageMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
MessengerImageParams.from
Inherited from

AbstractImageMessage

image
image: MessageImageType;

Defined in: messages/lib/classes/AbstractImageMessage.ts:13

The image attachment content.

Implementation of
MessengerImageParams.image
Inherited from

AbstractImageMessage

messageType
messageType: "image";

Defined in: messages/lib/classes/AbstractImageMessage.ts:12

Inherited from

AbstractImageMessage

messenger
messenger: MessengerType;

Defined in: messages/lib/classes/Messenger/MessengerImage.ts:24

Additional Messenger-specific parameters for the image message.

Implementation of
MessengerImageParams.messenger
to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
MessengerImageParams.to
Inherited from

AbstractImageMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
MessengerImageParams.webhookUrl
Inherited from

AbstractImageMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
MessengerImageParams.webhookVersion
Inherited from

AbstractImageMessage


MessengerText

Defined in: messages/lib/classes/Messenger/MessengerText.ts:9

Represents a text message for the Messenger channel.

Extends

Implements

Constructors

new MessengerText()
new MessengerText(params): MessengerText

Defined in: messages/lib/classes/Messenger/MessengerText.ts:42

Sends a text message to the Facebook Messenger channel.

Parameters
params

MessengerTextParams

The parameters for creating a Messenger text message.

Returns

MessengerText

Example
import { MessengerText } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new MessengerText({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 text: 'Hello world',
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractTextMessage

Properties

channel
channel: "messenger";

Defined in: messages/lib/classes/Messenger/MessengerText.ts:16

The channel for this message (always 'messenger').

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
MessengerTextParams.clientRef
Inherited from

AbstractTextMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
MessengerTextParams.from
Inherited from

AbstractTextMessage

messageType
messageType: "text";

Defined in: messages/lib/classes/AbstractTextMessage.ts:14

The type of message, which is 'text' for text messages.

Inherited from

AbstractTextMessage

messenger
messenger: MessengerType;

Defined in: messages/lib/classes/Messenger/MessengerText.ts:21

The messenger information for this message.

Implementation of
MessengerTextParams.messenger
text
text: string;

Defined in: messages/lib/classes/AbstractTextMessage.ts:19

The text content of the message.

Implementation of
MessengerTextParams.text
Inherited from

AbstractTextMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
MessengerTextParams.to
Inherited from

AbstractTextMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
MessengerTextParams.webhookUrl
Inherited from

AbstractTextMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
MessengerTextParams.webhookVersion
Inherited from

AbstractTextMessage


MessengerVideo

Defined in: messages/lib/classes/Messenger/MessengerVideo.ts:9

Represents a video message for the Messenger channel.

Extends

Implements

Constructors

new MessengerVideo()
new MessengerVideo(params): MessengerVideo

Defined in: messages/lib/classes/Messenger/MessengerVideo.ts:44

Send a video message using the Facebook Messenger channel.

Parameters
params

MessengerVideoParams

The parameters for creating a Messenger video message.

Returns

MessengerVideo

Example
import { MessagengerVideo } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new MessagengerVideo({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 video: {
   url: 'https://example.com/video.mp4',
   caption: 'This is a video',
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractVideoMessage

Properties

channel
channel: "messenger";

Defined in: messages/lib/classes/Messenger/MessengerVideo.ts:16

The channel for this message (always 'messenger').

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
MessengerVideoParams.clientRef
Inherited from

AbstractVideoMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
MessengerVideoParams.from
Inherited from

AbstractVideoMessage

messageType
messageType: "video";

Defined in: messages/lib/classes/AbstractVideoMessage.ts:15

The type of message, which is 'video' for video messages.

Inherited from

AbstractVideoMessage

messenger
messenger: MessengerType;

Defined in: messages/lib/classes/Messenger/MessengerVideo.ts:21

The messenger information for this message.

Implementation of
MessengerVideoParams.messenger
to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
MessengerVideoParams.to
Inherited from

AbstractVideoMessage

video
video: MessageVideoType;

Defined in: messages/lib/classes/AbstractVideoMessage.ts:20

The video content of the message.

Implementation of
MessengerVideoParams.video
Inherited from

AbstractVideoMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
MessengerVideoParams.webhookUrl
Inherited from

AbstractVideoMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
MessengerVideoParams.webhookVersion
Inherited from

AbstractVideoMessage


MMSAudio

Defined in: messages/lib/classes/MMS/MMSAudio.ts:9

Represents an audio message for the MMS channel.

Extends

Implements

Constructors

new MMSAudio()
new MMSAudio(params): MMSAudio

Defined in: messages/lib/classes/MMS/MMSAudio.ts:36

Send an MMS audio message.

Parameters
params

MessageParamsAudio

The parameters for creating the audio message.

Returns

MMSAudio

Example
import { MMSAudio } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new MMSAudio({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 audio: {
   url: 'https://example.com/audio.mp3',
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractAudioMessage

Properties

audio
audio: MessageAudioType;

Defined in: messages/lib/classes/AbstractAudioMessage.ts:13

The audio message content.

Implementation of
MessageParamsAudio.audio
Inherited from

AbstractAudioMessage

channel
channel: "mms";

Defined in: messages/lib/classes/MMS/MMSAudio.ts:13

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
MessageParamsAudio.clientRef
Inherited from

AbstractAudioMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
MessageParamsAudio.from
Inherited from

AbstractAudioMessage

messageType
messageType: "audio";

Defined in: messages/lib/classes/AbstractAudioMessage.ts:12

Inherited from

AbstractAudioMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
MessageParamsAudio.to
Inherited from

AbstractAudioMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
MessageParamsAudio.webhookUrl
Inherited from

AbstractAudioMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
MessageParamsAudio.webhookVersion
Inherited from

AbstractAudioMessage


MMSImage

Defined in: messages/lib/classes/MMS/MMSImage.ts:9

Represents an image message for the MMS channel.

Extends

Implements

Constructors

new MMSImage()
new MMSImage(params): MMSImage

Defined in: messages/lib/classes/MMS/MMSImage.ts:36

Send an MMS image message.

Parameters
params

MessageParamsImage

The parameters for creating the image message.

Returns

MMSImage

Example
import { MMSImage } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new MMSImage({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 image: {
   url: 'https://example.com/image.jpg',
   caption: 'This is an example image',
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractImageMessage

Properties

channel
channel: "mms";

Defined in: messages/lib/classes/MMS/MMSImage.ts:13

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
MessageParamsImage.clientRef
Inherited from

AbstractImageMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
MessageParamsImage.from
Inherited from

AbstractImageMessage

image
image: MessageImageType;

Defined in: messages/lib/classes/AbstractImageMessage.ts:13

The image attachment content.

Implementation of
MessageParamsImage.image
Inherited from

AbstractImageMessage

messageType
messageType: "image";

Defined in: messages/lib/classes/AbstractImageMessage.ts:12

Inherited from

AbstractImageMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
MessageParamsImage.to
Inherited from

AbstractImageMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
MessageParamsImage.webhookUrl
Inherited from

AbstractImageMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
MessageParamsImage.webhookVersion
Inherited from

AbstractImageMessage


MMSVcard

Defined in: messages/lib/classes/MMS/MMSVcard.ts:9

Represents a vCard message for the MMS channel.

Extends

Implements

Constructors

new MMSVcard()
new MMSVcard(params): MMSVcard

Defined in: messages/lib/classes/MMS/MMSVcard.ts:36

Send an MMS vCard message.

Parameters
params

MessageParamsVcard

The parameters for creating the vCard message.

Returns

MMSVcard

Example
import { MMSVcard } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new MMSVcard({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 vcard: {
   url: 'https://example.com/vcard.vcf',
   caption: 'Download my contact information',
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractVcardMessage

Properties

channel
channel: "mms";

Defined in: messages/lib/classes/MMS/MMSVcard.ts:13

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
MessageParamsVcard.clientRef
Inherited from

AbstractVcardMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
MessageParamsVcard.from
Inherited from

AbstractVcardMessage

messageType
messageType: "vcard";

Defined in: messages/lib/classes/AbstractVcardMessage.ts:15

The type of message, which is 'vcard' for vCard messages.

Inherited from

AbstractVcardMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
MessageParamsVcard.to
Inherited from

AbstractVcardMessage

vcard
vcard: MessageVcardType;

Defined in: messages/lib/classes/AbstractVcardMessage.ts:20

The vCard (contact card) content of the message.

Implementation of
MessageParamsVcard.vcard
Inherited from

AbstractVcardMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
MessageParamsVcard.webhookUrl
Inherited from

AbstractVcardMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
MessageParamsVcard.webhookVersion
Inherited from

AbstractVcardMessage


MMSVideo

Defined in: messages/lib/classes/MMS/MMSVideo.ts:9

Represents a video message for the MMS channel.

Extends

Implements

Constructors

new MMSVideo()
new MMSVideo(params): MMSVideo

Defined in: messages/lib/classes/MMS/MMSVideo.ts:35

Send an MMS video message.

Parameters
params

MessageParamsVideo

The parameters for creating the video message.

Returns

MMSVideo

Example
import { MMSVideo } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new MMSVideo({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 video: {
   url: 'https://example.com/video.mp4',
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractVideoMessage

Properties

channel
channel: "mms";

Defined in: messages/lib/classes/MMS/MMSVideo.ts:13

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
MessageParamsVideo.clientRef
Inherited from

AbstractVideoMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
MessageParamsVideo.from
Inherited from

AbstractVideoMessage

messageType
messageType: "video";

Defined in: messages/lib/classes/AbstractVideoMessage.ts:15

The type of message, which is 'video' for video messages.

Inherited from

AbstractVideoMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
MessageParamsVideo.to
Inherited from

AbstractVideoMessage

video
video: MessageVideoType;

Defined in: messages/lib/classes/AbstractVideoMessage.ts:20

The video content of the message.

Implementation of
MessageParamsVideo.video
Inherited from

AbstractVideoMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
MessageParamsVideo.webhookUrl
Inherited from

AbstractVideoMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
MessageParamsVideo.webhookVersion
Inherited from

AbstractVideoMessage


RCSCustom

Defined in: messages/lib/classes/RCS/RCSCustom.ts:10

Represents a custom message for RCS.

Extends

Implements

Constructors

new RCSCustom()
new RCSCustom(params): RCSCustom

Defined in: messages/lib/classes/RCS/RCSCustom.ts:54

Sends a custom message through RCS

Parameters
params

RCSCustomParams

The parameters for creating a RCS custom message.

Returns

RCSCustom

Example
import { RCSCustom } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new RCSCustom({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 custom: {
   foo: 'bar',
 }
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractMessage

Properties

channel
channel: RCS = Channels.RCS;

Defined in: messages/lib/classes/RCS/RCSCustom.ts:14

The channel through which the message will be sent. Always rcs

Implementation of
RCSCustomParams.channel
clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
RCSCustomParams.clientRef
Inherited from

AbstractMessage

custom
custom: Record<string, unknown>;

Defined in: messages/lib/classes/RCS/RCSCustom.ts:24

A custom payload. The schema of a custom object can vary widely.

Implementation of
RCSCustomParams.custom
from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
RCSCustomParams.from
Inherited from

AbstractMessage

messageType
messageType: string = 'custom';

Defined in: messages/lib/classes/RCS/RCSCustom.ts:19

The type of message. For a custom message, this will always be custom.

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
RCSCustomParams.to
Inherited from

AbstractMessage

ttl?
optional ttl: number;

Defined in: messages/lib/classes/RCS/RCSCustom.ts:32

The duration in seconds the delivery of a message will be attempted. By default Vonage attempts delivery for 72 hours, however the maximum effective value depends on the operator and is typically 24 - 48 hours. We recommend this value should be kept at its default or at least 30 minutes.

Implementation of
RCSCustomParams.ttl
webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
RCSCustomParams.webhookUrl
Inherited from

AbstractMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
RCSCustomParams.webhookVersion
Inherited from

AbstractMessage


RCSFile

Defined in: messages/lib/classes/RCS/RCSFile.ts:10

Represents a file message for the RCS channel.

Extends

Implements

Constructors

new RCSFile()
new RCSFile(params): RCSFile

Defined in: messages/lib/classes/RCS/RCSFile.ts:48

Sends a file message to the RCS channel.

Parameters
params

MessageParams & object & object

The parameters for creating a RCS file message.

Returns

RCSFile

Example
import { RCSFile } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new RCSFile({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 file: {
   url: 'https://example.com/image.pdf',
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractFileMessage

Properties

channel
channel: RCS = Channels.RCS;

Defined in: messages/lib/classes/RCS/RCSFile.ts:17

The channel for this message (always 'rcs').

Implementation of
RCSFileParams.channel
clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
RCSFileParams.clientRef
Inherited from

AbstractFileMessage

file
file: MessageFileType;

Defined in: messages/lib/classes/AbstractFileMessage.ts:12

The file attachment content.

Implementation of
RCSFileParams.file
Inherited from

AbstractFileMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
RCSFileParams.from
Inherited from

AbstractFileMessage

messageType
messageType: "file";

Defined in: messages/lib/classes/AbstractFileMessage.ts:11

Inherited from

AbstractFileMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
RCSFileParams.to
Inherited from

AbstractFileMessage

ttl?
optional ttl: number;

Defined in: messages/lib/classes/RCS/RCSFile.ts:25

The duration in seconds the delivery of a message will be attempted. By default Vonage attempts delivery for 72 hours, however the maximum effective value depends on the operator and is typically 24 - 48 hours. We recommend this value should be kept at its default or at least 30 minutes.

Implementation of
RCSFileParams.ttl
webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
RCSFileParams.webhookUrl
Inherited from

AbstractFileMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
RCSFileParams.webhookVersion
Inherited from

AbstractFileMessage


RCSImage

Defined in: messages/lib/classes/RCS/RCSImage.ts:10

Represents an image message for the RCS channel.

Extends

Implements

Constructors

new RCSImage()
new RCSImage(params): RCSImage

Defined in: messages/lib/classes/RCS/RCSImage.ts:44

Send an RCS image message.

Parameters
params

RCSImageParams

The parameters for creating the image message.

Returns

RCSImage

Example
import { RCSImage } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new RCSImage({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 image: {
   url: 'https://example.com/image.jpg',
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractImageMessage

Properties

channel
channel: RCS = Channels.RCS;

Defined in: messages/lib/classes/RCS/RCSImage.ts:14

The channel through which the message will be sent. Always rcs

Implementation of
RCSImageParams.channel
clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
RCSImageParams.clientRef
Inherited from

AbstractImageMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
RCSImageParams.from
Inherited from

AbstractImageMessage

image
image: MessageImageType;

Defined in: messages/lib/classes/AbstractImageMessage.ts:13

The image attachment content.

Implementation of
RCSImageParams.image
Inherited from

AbstractImageMessage

messageType
messageType: "image";

Defined in: messages/lib/classes/AbstractImageMessage.ts:12

Inherited from

AbstractImageMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
RCSImageParams.to
Inherited from

AbstractImageMessage

ttl?
optional ttl: number;

Defined in: messages/lib/classes/RCS/RCSImage.ts:22

The duration in seconds the delivery of a message will be attempted. By default Vonage attempts delivery for 72 hours, however the maximum effective value depends on the operator and is typically 24 - 48 hours. We recommend this value should be kept at its default or at least 30 minutes.

Implementation of
RCSImageParams.ttl
webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
RCSImageParams.webhookUrl
Inherited from

AbstractImageMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
RCSImageParams.webhookVersion
Inherited from

AbstractImageMessage


RCSText

Defined in: messages/lib/classes/RCS/RCSText.ts:10

Represents a text message for the RCS channel.

Extends

Implements

Constructors

new RCSText()
new RCSText(params): RCSText

Defined in: messages/lib/classes/RCS/RCSText.ts:43

Sends a text message through the RCS channel.

Parameters
params

RCSTextParams

The parameters for creating a RCS text message.

Returns

RCSText

Example
import { RCSText } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new RCSText({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 text: 'Hello world',
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractTextMessage

Properties

channel
channel: RCS = Channels.RCS;

Defined in: messages/lib/classes/RCS/RCSText.ts:14

The channel for this message (always 'rcs').

Implementation of
RCSTextParams.channel
clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
RCSTextParams.clientRef
Inherited from

AbstractTextMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
RCSTextParams.from
Inherited from

AbstractTextMessage

messageType
messageType: "text";

Defined in: messages/lib/classes/AbstractTextMessage.ts:14

The type of message, which is 'text' for text messages.

Inherited from

AbstractTextMessage

text
text: string;

Defined in: messages/lib/classes/AbstractTextMessage.ts:19

The text content of the message.

Implementation of
RCSTextParams.text
Inherited from

AbstractTextMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
RCSTextParams.to
Inherited from

AbstractTextMessage

ttl?
optional ttl: number;

Defined in: messages/lib/classes/RCS/RCSText.ts:22

The duration in seconds the delivery of a message will be attempted. By default Vonage attempts delivery for 72 hours, however the maximum effective value depends on the operator and is typically 24 - 48 hours. We recommend this value should be kept at its default or at least 30 minutes.

Implementation of
RCSTextParams.ttl
webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
RCSTextParams.webhookUrl
Inherited from

AbstractTextMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
RCSTextParams.webhookVersion
Inherited from

AbstractTextMessage


RCSVideo

Defined in: messages/lib/classes/RCS/RCSVideo.ts:10

Represents an video message for the RCS channel.

Extends

Implements

Constructors

new RCSVideo()
new RCSVideo(params): RCSVideo

Defined in: messages/lib/classes/RCS/RCSVideo.ts:45

Send an RCS video message.

Parameters
params

RCSVideoParams

The parameters for creating the video message.

Returns

RCSVideo

Example
import { RCSVideo } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new RCSVideo({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 audio: {
   url: 'https://example.com/video.mp4',
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractVideoMessage

Properties

channel
channel: RCS;

Defined in: messages/lib/classes/RCS/RCSVideo.ts:14

The channel through which the message will be sent. Always rcs

Implementation of
RCSVideoParams.channel
clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
RCSVideoParams.clientRef
Inherited from

AbstractVideoMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
RCSVideoParams.from
Inherited from

AbstractVideoMessage

messageType
messageType: "video";

Defined in: messages/lib/classes/AbstractVideoMessage.ts:15

The type of message, which is 'video' for video messages.

Inherited from

AbstractVideoMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
RCSVideoParams.to
Inherited from

AbstractVideoMessage

ttl?
optional ttl: number;

Defined in: messages/lib/classes/RCS/RCSVideo.ts:22

The duration in seconds the delivery of a message will be attempted. By default Vonage attempts delivery for 72 hours, however the maximum effective value depends on the operator and is typically 24 - 48 hours. We recommend this value should be kept at its default or at least 30 minutes.

Implementation of
RCSVideoParams.ttl
video
video: MessageVideoType;

Defined in: messages/lib/classes/AbstractVideoMessage.ts:20

The video content of the message.

Implementation of
RCSVideoParams.video
Inherited from

AbstractVideoMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
RCSVideoParams.webhookUrl
Inherited from

AbstractVideoMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
RCSVideoParams.webhookVersion
Inherited from

AbstractVideoMessage


SMS

Defined in: messages/lib/classes/SMS/SMS.ts:12

Send a text message using the SMS channel.

Extends

Implements

Constructors

new SMS()
new SMS(
   params, 
   to?, 
   from?, 
   clientRef?): SMS

Defined in: messages/lib/classes/SMS/SMS.ts:58

Send an SMS message

Parameters
params

The message parameters or text message.

string | SMSParams

to?

string

The recipient's phone number.

from?

string

The sender's phone number.

clientRef?

string

The client reference for the message.

Returns

SMS

Examples
import { SMS } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new SMS({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 text: 'Hello world',
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);

Send SMS with entity ID and content ID

import { SMS } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new SMS({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 text: 'Hello world',
 clientRef: 'my-personal-reference',
 sms: {
   entityId: 'MyEntityID',
   contentId: 'MyContentID'
 }
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractTextMessage

Properties

channel
channel: "sms";

Defined in: messages/lib/classes/SMS/SMS.ts:13

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
SMSParams.clientRef
Inherited from

AbstractTextMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
SMSParams.from
Inherited from

AbstractTextMessage

messageType
messageType: "text";

Defined in: messages/lib/classes/AbstractTextMessage.ts:14

The type of message, which is 'text' for text messages.

Inherited from

AbstractTextMessage

sms?
optional sms: SMSExtraParams;

Defined in: messages/lib/classes/SMS/SMS.ts:15

Implementation of
SMSParams.sms
text
text: string;

Defined in: messages/lib/classes/AbstractTextMessage.ts:19

The text content of the message.

Implementation of
SMSParams.text
Inherited from

AbstractTextMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
SMSParams.to
Inherited from

AbstractTextMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
SMSParams.webhookUrl
Inherited from

AbstractTextMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
SMSParams.webhookVersion
Inherited from

AbstractTextMessage


ViberFile

Defined in: messages/lib/classes/Viber/ViberFile.ts:9

Represents a file message for the Viber Service channel.

Extends

Implements

Constructors

new ViberFile()
new ViberFile(params): ViberFile

Defined in: messages/lib/classes/Viber/ViberFile.ts:38

Send a file message using the Viber Service channel.

Parameters
params

ViberFileParams

The parameters for the ViberFile message.

Returns

ViberFile

Example
import { ViberFile } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new ViberFile({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 file: {
   url: 'https://my-host.com/my-file.pdf',
 },
 viberService: {
   action: {
     url: 'https://my-host.com/my-path',
     text: 'My button text',
   },
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractFileMessage

Properties

channel
channel: "viber_service";

Defined in: messages/lib/classes/Viber/ViberFile.ts:10

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
ViberFileParams.clientRef
Inherited from

AbstractFileMessage

file
file: MessageFileType;

Defined in: messages/lib/classes/AbstractFileMessage.ts:12

The file attachment content.

Implementation of
ViberFileParams.file
Inherited from

AbstractFileMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
ViberFileParams.from
Inherited from

AbstractFileMessage

messageType
messageType: "file";

Defined in: messages/lib/classes/AbstractFileMessage.ts:11

Inherited from

AbstractFileMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
ViberFileParams.to
Inherited from

AbstractFileMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
ViberFileParams.webhookUrl
Inherited from

AbstractFileMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
ViberFileParams.webhookVersion
Inherited from

AbstractFileMessage


ViberImage

Defined in: messages/lib/classes/Viber/ViberImage.ts:10

Represents an image message for the Viber Service channel.

Extends

Implements

Constructors

new ViberImage()
new ViberImage(params): ViberImage

Defined in: messages/lib/classes/Viber/ViberImage.ts:43

Send an image message using the Viber Service channel.

Parameters
params

ViberImageParams

The parameters for the ViberImage message.

Returns

ViberImage

Example
import { ViberImage } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new ViberImage({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 image: {
 url: 'https://my-host.com/my-image.jpg',
 },
 viberService: {
   action: {
     url: 'https://my-host.com/my-path',
     text: 'My button text',
   },
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractImageMessage

Properties

channel
channel: "viber_service";

Defined in: messages/lib/classes/Viber/ViberImage.ts:14

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
ViberImageParams.clientRef
Inherited from

AbstractImageMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
ViberImageParams.from
Inherited from

AbstractImageMessage

image
image: MessageImageType;

Defined in: messages/lib/classes/AbstractImageMessage.ts:13

The image attachment content.

Implementation of
ViberImageParams.image
Inherited from

AbstractImageMessage

messageType
messageType: "image";

Defined in: messages/lib/classes/AbstractImageMessage.ts:12

Inherited from

AbstractImageMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
ViberImageParams.to
Inherited from

AbstractImageMessage

viberService
viberService: ViberActionParams;

Defined in: messages/lib/classes/Viber/ViberImage.ts:15

The Viber action parameters for sending the image.

Implementation of
ViberImageParams.viberService
webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
ViberImageParams.webhookUrl
Inherited from

AbstractImageMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
ViberImageParams.webhookVersion
Inherited from

AbstractImageMessage


ViberText

Defined in: messages/lib/classes/Viber/ViberText.ts:10

Represents a text message for the Viber Service channel.

Extends

Implements

Constructors

new ViberText()
new ViberText(params): ViberText

Defined in: messages/lib/classes/Viber/ViberText.ts:42

Send a text message using the Viber Service channel.

Parameters
params

ViberTextParams

The parameters for the ViberText message.

Returns

ViberText

Example
import { ViberText } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new ViberText({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 text: 'Hello world',
 viberService: {
   action: {
     url: 'https://my-host.com/my-path',
     text: 'My button text',
   },  
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractTextMessage

Properties

channel
channel: "viber_service";

Defined in: messages/lib/classes/Viber/ViberText.ts:14

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
ViberTextParams.clientRef
Inherited from

AbstractTextMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
ViberTextParams.from
Inherited from

AbstractTextMessage

messageType
messageType: "text";

Defined in: messages/lib/classes/AbstractTextMessage.ts:14

The type of message, which is 'text' for text messages.

Inherited from

AbstractTextMessage

text
text: string;

Defined in: messages/lib/classes/AbstractTextMessage.ts:19

The text content of the message.

Implementation of
ViberTextParams.text
Inherited from

AbstractTextMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
ViberTextParams.to
Inherited from

AbstractTextMessage

viberService
viberService: ViberActionParams;

Defined in: messages/lib/classes/Viber/ViberText.ts:15

The Viber service and action parameters for the message.

Implementation of
ViberTextParams.viberService
webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
ViberTextParams.webhookUrl
Inherited from

AbstractTextMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
ViberTextParams.webhookVersion
Inherited from

AbstractTextMessage


ViberVideo

Defined in: messages/lib/classes/Viber/ViberVideo.ts:9

Represents a video message for the Viber Service channel.

Extends

Implements

Constructors

new ViberVideo()
new ViberVideo(params): ViberVideo

Defined in: messages/lib/classes/Viber/ViberVideo.ts:43

Send a video message using the Viber Service channel.

Parameters
params

ViberVideoParams

The parameters for the ViberVideo message.

Returns

ViberVideo

Example
import { ViberVideo } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new ViberVideo({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 text: 'Hello world',
 video: {
   url: 'https://my-host.com/my-video.mp4',
 },
 viberService: {
   action: {
     url: 'https://my-host.com/my-path',
     text: 'My button text',
   },
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractVideoMessage

Properties

channel
channel: "viber_service";

Defined in: messages/lib/classes/Viber/ViberVideo.ts:13

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
ViberVideoParams.clientRef
Inherited from

AbstractVideoMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
ViberVideoParams.from
Inherited from

AbstractVideoMessage

messageType
messageType: "video";

Defined in: messages/lib/classes/AbstractVideoMessage.ts:15

The type of message, which is 'video' for video messages.

Inherited from

AbstractVideoMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
ViberVideoParams.to
Inherited from

AbstractVideoMessage

viberService
viberService: object & object & ViberService;

Defined in: messages/lib/classes/Viber/ViberVideo.ts:14

The Viber service, action parameters, and video message details.

Type declaration
duration
duration: string;

The duration of the video in seconds.

fileSize
fileSize: string;

The file size of the video in MB.

Type declaration
action
action: ViberAction;

The action associated with the Viber message.

Implementation of
ViberVideoParams.viberService
video
video: MessageVideoType;

Defined in: messages/lib/classes/AbstractVideoMessage.ts:20

The video content of the message.

Implementation of
ViberVideoParams.video
Inherited from

AbstractVideoMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
ViberVideoParams.webhookUrl
Inherited from

AbstractVideoMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
ViberVideoParams.webhookVersion
Inherited from

AbstractVideoMessage


WhatsAppAudio

Defined in: messages/lib/classes/WhatsApp/WhatsAppAudio.ts:9

Represents an audio message for WhatsApp.

Extends

Implements

Constructors

new WhatsAppAudio()
new WhatsAppAudio(params): WhatsAppAudio

Defined in: messages/lib/classes/WhatsApp/WhatsAppAudio.ts:37

Sends an audio message to a WhatsApp user.

Parameters
params

WhatsAppAudioParams

The parameters for creating a WhatsApp audio message.

Returns

WhatsAppAudio

Example
import { WhatsAppAudio } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new WhatsAppAudio({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 audio: {
   url: 'https://example.com/audio.mp3',
   caption: 'This is an audio message',
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractAudioMessage

Properties

audio
audio: MessageAudioType;

Defined in: messages/lib/classes/AbstractAudioMessage.ts:13

The audio message content.

Implementation of
WhatsAppAudioParams.audio
Inherited from

AbstractAudioMessage

channel
channel: "whatsapp";

Defined in: messages/lib/classes/WhatsApp/WhatsAppAudio.ts:13

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
WhatsAppAudioParams.clientRef
Inherited from

AbstractAudioMessage

context?
optional context: WhatsAppContext;

Defined in: messages/lib/classes/WhatsApp/WhatsAppAudio.ts:15

An optional context used for quoting/replying to a specific meesage in a conversation. When used, the WhatsApp UI will display the new message along with a contextual bubble that displays the quoted/replied to message's content

Implementation of
WhatsAppAudioParams.context
from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
WhatsAppAudioParams.from
Inherited from

AbstractAudioMessage

messageType
messageType: "audio";

Defined in: messages/lib/classes/AbstractAudioMessage.ts:12

Inherited from

AbstractAudioMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
WhatsAppAudioParams.to
Inherited from

AbstractAudioMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
WhatsAppAudioParams.webhookUrl
Inherited from

AbstractAudioMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
WhatsAppAudioParams.webhookVersion
Inherited from

AbstractAudioMessage


WhatsAppCustom

Defined in: messages/lib/classes/WhatsApp/WhatsAppCustom.ts:13

Represents a custom message for WhatsApp.

Extends

Implements

Constructors

new WhatsAppCustom()
new WhatsAppCustom(params): WhatsAppCustom

Defined in: messages/lib/classes/WhatsApp/WhatsAppCustom.ts:47

Sends a custom message to a WhatsApp user.

Parameters
params

WhatsAppCustomParams

The parameters for creating a WhatsApp custom message.

Returns

WhatsAppCustom

Example
import { WhatsAppCustom } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new WhatsAppCustom({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 custom: {
   type: 'template',
   template: {
     namespace: 'your-namespace',
     name: 'your-template-name',
   },
 }
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractMessage

Properties

channel
channel: "whatsapp";

Defined in: messages/lib/classes/WhatsApp/WhatsAppCustom.ts:17

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
WhatsAppCustomParams.clientRef
Inherited from

AbstractMessage

context?
optional context: WhatsAppContext;

Defined in: messages/lib/classes/WhatsApp/WhatsAppCustom.ts:21

An optional context used for quoting/replying to a specific meesage in a conversation. When used, the WhatsApp UI will display the new message along with a contextual bubble that displays the quoted/replied to message's content

Implementation of
WhatsAppCustomParams.context
custom
custom: WhatsAppCustomType;

Defined in: messages/lib/classes/WhatsApp/WhatsAppCustom.ts:19

The custom WhatsApp message type.

Implementation of
WhatsAppCustomParams.custom
from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
WhatsAppCustomParams.from
Inherited from

AbstractMessage

messageType
messageType: "custom";

Defined in: messages/lib/classes/WhatsApp/WhatsAppCustom.ts:18

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
WhatsAppCustomParams.to
Inherited from

AbstractMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
WhatsAppCustomParams.webhookUrl
Inherited from

AbstractMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
WhatsAppCustomParams.webhookVersion
Inherited from

AbstractMessage


WhatsAppFile

Defined in: messages/lib/classes/WhatsApp/WhatsAppFile.ts:10

Represents a file message for WhatsApp.

Extends

Implements

Constructors

new WhatsAppFile()
new WhatsAppFile(params): WhatsAppFile

Defined in: messages/lib/classes/WhatsApp/WhatsAppFile.ts:38

Send a WhatsApp file message.

Parameters
params

WhatsAppFileParams

The parameters for creating a WhatsApp file message.

Returns

WhatsAppFile

Example
import { WhatsAppFile } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new WhatsAppFile({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 file: {
   url: 'https://example.com/image.jpg',
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractFileMessage

Properties

channel
channel: Channels = Channels.WHATSAPP;

Defined in: messages/lib/classes/WhatsApp/WhatsAppFile.ts:14

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
WhatsAppFileParams.clientRef
Inherited from

AbstractFileMessage

context?
optional context: WhatsAppContext;

Defined in: messages/lib/classes/WhatsApp/WhatsAppFile.ts:16

An optional context used for quoting/replying to a specific meesage in a conversation. When used, the WhatsApp UI will display the new message along with a contextual bubble that displays the quoted/replied to message's content

Implementation of
WhatsAppFileParams.context
file
file: MessageFileType;

Defined in: messages/lib/classes/AbstractFileMessage.ts:12

The file attachment content.

Implementation of
WhatsAppFileParams.file
Inherited from

AbstractFileMessage

from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
WhatsAppFileParams.from
Inherited from

AbstractFileMessage

messageType
messageType: "file";

Defined in: messages/lib/classes/AbstractFileMessage.ts:11

Inherited from

AbstractFileMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
WhatsAppFileParams.to
Inherited from

AbstractFileMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
WhatsAppFileParams.webhookUrl
Inherited from

AbstractFileMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
WhatsAppFileParams.webhookVersion
Inherited from

AbstractFileMessage


WhatsAppImage

Defined in: messages/lib/classes/WhatsApp/WhatsAppImage.ts:9

Represents an image message for WhatsApp.

Extends

Implements

Constructors

new WhatsAppImage()
new WhatsAppImage(params): WhatsAppImage

Defined in: messages/lib/classes/WhatsApp/WhatsAppImage.ts:37

Sends an image message to a WhatsApp user.

Parameters
params

WhatsAppImageParams

The parameters for creating a WhatsApp image message.

Returns

WhatsAppImage

Example
import { WhatsAppImage } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new WhatsAppImage({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 image: {
   url: 'https://example.com/image.jpg',
   caption: 'This is an image message',
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractImageMessage

Properties

channel
channel: "whatsapp";

Defined in: messages/lib/classes/WhatsApp/WhatsAppImage.ts:13

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
WhatsAppImageParams.clientRef
Inherited from

AbstractImageMessage

context?
optional context: WhatsAppContext;

Defined in: messages/lib/classes/WhatsApp/WhatsAppImage.ts:15

An optional context used for quoting/replying to a specific meesage in a conversation. When used, the WhatsApp UI will display the new message along with a contextual bubble that displays the quoted/replied to message's content

Implementation of
WhatsAppImageParams.context
from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
WhatsAppImageParams.from
Inherited from

AbstractImageMessage

image
image: MessageImageType;

Defined in: messages/lib/classes/AbstractImageMessage.ts:13

The image attachment content.

Implementation of
WhatsAppImageParams.image
Inherited from

AbstractImageMessage

messageType
messageType: "image";

Defined in: messages/lib/classes/AbstractImageMessage.ts:12

Inherited from

AbstractImageMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
WhatsAppImageParams.to
Inherited from

AbstractImageMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
WhatsAppImageParams.webhookUrl
Inherited from

AbstractImageMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
WhatsAppImageParams.webhookVersion
Inherited from

AbstractImageMessage


WhatsAppReaction

Defined in: messages/lib/classes/WhatsApp/WhatsAppReaction.ts:13

Represents a reaction message for WhatsApp.

Extends

Implements

Constructors

new WhatsAppReaction()
new WhatsAppReaction(params): WhatsAppReaction

Defined in: messages/lib/classes/WhatsApp/WhatsAppReaction.ts:62

Sends a reaction message to a WhatsApp user.

Parameters
params

WhatsAppReactionParams

The parameters for creating a WhatsApp reaction message.

Returns

WhatsAppReaction

Examples

Send a reaction

import { WhatsAppReaction } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new WhatsAppReaction({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 reaction: {
   action: 'react',
   emoji: '😍',
 }
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);

Remove reaction

import { WhatsAppReaction } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new WhatsAppReaction({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 reaction: {
   action: 'unreact',
 }
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractMessage

Properties

channel
channel: "whatsapp";

Defined in: messages/lib/classes/WhatsApp/WhatsAppReaction.ts:17

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
WhatsAppReactionParams.clientRef
Inherited from

AbstractMessage

context?
optional context: WhatsAppContext;

Defined in: messages/lib/classes/WhatsApp/WhatsAppReaction.ts:21

An optional context used for quoting/replying to a specific meesage in a conversation. When used, the WhatsApp UI will display the new message along with a contextual bubble that displays the quoted/replied to message's content

Implementation of
WhatsAppReactionParams.context
from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
WhatsAppReactionParams.from
Inherited from

AbstractMessage

messageType
messageType: "reaction";

Defined in: messages/lib/classes/WhatsApp/WhatsAppReaction.ts:18

reaction
reaction: WhatsAppReactionType;

Defined in: messages/lib/classes/WhatsApp/WhatsAppReaction.ts:19

Implementation of
WhatsAppReactionParams.reaction
to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
WhatsAppReactionParams.to
Inherited from

AbstractMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
WhatsAppReactionParams.webhookUrl
Inherited from

AbstractMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
WhatsAppReactionParams.webhookVersion
Inherited from

AbstractMessage


WhatsAppSticker

Defined in: messages/lib/classes/WhatsApp/WhatsAppSticker.ts:14

Represents a sticker message for WhatsApp.

Extends

Implements

Constructors

new WhatsAppSticker()
new WhatsAppSticker(params): WhatsAppSticker

Defined in: messages/lib/classes/WhatsApp/WhatsAppSticker.ts:62

Send a sticker message to a WhatsApp user.

Parameters
params

WhatsAppStickerParams

The parameters for creating a WhatsApp sticker message.

Returns

WhatsAppSticker

Examples

Send a sticker message with a sticker ID:

import { WhatsAppSticker } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new WhatsAppSticker({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 sticker: {
   id: '0-0',
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);

Send a sticker message with a sticker URL:

import { WhatsAppSticker } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new WhatsAppSticker({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 sticker: {
   url: 'https://example.com/sticker.png',
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractMessage

Properties

channel
channel: "whatsapp";

Defined in: messages/lib/classes/WhatsApp/WhatsAppSticker.ts:18

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
WhatsAppStickerParams.clientRef
Inherited from

AbstractMessage

context?
optional context: WhatsAppContext;

Defined in: messages/lib/classes/WhatsApp/WhatsAppSticker.ts:22

An optional context used for quoting/replying to a specific meesage in a conversation. When used, the WhatsApp UI will display the new message along with a contextual bubble that displays the quoted/replied to message's content

Implementation of
WhatsAppStickerParams.context
from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
WhatsAppStickerParams.from
Inherited from

AbstractMessage

messageType
messageType: "sticker";

Defined in: messages/lib/classes/WhatsApp/WhatsAppSticker.ts:19

sticker
sticker: 
  | WhatsAppStickerIdType
  | WhatsAppStickerUrlType;

Defined in: messages/lib/classes/WhatsApp/WhatsAppSticker.ts:20

The sticker to be sent, which can be either a sticker ID or a sticker URL.

Implementation of
WhatsAppStickerParams.sticker
to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
WhatsAppStickerParams.to
Inherited from

AbstractMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
WhatsAppStickerParams.webhookUrl
Inherited from

AbstractMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
WhatsAppStickerParams.webhookVersion
Inherited from

AbstractMessage


WhatsAppTemplate

Defined in: messages/lib/classes/WhatsApp/WhatsAppTemplate.ts:14

Represents a template message for WhatsApp.

Extends

Implements

Constructors

new WhatsAppTemplate()
new WhatsAppTemplate(params): WhatsAppTemplate

Defined in: messages/lib/classes/WhatsApp/WhatsAppTemplate.ts:54

Send a template message to a WhatsApp user.

Parameters
params

WhatsAppTemplateParams

The parameters for creating a WhatsApp template message.

Returns

WhatsAppTemplate

Example
import { WhatsAppTemplate, WhatsAppLanguageCode } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new WhatsAppTemplate({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 whatsapp: {
   policy: 'deterministic',
   locale: WhatsAppLanguageCode.EN,
 },
 template: {
   name: 'your-template-name',
   parameters: [
     'foo',
     'bar',
   ],
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractMessage

Properties

channel
channel: "whatsapp";

Defined in: messages/lib/classes/WhatsApp/WhatsAppTemplate.ts:18

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
WhatsAppTemplateParams.clientRef
Inherited from

AbstractMessage

context?
optional context: WhatsAppContext;

Defined in: messages/lib/classes/WhatsApp/WhatsAppTemplate.ts:23

An optional context used for quoting/replying to a specific meesage in a conversation. When used, the WhatsApp UI will display the new message along with a contextual bubble that displays the quoted/replied to message's content

Implementation of
WhatsAppTemplateParams.context
from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
WhatsAppTemplateParams.from
Inherited from

AbstractMessage

messageType
messageType: "template";

Defined in: messages/lib/classes/WhatsApp/WhatsAppTemplate.ts:19

template
template: WhatsAppTemplateType;

Defined in: messages/lib/classes/WhatsApp/WhatsAppTemplate.ts:21

The WhatsApp template to be sent.

Implementation of
WhatsAppTemplateParams.template
to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
WhatsAppTemplateParams.to
Inherited from

AbstractMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
WhatsAppTemplateParams.webhookUrl
Inherited from

AbstractMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
WhatsAppTemplateParams.webhookVersion
Inherited from

AbstractMessage

whatsapp
whatsapp: WhatsAppPolicyType;

Defined in: messages/lib/classes/WhatsApp/WhatsAppTemplate.ts:20

WhatsApp policy type for the template message.

Implementation of
WhatsAppTemplateParams.whatsapp

WhatsAppText

Defined in: messages/lib/classes/WhatsApp/WhatsAppText.ts:9

Represents a text message for WhatsApp.

Extends

Implements

Constructors

new WhatsAppText()
new WhatsAppText(params): WhatsAppText

Defined in: messages/lib/classes/WhatsApp/WhatsAppText.ts:34

Send a WhatsApp text message.

Parameters
params

WhatsAppTextParams

The parameters for creating a WhatsApp text message.

Returns

WhatsAppText

Example
import { WhatsAppText } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new WhatsAppText({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 text: 'Hello world',
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractTextMessage

Properties

channel
channel: "whatsapp";

Defined in: messages/lib/classes/WhatsApp/WhatsAppText.ts:13

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
WhatsAppTextParams.clientRef
Inherited from

AbstractTextMessage

context?
optional context: WhatsAppContext;

Defined in: messages/lib/classes/WhatsApp/WhatsAppText.ts:15

An optional context used for quoting/replying to a specific meesage in a conversation. When used, the WhatsApp UI will display the new message along with a contextual bubble that displays the quoted/replied to message's content

Implementation of
WhatsAppTextParams.context
from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
WhatsAppTextParams.from
Inherited from

AbstractTextMessage

messageType
messageType: "text";

Defined in: messages/lib/classes/AbstractTextMessage.ts:14

The type of message, which is 'text' for text messages.

Inherited from

AbstractTextMessage

text
text: string;

Defined in: messages/lib/classes/AbstractTextMessage.ts:19

The text content of the message.

Implementation of
WhatsAppTextParams.text
Inherited from

AbstractTextMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
WhatsAppTextParams.to
Inherited from

AbstractTextMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
WhatsAppTextParams.webhookUrl
Inherited from

AbstractTextMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
WhatsAppTextParams.webhookVersion
Inherited from

AbstractTextMessage


WhatsAppVideo

Defined in: messages/lib/classes/WhatsApp/WhatsAppVideo.ts:9

Represents a video message for WhatsApp.

Extends

Implements

Constructors

new WhatsAppVideo()
new WhatsAppVideo(params): WhatsAppVideo

Defined in: messages/lib/classes/WhatsApp/WhatsAppVideo.ts:38

Sends a video message to a WhatsApp user.

Parameters
params

WhatsAppVideoParams

The parameters for creating a WhatsApp video message.

Returns

WhatsAppVideo

Example
import { WhatsAppVideo } from '@vonage/messages';

const { messageUUID } = await messagesClient.send(new WhatsAppVideo({
 to: TO_NUMBER,
 from: FROM_NUMBER,
 video: {
   url: 'https://example.com/video.mp4',
   caption: 'This is a video message',
 },
 clientRef: 'my-personal-reference',
}));

console.log(`Message sent successfully with UUID ${messageUUID}`);
Overrides

AbstractVideoMessage

Properties

channel
channel: "whatsapp";

Defined in: messages/lib/classes/WhatsApp/WhatsAppVideo.ts:13

clientRef?
optional clientRef: string;

Defined in: messages/lib/classes/AbstractMessage.ts:20

An optional client reference for the message.

Implementation of
WhatsAppVideoParams.clientRef
Inherited from

AbstractVideoMessage

context?
optional context: WhatsAppContext;

Defined in: messages/lib/classes/WhatsApp/WhatsAppVideo.ts:15

An optional context used for quoting/replying to a specific meesage in a conversation. When used, the WhatsApp UI will display the new message along with a contextual bubble that displays the quoted/replied to message's content

Implementation of
WhatsAppVideoParams.context
from
from: string;

Defined in: messages/lib/classes/AbstractMessage.ts:15

The sender of the message.

Implementation of
WhatsAppVideoParams.from
Inherited from

AbstractVideoMessage

messageType
messageType: "video";

Defined in: messages/lib/classes/AbstractVideoMessage.ts:15

The type of message, which is 'video' for video messages.

Inherited from

AbstractVideoMessage

to
to: string;

Defined in: messages/lib/classes/AbstractMessage.ts:10

The recipient of the message.

Implementation of
WhatsAppVideoParams.to
Inherited from

AbstractVideoMessage

video
video: MessageVideoType;

Defined in: messages/lib/classes/AbstractVideoMessage.ts:20

The video content of the message.

Implementation of
WhatsAppVideoParams.video
Inherited from

AbstractVideoMessage

webhookUrl?
optional webhookUrl: string;

Defined in: messages/lib/classes/AbstractMessage.ts:27

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

Implementation of
WhatsAppVideoParams.webhookUrl
Inherited from

AbstractVideoMessage

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Defined in: messages/lib/classes/AbstractMessage.ts:36

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.

Implementation of
WhatsAppVideoParams.webhookVersion
Inherited from

AbstractVideoMessage


AnyChannel

type AnyChannel = 
  | AnyMessengerChannel
  | AnyMMSChannel
  | AnyViberChannel
  | AnyWhatsAppChannel
  | SMSChannel
  | AnyRCSChannel;

Defined in: messages/lib/types/Channels/index.ts:19

Represents a union type that can be any of the specific channel message parameters or configurations, including Messenger, MMS, Viber, WhatsApp, or SMS.


AnyMessengerChannel

type AnyMessengerChannel = object & AnyMessengerParams;

Defined in: messages/lib/types/Channels/Messenger/index.ts:38

Represents a union type that includes the 'channel' property set to 'messenger' along with any of the Messenger-specific message parameters or MessengerType.

Type declaration

channel
channel: MESSENGER;

The channel through which the message will be sent, which is 'messenger' for Messenger.


AnyMMSChannel

type AnyMMSChannel = object & AnyMMSParams;

Defined in: messages/lib/types/Channels/MMS/index.ts:30

Represents a union type that includes the 'channel' property set to 'mms' along with any of the MMS-specific message parameters.

Type declaration

channel
channel: MMS;

The channel through which the message will be sent, which is 'mms' for MMS.


AnyRCSChannel

type AnyRCSChannel = 
  | RCSCustomParams
  | RCSFileParams
  | RCSImageParams
  | RCSTextParams
  | RCSVideoParams;

Defined in: messages/lib/types/Channels/RCS/index.ts:13


AnyViberChannel

type AnyViberChannel = object & AnyViberParams;

Defined in: messages/lib/types/Channels/Viber/index.ts:39

Represents a union type that includes the 'channel' property set to 'viber' along with any of the Viber-specific message parameters or configurations.

Type declaration

channel
channel: VIBER;

The channel through which the message will be sent, which is 'viber' for Viber.


AnyWhatsAppChannel

type AnyWhatsAppChannel = object & AnyWhatsAppParams;

Defined in: messages/lib/types/Channels/WhatsApp/index.ts:56

Represents a union type that includes the 'channel' property set to 'whatsapp_service' along with any of the WhatsApp-specific message parameters or configurations.

Type declaration

channel
channel: WHATSAPP;

The channel through which the message will be sent, which is 'whatsapp' for WhatsApp.


MessageAudioType

type MessageAudioType = object;

Defined in: messages/lib/types/MessageAudioType.ts:4

Represents an audio message type.

Type declaration

url
url: string;

The URL of the audio attachment.


MessageFileType

type MessageFileType = object;

Defined in: messages/lib/types/MessageFileType.ts:4

Represents a file message type.

Type declaration

url
url: string;

The URL of the file attachment.


MessageImageType

type MessageImageType = object;

Defined in: messages/lib/types/MessageImageType.ts:4

Represents an image message type.

Type declaration

url
url: string;

The URL of the image attachment.


MessageParams

type MessageParams = object;

Defined in: messages/lib/types/MessageParams.ts:4

Represents the parameters for a message.

Type declaration

clientRef?
optional clientRef: string;

Client reference of up to 100 characters. The reference will be present in every message status.

from
from: string;

The ID of the message sender.

to
to: string;

The ID of the message recipient.

webhookUrl?
optional webhookUrl: string;

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

webhookVersion?
optional webhookVersion: "v0.1" | "v1";

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.


MessageParamsAudio

type MessageParamsAudio = object & MessageParams;

Defined in: messages/lib/types/MessageParamsAudio.ts:7

Represents the parameters for a message with audio.

Type declaration

audio
audio: MessageAudioType;

The audio message content.


MessageParamsFile

type MessageParamsFile = object & MessageParams;

Defined in: messages/lib/types/MessageParamsFile.ts:7

Represents the parameters for a message with a file attachment.

Type declaration

file
file: MessageFileType;

The file attachment content.


MessageParamsImage

type MessageParamsImage = object & MessageParams;

Defined in: messages/lib/types/MessageParamsImage.ts:7

Represents the parameters for a message with an image attachment.

Type declaration

image
image: MessageImageType;

The image attachment content.

ttl?
optional ttl: number;

The amount of time in seconds the message will live for


MessageParamsText

type MessageParamsText = object & MessageParams;

Defined in: messages/lib/types/MessageParamsText.ts:6

Represents the parameters for a text message.

Type declaration

text
text: string;

The text content of the message.


MessageParamsVcard

type MessageParamsVcard = MessageVcardParams & MessageParams;

Defined in: messages/lib/types/MessageParamsVcard.ts:7

Represents the parameters for a message containing a vCard.


MessageParamsVideo

type MessageParamsVideo = object & MessageParams;

Defined in: messages/lib/types/MessageParamsVideo.ts:7

Represents the parameters for a message containing a video.

Type declaration

video
video: MessageVideoType;

The video information to be included in the message.


MessageSuccess

type MessageSuccess = object;

Defined in: messages/lib/types/MessageSuccess.ts:1

Type declaration

messageUUID
messageUUID: string;

MessageSuccessResponse

type MessageSuccessResponse = object;

Defined in: messages/lib/types/Responses/MessageSuccessResponse.ts:12

Represents a successful response received when sending a message.

This type includes a message_uuid field, which is a unique identifier for the sent message.

Type declaration

message_uuid
message_uuid: string;

A unique identifier for the sent message.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase


MessageVcardParams

type MessageVcardParams = object;

Defined in: messages/lib/types/MessageVcardType.ts:16

Represents a vCard message type.

Type declaration

vcard
vcard: MessageVcardType;

MessageVcardType

type MessageVcardType = object;

Defined in: messages/lib/types/MessageVcardType.ts:1

Type declaration

caption?
optional caption: string;

Additional text to accompany the vCard.

url
url: string;

The URL of the vCard attachment.


MessageVideoType

type MessageVideoType = object;

Defined in: messages/lib/types/MessageVideoType.ts:4

Represents a video message type.

Type declaration

url
url: string;

The URL of the video attachment.


RCSCustomParams

type RCSCustomParams = MessageParams & object;

Defined in: messages/lib/types/Channels/RCS/RCSCustomParams.ts:7

Represents the parameters for sending a custom message using RCS.

Type declaration

channel?
optional channel: RCS;

The channel to send to. You must provide rcs in this field.

custom
custom: Record<string, unknown>;

A custom payload. The schema of a custom object can vary widely.

ttl?
optional ttl: number;

The duration in seconds the delivery of a message will be attempted. By default Vonage attempts delivery for 72 hours, however the maximum effective value depends on the operator and is typically 24 - 48 hours. We recommend this value should be kept at its default or at least 30 minutes.


RCSFileParams

type RCSFileParams = MessageParamsFile & object;

Defined in: messages/lib/types/Channels/RCS/RCSFileParams.ts:7

Represents the parameters for sending a file message using RCS.

Type declaration

channel?
optional channel: RCS;

The channel to send to. You must provide rcs in this field.

ttl?
optional ttl: number;

The duration in seconds the delivery of a message will be attempted. By default Vonage attempts delivery for 72 hours, however the maximum effective value depends on the operator and is typically 24 - 48 hours. We recommend this value should be kept at its default or at least 30 minutes.


RCSImageParams

type RCSImageParams = MessageParamsImage & object;

Defined in: messages/lib/types/Channels/RCS/RCSImageParams.ts:7

Represents the parameters for sending an image message using RCS.

Type declaration

channel?
optional channel: RCS;

The channel to send to. You must provide rcs in this field.


RCSTextParams

type RCSTextParams = MessageParams & object;

Defined in: messages/lib/types/Channels/RCS/RCSTextParams.ts:7

Represents the parameters for sending a text message using RCS.

Type declaration

channel?
optional channel: RCS;

The channel to send to. You must provide rcs in this field.

text
text: string;

The text of the message to send. Limited to 3072 characters, including unicode.

ttl?
optional ttl: number;

The duration in seconds the delivery of a message will be attempted. By default Vonage attempts delivery for 72 hours, however the maximum effective value depends on the operator and is typically 24 - 48 hours. We recommend this value should be kept at its default or at least 30 minutes.


RCSVideoParams

type RCSVideoParams = MessageParams & object;

Defined in: messages/lib/types/Channels/RCS/RCSVideoParams.ts:8

Represents the parameters for sending a video message using RCS.

Type declaration

channel?
optional channel: RCS;

The channel to send to. You must provide rcs in this field.

ttl?
optional ttl: number;

The duration in seconds the delivery of a message will be attempted. By default Vonage attempts delivery for 72 hours, however the maximum effective value depends on the operator and is typically 24 - 48 hours. We recommend this value should be kept at its default or at least 30 minutes.

video
video: MessageVideoType;

SendMessageParams

type SendMessageParams = 
  | AnyMessengerParams
  | AnyViberParams
  | AnyWhatsAppParams
  | AnyMMSParams
  | SMSParams;

Defined in: messages/lib/types/SendMessageParams.ts:15

Represents parameters for sending various types of messages. This union type can be used to send messages across different platforms like Messenger, MMS, SMS, Viber, WhatsApp, etc. Use the corresponding Type for the specific message type you want to send.


SMSChannel

type SMSChannel = object & SMSParams;

Defined in: messages/lib/types/Channels/SMSParams.ts:53

Represents an SMS channel message, combining the channel type with SMS-specific parameters.

This type includes the channel field specifying the SMS channel and combines it with the SMS message parameters defined in SMSParams.

Type declaration

channel
channel: SMS;
sms?
optional sms: SMSExtraParams;
ttl?
optional ttl: number;

The duration in seconds the delivery of an SMS will be attempted. By default Vonage attempts delivery for 72 hours, however the maximum effective value depends on the operator and is typically 24 - 48 hours. We recommend this value should be kept at its default or at least 30 minutes.


SMSExtraParams

type SMSExtraParams = object;

Defined in: messages/lib/types/Channels/SMSParams.ts:18

Type declaration

contentId?
optional contentId: string;

A string parameter that satisfies regulatory requirements when sending an SMS to specific countries.

encodingType?
optional encodingType: "unicode" | "text" | "auto";

The encoding type to use for the message. If set to either text or unicode the specified type will be used. If set to auto (the default), the Messages API will automatically set the type based on the content of text; i.e. if unicode characters are detected in text, then the message will be encoded as unicode, and otherwise as text.

Link

https://api.support.vonage.com/hc/en-us/sections/200622473-Country-Specific-Features-and-Restrictions

entityId?
optional entityId: string;

A string parameter that satisfies regulatory requirements when sending an SMS to specific countries.

Link

https://api.support.vonage.com/hc/en-us/sections/200622473-Country-Specific-Features-and-Restrictions


UpdateMessageRequest

type UpdateMessageRequest = object;

Defined in: messages/lib/types/Requests/UpdateMessageRequest.ts:6

The request object for the Messages.update method.

Type declaration

status
status: UpdateMessageStatus | string;

The status to set for the message.

This value depends on the type of message that was sent. The SDK has no way to know which value will be correct for the message. Confirm with the API specification or the API documentation which value is correct for the message https://developer.vonage.com/en/api/messages#UpdateMessage.


WhatsAppContext

type WhatsAppContext = object;

Defined in: messages/lib/types/Channels/WhatsApp/WhatsAppParams.ts:3

Type declaration

messageUUID
messageUUID: string;

The UUID of the message being replied to/quoted.


WhatsAppCustomType

type WhatsAppCustomType = object;

Defined in: messages/lib/types/Channels/WhatsApp/WhatsAppCustomType.ts:6

Represents a custom WhatsApp message type with arbitrary properties.

Index Signature

[key: string]: unknown

WhatsAppFileParams

type WhatsAppFileParams = object & WhatsAppParams;

Defined in: messages/lib/types/Channels/WhatsApp/WhatsAppFileParams.ts:9

Represents a WhatsApp file message type.

Type declaration

file
file: object & MessageFileType;

The file attachment content.

Type declaration
caption?
optional caption: string;

An optional caption to accompany the file.

name?
optional name: string;

Optional parameter that specifies the name of the file being sent. If not included, the value for caption will be used as the file name. If neither name or caption are included, the file name will be parsed from the url.


WhatsAppParams

type WhatsAppParams = object & MessageParams;

Defined in: messages/lib/types/Channels/WhatsApp/WhatsAppParams.ts:10

Type declaration

context?
optional context: WhatsAppContext;

An optional context used for quoting/replying to a specific meesage in a conversation. When used, the WhatsApp UI will display the new message along with a contextual bubble that displays the quoted/replied to message's content


WhatsAppPolicyType

type WhatsAppPolicyType = object;

Defined in: messages/lib/types/Channels/WhatsApp/WhatsAppPolicyType.ts:8

Represents a WhatsApp policy type for deterministic messaging.

Type declaration

locale
locale: WhatsAppLanguageCode;

The locale for the WhatsApp message, following the WhatsApp language code.

policy
policy: "deterministic";

The policy type, which is set to 'deterministic'.


WhatsAppReactionRequest

type WhatsAppReactionRequest = object;

Defined in: messages/lib/types/Requests/WhatsAppReactionRequest.ts:1

Type declaration

channel
channel: "whatsapp";

The channel through which the message will be sent, which is 'whatsapp' for WhatsApp.

client_ref
client_ref: string;

A client-defined reference string for the message.

context
context: object;

A context used for quoting/replying/reacting to a specific message in a conversation. When used for quoting or replying, the WhatsApp UI will display the new message along with a contextual bubble that displays the quoted/replied to message's content. When used for reacting the WhatsApp UI will display the reaction emoji below the reacted to message.

context.message_uuid
context.message_uuid: string;

The UUID of the message being quoted/replied/reacted to.

from
from: string;

The sender's identifier.

message_type
message_type: "reaction";

The type of the message, which is 'reaction' for a text message.

reaction
reaction: object;
reaction.action
reaction.action: "react" | "unreact";

The action taken.

reaction.emoji?
optional reaction.emoji: string;

The emoji used as a reaction.

to
to: string;

The recipient's identifier.

webhook_url
webhook_url: string;

Specifies the URL to which Status Webhook messages will be sent for this particular message. Over-rides account-level and application-level Status Webhook url settings on a per-message basis.

webhook_version
webhook_version: "v0.1" | "v1";

Specifies which version of the Messages API will be used to send Status Webhook messages for this particular message. For example, if v0.1 is set, then the JSON body of Status Webhook messages for this message will be sent in Messages v0.1 format. Over-rides account-level and application-level API version settings on a per-message basis.


WhatsAppReactionType

type WhatsAppReactionType = object;

Defined in: messages/lib/types/Channels/WhatsApp/WhatAppReactionType.ts:1

Type declaration

action
action: "react" | "unreact";

The action taken.

emoji?
optional emoji: string;

The emoji used as a reaction.


WhatsAppStickerIdType

type WhatsAppStickerIdType = object;

Defined in: messages/lib/types/Channels/WhatsApp/WhatsAppStickerIdType.ts:6

Represents a WhatsApp sticker ID type.

Type declaration

id
id: string;

The ID of the WhatsApp sticker.


WhatsAppStickerUrlType

type WhatsAppStickerUrlType = object;

Defined in: messages/lib/types/Channels/WhatsApp/WhatsAppStickerUrlType.ts:6

Represents a WhatsApp sticker by URL.

Type declaration

url
url: string;

The URL of the WhatsApp sticker.


WhatsAppTemplateType

type WhatsAppTemplateType = object;

Defined in: messages/lib/types/Channels/WhatsApp/WhatsAppTemplateType.ts:6

Represents a WhatsApp template for sending structured template messages.

Type declaration

name
name: string;

The name of the WhatsApp template.

parameters
parameters: string[];

An array of parameters for the WhatsApp template.

Parameters

AnyMessengerParams

type AnyMessengerParams = 
  | MessengerAudioParams
  | MessengerFileParams
  | MessengerImageParams
  | MessengerParams
  | MessengerTextParams
  | MessengerType
  | MessengerVideoParams;

Defined in: messages/lib/types/Channels/Messenger/index.ts:25

Represents a union type that can be any of the Messenger-specific message parameters or MessengerType.


AnyMMSParams

type AnyMMSParams = 
  | MMSAudioParams
  | MMSImageParams
  | MMSVcardParams
  | MMSVideoParams;

Defined in: messages/lib/types/Channels/MMS/index.ts:18

Represents a union type that can be any of the MMS-specific message parameters.


AnyViberParams

type AnyViberParams = 
  | ViberAction
  | ViberActionParams
  | ViberFileParams
  | ViberImageParams
  | ViberService
  | ViberTextParams
  | ViberVideoParams;

Defined in: messages/lib/types/Channels/Viber/index.ts:24

Represents a union type that can be any of the Viber-specific message parameters or configurations.


AnyWhatsAppParams

type AnyWhatsAppParams = 
  | WhatsAppAudioParams
  | WhatsAppCustomParams
  | WhatsAppFileParams
  | WhatsAppImageParams
  | WhatsAppStickerIdType
  | WhatsAppStickerParams
  | WhatsAppTemplateParams
  | WhatsAppTextParams
  | WhatsAppReactionParams
  | WhatsAppVideoParams;

Defined in: messages/lib/types/Channels/WhatsApp/index.ts:37

Represents a union type that can be any of the WhatsApp-specific message parameters or configurations.


MessengerAudioParams

type MessengerAudioParams = MessengerParams & MessageParamsAudio;

Defined in: messages/lib/types/Channels/Messenger/MessengerAudioParams.ts:11

Represents parameters for sending an audio message via the Messenger platform. Combines parameters from both MessengerParams and MessageParamsAudio.


MessengerFileParams

type MessengerFileParams = object & MessengerParams;

Defined in: messages/lib/types/Channels/Messenger/MessengerFileParams.ts:10

Represents parameters for sending a file message via the Messenger platform.

Type declaration

file
file: MessageFileType;

MessengerImageParams

type MessengerImageParams = MessengerParams & MessageParamsImage;

Defined in: messages/lib/types/Channels/Messenger/MessengerImageParams.ts:11

Represents parameters for sending an image message via the Messenger platform. Combines parameters from both MessengerParams and MessageParamsImage.


MessengerParams

type MessengerParams = object;

Defined in: messages/lib/types/Channels/Messenger/MessengerParams.ts:9

Represents parameters specific to the Messenger platform.

Type declaration

messenger
messenger: MessengerType;

MessengerTextParams

type MessengerTextParams = MessengerParams & MessageParamsText;

Defined in: messages/lib/types/Channels/Messenger/MessengerTextParams.ts:10

Represents parameters for sending a text message via the Messenger platform.


MessengerType

type MessengerType = object;

Defined in: messages/lib/types/Channels/Messenger/MessengerType.ts:9

Represents the type of message to be sent via the Messenger platform.

Type declaration

category
category: MessengerCategory;

The category of the Messenger message.

tag?
optional tag: string;

An optional tag describing the type and relevance of the 1:1 communication between your app and the end user.


MessengerVideoParams

type MessengerVideoParams = MessengerParams & MessageParamsVideo;

Defined in: messages/lib/types/Channels/Messenger/MessengerVideoParams.ts:10

Represents parameters for sending a video message via the Messenger platform.


MMSAudioParams

type MMSAudioParams = MessageParams & MessageAudioType;

Defined in: messages/lib/types/Channels/MMS/MMSAudioParams.ts:13

Represents the parameters for sending an audio message on the MMS channel.

This type combines the common message parameters from MessageParams with audio-specific parameters defined in MessageAudioType. It is used when creating an audio message for the MMS channel.


MMSImageParams

type MMSImageParams = MessageParams & MessageImageType;

Defined in: messages/lib/types/Channels/MMS/MMSImageParams.ts:13

Represents the parameters for sending an image message on the MMS channel.

This type combines the common message parameters from MessageParams with image-specific parameters defined in MessageImageType. It is used when creating an image message for the MMS channel.


MMSVcardParams

type MMSVcardParams = object & MessageParams & MessageVcardType;

Defined in: messages/lib/types/Channels/MMS/MMSVcardParams.ts:13

Represents the parameters for sending a vCard message on the MMS channel.

This type combines the common message parameters from MessageParams with vCard-specific parameters defined in MessageVcardType. It is used when creating a vCard message for the MMS channel.

Type declaration

ttl?
optional ttl: number;

The amount of time in seconds the message will live for


MMSVideoParams

type MMSVideoParams = MessageParams & MessageVideoType;

Defined in: messages/lib/types/Channels/MMS/MMSVideoParams.ts:13

Represents the parameters for sending a video message on the MMS channel.

This type combines the common message parameters from MessageParams with video-specific parameters defined in MessageVideoType. It is used when creating a video message for the MMS channel.


SMSParams

type SMSParams = object & MessageParamsText;

Defined in: messages/lib/types/Channels/SMSParams.ts:16

Represents the parameters for sending an SMS message.

This type is an alias for MessageParamsText and is used when creating an SMS message.

Type declaration

sms?
optional sms: SMSExtraParams;

Remarks

The purpose of this type is to ensure a consistent interface for SMS message parameters, making it easier to extend or modify the type in the future without impacting existing code that uses it. It is based on the MessageParamsText type.


ViberAction

type ViberAction = object;

Defined in: messages/lib/types/Channels/Viber/ViberAction.ts:7

Represents an action associated with a Viber message.

Type declaration

text
text: string;

The text displayed for the action.

url
url: string;

The URL to be opened when the action is triggered.


ViberActionParams

type ViberActionParams = object & ViberService;

Defined in: messages/lib/types/Channels/Viber/ViberActionParams.ts:9

Represents parameters for a Viber action message.

Type declaration

action
action: ViberAction;

The action associated with the Viber message.


ViberFileParams

type ViberFileParams = object & MessageParams;

Defined in: messages/lib/types/Channels/Viber/ViberFileParams.ts:10

Represents parameters for sending a file via Viber.

Type declaration

file
file: object & MessageFileType;
Type declaration
name?
optional name: string;

The name and extension of the file.


ViberImageParams

type ViberImageParams = object & MessageParamsImage;

Defined in: messages/lib/types/Channels/Viber/ViberImageParams.ts:10

Represents parameters for sending an image via Viber.

Type declaration

viberService
viberService: ViberActionParams;

The Viber action parameters for sending the image.


ViberService

type ViberService = object;

Defined in: messages/lib/types/Channels/Viber/ViberService.ts:10

Represents parameters for a Viber service message.

Type declaration

action?
optional action: ViberAction;
category
category: ViberCategory;

The category of the Viber service message.

ttl
ttl: number;

The time-to-live (TTL) of the message to be delivered in seconds. If the message is not delivered within this time, it will be deleted.

type
type: string;

The Viber-specific type definition. To use "template," please contact your Vonage Account Manager to set up templates. To find out more, please visit the product page.


ViberTextParams

type ViberTextParams = object & MessageParamsText;

Defined in: messages/lib/types/Channels/Viber/ViberTextParams.ts:10

Represents parameters for sending a text message via Viber with action buttons.

Type declaration

text
text: string;

The text content of the message.

viberService
viberService: ViberActionParams;

The Viber service and action parameters for the message.


ViberVideoParams

type ViberVideoParams = object & MessageParamsVideo;

Defined in: messages/lib/types/Channels/Viber/ViberVideoParams.ts:10

Represents parameters for sending a video message via Viber with action buttons.

Type declaration

viberService
viberService: object & ViberActionParams;

The Viber service, action parameters, and video message details.

Type declaration
duration
duration: string;

The duration of the video in seconds.

fileSize
fileSize: string;

The file size of the video in MB.

video
video: object;

The details of the video message to be sent.

video.caption?
optional video.caption: string;

The caption to be displayed with the video.

video.thumbUrl?
optional video.thumbUrl: string;

The URL of the thumbnail image to be displayed with the video.

video.url
video.url: string;

The URL of the video attachment.


WhatsAppAudioParams

type WhatsAppAudioParams = object & WhatsAppParams & MessageParamsAudio;

Defined in: messages/lib/types/Channels/WhatsApp/WhatsAppAudioParams.ts:10

Represents parameters for sending an audio message via WhatsApp.

Type declaration

ttl?
optional ttl: number;

The amount of time in seconds the message will live for


WhatsAppCustomParams

type WhatsAppCustomParams = object & WhatsAppParams;

Defined in: messages/lib/types/Channels/WhatsApp/WhatsAppCustomParams.ts:10

Represents parameters for sending a custom WhatsApp message with a file attachment.

Type declaration

custom
custom: WhatsAppCustomType;

The custom WhatsApp message type.


WhatsAppImageParams

type WhatsAppImageParams = WhatsAppParams & MessageParamsImage;

Defined in: messages/lib/types/Channels/WhatsApp/WhatsAppImageParams.ts:10

Represents a WhatsApp image message type.


WhatsAppReactionParams

type WhatsAppReactionParams = object & WhatsAppParams;

Defined in: messages/lib/types/Channels/WhatsApp/WhatsAppReactionParams.ts:9

Represents WhatsApp reaction message parameters.

Type declaration

reaction
reaction: WhatsAppReactionType;

WhatsAppStickerParams

type WhatsAppStickerParams = object & WhatsAppParams;

Defined in: messages/lib/types/Channels/WhatsApp/WhatsAppStickerParams.ts:11

Represents WhatsApp sticker parameters for sending stickers in a message.

Type declaration

sticker
sticker: 
  | WhatsAppStickerIdType
  | WhatsAppStickerUrlType;

The sticker to be sent, which can be either a sticker ID or a sticker URL.


WhatsAppTemplateParams

type WhatsAppTemplateParams = object & WhatsAppParams;

Defined in: messages/lib/types/Channels/WhatsApp/WhatsAppTemplateParams.ts:11

Represents WhatsApp template message parameters.

Type declaration

template
template: WhatsAppTemplateType;

The WhatsApp template to be sent.

whatsapp
whatsapp: WhatsAppPolicyType;

WhatsApp policy type for the template message.


WhatsAppTextParams

type WhatsAppTextParams = WhatsAppParams & MessageParamsText;

Defined in: messages/lib/types/Channels/WhatsApp/WhatsAppTextParams.ts:10

Represents a text message type for WhatsApp.


WhatsAppVideoParams

type WhatsAppVideoParams = object & WhatsAppParams & MessageParamsVideo;

Defined in: messages/lib/types/Channels/WhatsApp/WhatsAppVideoParams.ts:10

Represents a video message type for WhatsApp.

Type declaration

ttl?
optional ttl: number;

The amount of time in seconds the message will live for

Requests

MessengerAudioRequest

type MessengerAudioRequest = object;

Defined in: messages/lib/types/Requests/MessengerAudioRequest.ts:13

Represents a request to send an audio message via the Messenger channel.

Type declaration

audio
audio: object;

The audio content of the message, including the URL of the audio file.

audio.url
audio.url: string;

The URL of the audio file.

channel
channel: "messenger";

The channel for sending the message, which is set to 'messenger'.

client_ref
client_ref: string;

A client reference string for tracking the message.

from
from: string;

The sender of the message.

message_type
message_type: "audio";

The message type, which is set to 'audio' for an audio message.

messenger
messenger: MessengerType;

Additional details about the Messenger message type.

to
to: string;

The recipient of the message.

Remarks

Vonage API's will return information using snake_case. This represents the pure request structure before it's transformed into snake_case for the API call.


MessengerFileRequest

type MessengerFileRequest = object;

Defined in: messages/lib/types/Requests/MessengerFileRequest.ts:13

Represents a request to send a file message via the Messenger channel.

Type declaration

channel
channel: "messenger";

The channel for sending the message, which is set to 'messenger'.

client_ref
client_ref: string;

A client reference string for tracking the message.

file
file: object;

The file content of the message, including the URL of the file.

file.url
file.url: string;

The URL of the file.

from
from: string;

The sender of the message.

message_type
message_type: "file";

The message type, which is set to 'file' for a file message.

messenger
messenger: MessengerType;

Additional details about the Messenger message type.

to
to: string;

The recipient of the message.

Remarks

Vonage API's will return information using snake_case. This represents the pure request structure before it's transformed into snake_case for the API call.


MessengerImageRequest

type MessengerImageRequest = object;

Defined in: messages/lib/types/Requests/MessengerImageRequest.ts:13

Represents a request to send an image message via the Messenger channel.

Type declaration

channel
channel: "messenger";

The channel for sending the message, which is set to 'messenger'.

client_ref
client_ref: string;

A client reference string for tracking the message.

from
from: string;

The sender of the message.

image
image: object;

The image content of the message, including the URL of the image.

image.url
image.url: string;

The URL of the image.

message_type
message_type: "image";

The message type, which is set to 'image' for an image message.

messenger
messenger: MessengerType;

Additional details about the Messenger message type.

to
to: string;

The recipient of the message.

Remarks

Vonage API's will return information using snake_case. This represents the pure request structure before it's transformed into snake_case for the API call.


MessengerTextRequest

type MessengerTextRequest = object;

Defined in: messages/lib/types/Requests/MessengerTextRequest.ts:12

Represents a request for sending a text message via the Messenger channel.

Type declaration

channel
channel: "messenger";

The channel through which the message will be sent, which is 'messenger' for Messenger.

client_ref
client_ref: string;

A client-defined reference string for the message.

from
from: string;

The sender's phone number or identifier.

message_type
message_type: "text";

The type of the message, which is 'text' for a text message.

messenger
messenger: MessengerType;

Additional information specific to the Messenger channel.

text
text: string;

The text content of the message.

to
to: string;

The recipient's phone number or identifier.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


MessengerVideoRequest

type MessengerVideoRequest = object;

Defined in: messages/lib/types/Requests/MessengerVideoRequest.ts:13

Represents a request for sending a video message via the Messenger channel.

Type declaration

channel
channel: "messenger";

The channel through which the message will be sent, which is 'messenger' for Messenger.

client_ref
client_ref: string;

A client-defined reference string for the message.

from
from: string;

The sender's phone number or identifier.

message_type
message_type: "video";

The type of the message, which is 'video' for a video message.

messenger
messenger: MessengerType;

Additional information specific to the Messenger channel.

to
to: string;

The recipient's phone number or identifier.

video
video: object;

The video content of the message.

video.url
video.url: string;

The URL of the video to be sent in the message.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


MMSAudioRequest

type MMSAudioRequest = object;

Defined in: messages/lib/types/Requests/MMSAudioRequest.ts:11

Represents a request for sending an audio message via the MMS (Multimedia Messaging Service) channel.

Type declaration

audio
audio: object;

The audio content of the message, including the URL of the audio and an optional caption.

audio.caption?
optional audio.caption: string;

An optional caption or description for the audio message.

audio.url
audio.url: string;

The URL of the audio file to be sent in the message.

channel
channel: "mms";

The channel through which the message will be sent, which is 'mms' for MMS.

client_ref
client_ref: string;

A client-defined reference string for the message.

from
from: string;

The sender's phone number or identifier.

message_type
message_type: "audio";

The type of the message, which is 'audio' for an audio message.

to
to: string;

The recipient's phone number or identifier.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


MMSImageRequest

type MMSImageRequest = object;

Defined in: messages/lib/types/Requests/MMSImageRequest.ts:11

Represents a request for sending an image message via the MMS (Multimedia Messaging Service) channel.

Type declaration

channel
channel: "mms";

The channel through which the message will be sent, which is 'mms' for MMS.

client_ref
client_ref: string;

A client-defined reference string for the message.

from
from: string;

The sender's phone number or identifier.

image
image: object;

The image content of the message, including the URL of the image and an optional caption.

image.caption?
optional image.caption: string;

An optional caption or description for the image message.

image.url
image.url: string;

The URL of the image file to be sent in the message.

message_type
message_type: "image";

The type of the message, which is 'image' for an image message.

to
to: string;

The recipient's phone number or identifier.

ttl?
optional ttl: number;

The amount of time in seconds the message will live for

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


MMSVcardRequest

type MMSVcardRequest = object;

Defined in: messages/lib/types/Requests/MMSVcardRequest.ts:11

Represents a request for sending a vCard message via the MMS (Multimedia Messaging Service) channel.

Type declaration

channel
channel: "mms";

The channel through which the message will be sent, which is 'mms' for MMS.

client_ref
client_ref: string;

A client-defined reference string for the message.

from
from: string;

The sender's phone number or identifier.

message_type
message_type: "vcard";

The type of the message, which is 'vcard' for a vCard message.

to
to: string;

The recipient's phone number or identifier.

vcard
vcard: object;

The vCard content of the message, including the URL of the vCard file.

vcard.url
vcard.url: string;

The URL of the vCard file to be sent in the message.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


MMSVideoRequest

type MMSVideoRequest = object;

Defined in: messages/lib/types/Requests/MMSVideoRequest.ts:11

Represents a request for sending a video message via the MMS (Multimedia Messaging Service) channel.

Type declaration

channel
channel: "mms";

The channel through which the message will be sent, which is 'mms' for MMS.

client_ref
client_ref: string;

A client-defined reference string for the message.

from
from: string;

The sender's phone number or identifier.

message_type
message_type: "video";

The type of the message, which is 'video' for a video message.

to
to: string;

The recipient's phone number or identifier.

video
video: object;

The video content of the message, including the URL of the video file and an optional caption.

video.caption?
optional video.caption: string;

An optional caption for the video.

video.url
video.url: string;

The URL of the video file to be sent in the message.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


SMSMessageRequest

type SMSMessageRequest = object;

Defined in: messages/lib/types/Requests/SMSMessageRequest.ts:11

Represents a request for sending a text message via the SMS (Short Message Service) channel.

Type declaration

channel
channel: "sms";

The channel through which the message will be sent, which is 'sms' for SMS.

client_ref
client_ref: string;

A client-defined reference string for the message.

from
from: string;

The sender's phone number or identifier.

message_type
message_type: "text";

The type of the message, which is 'text' for a text message.

sms?
optional sms: object;
sms.content_id?
optional sms.content_id: string;

A string parameter that satisfies regulatory requirements when sending an SMS to specific countries.

sms.encoding_type?
optional sms.encoding_type: "unicode" | "text" | "auto";

The encoding type to use for the message. If set to either text or unicode the specified type will be used. If set to auto (the default), the Messages API will automatically set the type based on the content of text; i.e. if unicode characters are detected in text, then the message will be encoded as unicode, and otherwise as text.

Link

https://api.support.vonage.com/hc/en-us/sections/200622473-Country-Specific-Features-and-Restrictions

sms.entity_id?
optional sms.entity_id: string;

A string parameter that satisfies regulatory requirements when sending an SMS to specific countries.

Link

https://api.support.vonage.com/hc/en-us/sections/200622473-Country-Specific-Features-and-Restrictions

text
text: string;

The text content of the message.

to
to: string;

The recipient's phone number.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


ViberFileRequest

type ViberFileRequest = object;

Defined in: messages/lib/types/Requests/ViberFileRequest.ts:13

Represents a request for sending a file message via the Viber Service channel.

Type declaration

channel
channel: "viber_service";

The channel through which the message will be sent, which is 'viber_service' for Viber Service.

client_ref
client_ref: string;

A client-defined reference string for the message.

file
file: object;

The file content to be sent, including the URL and name.

file.name
file.name: string;

The name of the file.

file.url
file.url: string;

The URL of the file to be sent.

from
from: string;

The sender's identifier.

message_type
message_type: "file";

The type of the message, which is 'file' for a file message.

to
to: string;

The recipient's identifier.

viber_service
viber_service: ViberService;

The Viber service configuration.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


ViberImageRequest

type ViberImageRequest = object;

Defined in: messages/lib/types/Requests/ViberImageRequest.ts:13

Represents a request for sending an image message via the Viber Service channel.

Type declaration

channel
channel: "viber_service";

The channel through which the message will be sent, which is 'viber_service' for Viber Service.

client_ref
client_ref: string;

A client-defined reference string for the message.

from
from: string;

The sender's identifier.

image
image: object;

The image content to be sent, including the URL and optional caption.

image.caption?
optional image.caption: string;

An optional caption for the image.

image.url
image.url: string;

The URL of the image to be sent.

message_type
message_type: "image";

The type of the message, which is 'image' for an image message.

to
to: string;

The recipient's identifier.

viber_service
viber_service: ViberService;

The Viber service configuration.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


ViberTextRequest

type ViberTextRequest = object;

Defined in: messages/lib/types/Requests/ViberTextRequest.ts:13

Represents a request for sending a text message via the Viber Service channel.

Type declaration

channel
channel: "viber_service";

The channel through which the message will be sent, which is 'viber_service' for Viber Service.

client_ref
client_ref: string;

A client-defined reference string for the message.

from
from: string;

The sender's identifier.

message_type
message_type: "text";

The type of the message, which is 'text' for a text message.

text
text: string;

The text content of the message.

to
to: string;

The recipient's identifier.

viber_service
viber_service: ViberService;

The Viber service configuration.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


ViberVideoRequest

type ViberVideoRequest = object;

Defined in: messages/lib/types/Requests/ViberVideoRequest.ts:13

Represents a request for sending a video message via the Viber Service channel.

Type declaration

channel
channel: "viber_service";

The channel through which the message will be sent, which is 'viber_service' for Viber Service.

client_ref
client_ref: string;

A client-defined reference string for the message.

from
from: string;

The sender's identifier.

message_type
message_type: "video";

The type of the message, which is 'video' for a video message.

to
to: string;

The recipient's identifier.

viber_service
viber_service: ViberService;

The Viber service configuration.

video
video: object;

The video content of the message, including its URL and optional caption and thumbnail URL.

video.caption?
optional video.caption: string;

An optional caption for the video.

video.thumb_url?
optional video.thumb_url: string;

An optional URL for the video's thumbnail.

video.url
video.url: string;

The URL of the video.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


WhatsAppAudioRequest

type WhatsAppAudioRequest = object;

Defined in: messages/lib/types/Requests/WhatsAppAudioRequest.ts:11

Represents a request for sending an audio message via the WhatsApp channel.

Type declaration

audio
audio: object;

The audio content of the message, including its URL.

audio.url
audio.url: string;

The URL of the audio.

channel
channel: "whatsapp";

The channel through which the message will be sent, which is 'whatsapp' for WhatsApp.

client_ref
client_ref: string;

A client-defined reference string for the message.

from
from: string;

The sender's identifier.

message_type
message_type: "audio";

The type of the message, which is 'audio' for an audio message.

to
to: string;

The recipient's identifier.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


WhatsAppCustomRequest

type WhatsAppCustomRequest = object;

Defined in: messages/lib/types/Requests/WhatsAppCustomRequest.ts:11

Represents a request for sending a custom message via the WhatsApp channel.

Type declaration

channel
channel: "whatsapp";

The channel through which the message will be sent, which is 'whatsapp' for WhatsApp.

client_ref
client_ref: string;

A client-defined reference string for the message.

custom
custom: Record<string, unknown>;

The custom content of the message as a record of unknown type.

from
from: string;

The sender's identifier.

message_type
message_type: "custom";

The type of the message, which is 'custom' for a custom message.

to
to: string;

The recipient's identifier.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


WhatsAppFileRequest

type WhatsAppFileRequest = object;

Defined in: messages/lib/types/Requests/WhatsAppFileRequest.ts:11

Represents a request for sending a file message via the WhatsApp channel.

Type declaration

channel
channel: "whatsapp";

The channel through which the message will be sent, which is 'whatsapp' for WhatsApp.

client_ref
client_ref: string;

A client-defined reference string for the message.

file
file: object;

The file content of the message, including the URL of the file and an optional caption.

file.caption?
optional file.caption: string;

An optional caption for the file.

file.url
file.url: string;

The URL of the file to be sent.

from
from: string;

The sender's identifier.

message_type
message_type: "file";

The type of the message, which is 'file' for a file message.

to
to: string;

The recipient's identifier.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


WhatsAppImageRequest

type WhatsAppImageRequest = object;

Defined in: messages/lib/types/Requests/WhatsAppImageRequest.ts:11

Represents a request for sending an image message via the WhatsApp channel.

Type declaration

channel
channel: "whatsapp";

The channel through which the message will be sent, which is 'whatsapp' for WhatsApp.

client_ref
client_ref: string;

A client-defined reference string for the message.

from
from: string;

The sender's identifier.

image
image: object;

The image content of the message, including the URL of the image and an optional caption.

image.caption?
optional image.caption: string;

An optional caption for the image.

image.url
image.url: string;

The URL of the image to be sent.

message_type
message_type: "image";

The type of the message, which is 'image' for an image message.

to
to: string;

The recipient's identifier.

ttl?
optional ttl: number;

The amount of time in seconds the message will live for

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


WhatsAppStickerIdRequest

type WhatsAppStickerIdRequest = object;

Defined in: messages/lib/types/Requests/WhatsAppStickerIdRequest.ts:11

Represents a request for sending a sticker message via the WhatsApp channel using a sticker ID.

Type declaration

channel
channel: "whatsapp";

The channel through which the message will be sent, which is 'whatsapp' for WhatsApp.

client_ref
client_ref: string;

A client-defined reference string for the message.

from
from: string;

The sender's identifier.

message_type
message_type: "sticker";

The type of the message, which is 'sticker' for a sticker message.

sticker
sticker: object;

The sticker content of the message, including the sticker ID.

sticker.id
sticker.id: string;

The ID of the sticker to be sent.

to
to: string;

The recipient's identifier.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


WhatsAppStickerUrlRequest

type WhatsAppStickerUrlRequest = object;

Defined in: messages/lib/types/Requests/WhatsAppStickerUrlRequest.ts:11

Represents a request for sending a sticker message via the WhatsApp channel using a sticker URL.

Type declaration

channel
channel: "whatsapp";

The channel through which the message will be sent, which is 'whatsapp' for WhatsApp.

client_ref
client_ref: string;

A client-defined reference string for the message.

from
from: string;

The sender's identifier.

message_type
message_type: "sticker";

The type of the message, which is 'sticker' for a sticker message.

sticker
sticker: object;

The sticker content of the message, including the sticker URL.

sticker.url
sticker.url: string;

The URL of the sticker to be sent.

to
to: string;

The recipient's identifier.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


WhatsAppTemplateRequest

type WhatsAppTemplateRequest = object;

Defined in: messages/lib/types/Requests/WhatsAppTemplateRequest.ts:13

Represents a request for sending a template message via the WhatsApp channel.

Type declaration

channel
channel: "whatsapp";

The channel through which the message will be sent, which is 'whatsapp' for WhatsApp.

client_ref
client_ref: string;

A client-defined reference string for the message.

from
from: string;

The sender's identifier.

message_type
message_type: "template";

The type of the message, which is 'template' for a template message.

template
template: WhatsAppTemplateType;

The template content of the message, including the template type.

to
to: string;

The recipient's identifier.

whatsapp
whatsapp: WhatsAppPolicyType;

The policy and locale settings for sending the WhatsApp template message.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


WhatsAppTextRequest

type WhatsAppTextRequest = object;

Defined in: messages/lib/types/Requests/WhatsAppTextRequest.ts:11

Represents a request for sending a text message via the WhatsApp channel.

Type declaration

channel
channel: "whatsapp";

The channel through which the message will be sent, which is 'whatsapp' for WhatsApp.

client_ref
client_ref: string;

A client-defined reference string for the message.

from
from: string;

The sender's identifier.

message_type
message_type: "text";

The type of the message, which is 'text' for a text message.

text
text: string;

The text content of the message.

to
to: string;

The recipient's identifier.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.


WhatsAppVideoRequest

type WhatsAppVideoRequest = object;

Defined in: messages/lib/types/Requests/WhatsAppVideoRequest.ts:11

Represents a request for sending a video message via the WhatsApp channel.

Type declaration

channel
channel: "whatsapp";

The channel through which the message will be sent, which is 'whatsapp' for WhatsApp.

client_ref
client_ref: string;

A client-defined reference string for the message.

from
from: string;

The sender's identifier.

message_type
message_type: "video";

The type of the message, which is 'video' for a video message.

to
to: string;

The recipient's identifier.

video
video: object;

The video content of the message, including the URL and an optional caption.

video.caption?
optional video.caption: string;

An optional caption for the video.

video.url
video.url: string;

The URL of the video.

Remarks

Vonage API's will return information using snake_case. This represents the pure response before the client will transform the keys into camelCase.

Clone this wiki locally