Skip to main content

@wildix-internal/wim-webhooks-client > SendMessageCommand

SendMessageCommand class

Signature:

export declare class SendMessageCommand extends SendMessageCommand_base 

Extends: SendMessageCommand_base

Example

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

import { WebhooksClient, SendMessageCommand } from "@wildix-internal/wim-webhooks-client"; // ES Modules import
// const { WebhooksClient, SendMessageCommand } = require("@wildix-internal/wim-webhooks-client"); // CommonJS import
const client = new WebhooksClient(config);
const input = { // SendMessageInput
message: { // WebhookMessage
deduplicationId: "STRING_VALUE", // required
groupId: "STRING_VALUE", // required
integrationId: "STRING_VALUE", // required
body: "STRING_VALUE", // required
endpoint: { // MessageEndpoint
type: "sqs" || "webhook", // required
url: "STRING_VALUE", // required
key: "STRING_VALUE",
secret: "STRING_VALUE", // required
},
},
};
const command = new SendMessageCommand(input);
const response = await client.send(command);
// { // SendMessageOutput
// id: "STRING_VALUE", // required
// };