Skip to main content

@wildix/classound-client > SendWhatsAppTemplateCommand

SendWhatsAppTemplateCommand class

Signature:

export declare class SendWhatsAppTemplateCommand extends SendWhatsAppTemplateCommand_base 

Extends: SendWhatsAppTemplateCommand_base

Example

Use a bare-bones client and the command you need to make an API call.

import { ClassoundClient, SendWhatsAppTemplateCommand } from "@wildix/classound-client"; // ES Modules import
// const { ClassoundClient, SendWhatsAppTemplateCommand } = require("@wildix/classound-client"); // CommonJS import
const client = new ClassoundClient(config);
const input = { // SendWhatsAppTemplateInput
to: "STRING_VALUE", // required
company: "STRING_VALUE", // required
pbx: "STRING_VALUE", // required
extension: "STRING_VALUE", // required
from: "STRING_VALUE", // required
channelId: "STRING_VALUE",
messageId: "STRING_VALUE",
userId: "STRING_VALUE",
template: { // TemplateWithParameters
name: "STRING_VALUE", // required
parameters: [ // ListTemplateParameter // required
{ // TemplateParameter
name: "STRING_VALUE", // required
value: "STRING_VALUE", // required
},
],
},
};
const command = new SendWhatsAppTemplateCommand(input);
const response = await client.send(command);
// { // SendWhatsAppTemplateOutput
// type: "STRING_VALUE", // required
// success: true || false, // required
// status: "STRING_VALUE", // required
// id: "STRING_VALUE", // required
// company: "STRING_VALUE", // required
// data: { // SendWhatsAppTemplateData
// from: "STRING_VALUE",
// to: "STRING_VALUE",
// template: { // TemplateWithParameters
// name: "STRING_VALUE", // required
// parameters: [ // ListTemplateParameter // required
// { // TemplateParameter
// name: "STRING_VALUE", // required
// value: "STRING_VALUE", // required
// },
// ],
// },
// pbx: "STRING_VALUE",
// extension: "STRING_VALUE",
// },
// };