You can send a message to a user using the send method available on the client class message manager. Here is an example of how you can send a message:
// assuming you already have initiated the client,const textMessage = new TextMessage({ text: 'Hello, how are you?'})// send a messageconst response = await whatsappClient.message.send({ to: '919876543210', message: textMessagew})
The .send() method is a asynchronous method and returns a promise of response which can either be a success response or a error response. It is suggested to acknowledge the response, as calling the .send() method does not gurantees the message has been sent, there may be some API error which may lead to message not being sent, the SDK does not retries the message, it is the application login responsibility to add retry mechanism. However, if you think this should be added to the SDK itlsef, you are invited to open a issue on the github repository of the SDK.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Wapi.js","colors":{"primary":"#0D9373","light":"#07C983","dark":"#0D9373"},"favicon":"/favicon.svg","logo":{"light":"https://mintcdn.com/na-730c8179/80ga8p47TsqYrSTi/logo/light.svg?fit=max\u0026auto=format\u0026n=80ga8p47TsqYrSTi\u0026q=85\u0026s=db1f5132bf7e2a14e2b2eee4014d4306","dark":"https://mintcdn.com/na-730c8179/80ga8p47TsqYrSTi/logo/dark.svg?fit=max\u0026auto=format\u0026n=80ga8p47TsqYrSTi\u0026q=85\u0026s=c0c5eeaa3f7efce73b5f0811faf44532","href":"/"},"navbar":{"links":[{"label":"Report Bug","href":"https://github.com/sarthakjdev/wapi.js/issues/new"}],"primary":{"type":"button","label":"Github","href":"https://github.com/sarthakjdev/wapi.js"}},"search":{"prompt":"Search documentation..."},"seo":{"metatags":{"title":"Wapi.js","description":"Wapi.js is a node.js SDK built for developing WhatsApp Business platform apps with ease and faster","author":"Sarthak Jain \[email protected]>"},"indexing":"navigable"},"footer":{"socials":{"x":"https://x.com/sarthakjdev","github":"https://github.com/sarthakjdev/wapi.js","linkedin":"https://www.linkedin.com/in/sarthakjdev"}},"integrations":{"gtm":{"tagId":"G-R7HQXH2BE2"}},"navigation":{"global":{"anchors":[{"anchor":"Star us on GitHub","href":"https://github.com/sarthakjdev/wapi.js","icon":"github"},{"anchor":"Sign up to WapiKit","href":"https://app.wapikit.com/signin?utm_medium=wapijs+documentation\u0026utm_source=javascript.wapikit.com\u0026utm_content=sign+up+to+wapi+kit","icon":"code"},{"anchor":"Community","href":"https://join.slack.com/t/wapikit/shared_invite/zt-2kl7eg29s-4DfP9lFwojQg_yCcyW_w6Q","icon":"slack"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"na-730c8179","hasAudioNarration":false,"actualSubdomain":"na-730c8179","customDomains":["javascript.wapikit.com"],"gitSource":{"type":"github","owner":"sarthakjdev","repo":"wapi.js","deployBranch":"master","contentDirectory":"apps/docs","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21e63e94a5dc2e6daf37e3","collectionId":"b3cdcbde-25af-407f-9a04-edbb14aee648","schemaVersion":"v2"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{},"buildId":"6a21e63e94a5dc2e6daf37e3:success","clientVersion":"0.0.4021","searchFilterCounts":[{"language":"default","tag":"API Reference","count":108},{"language":"default","tag":"API Documentation","count":108},{"language":"default","tag":"classes","count":49},{"language":"default","tag":"interfaces","count":41},{"language":"default","tag":"Guide","count":18},{"language":"default","tag":"enumerations","count":10},{"language":"default","tag":"type aliases","count":7},{"language":"default","tag":"Building your application","count":6},{"language":"default","tag":"Addional Resources","count":4},{"language":"default","tag":"Whatsapp API setup","count":4}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"guide/building-your-application/sending-messages","slug":"/guide/building-your-application/sending-messages","pageMetadata":{"title":"Sending Messages","description":"Learn how to send messages using the Wapi.js SDK","href":"/guide/building-your-application/sending-messages"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Learn how to send messages using the Wapi.js SDK\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Wapi.js SDK provides a simple and easy to use classes architecture to send messages. You can send message of following types using the Wapi.js SDK:`}),`\n`,_jsx(Heading,{level:`2`,id:`send-a-message`,children:`Send a message`}),`\n`,_jsxs(_components.p,{children:[`You can send a message to a user using the `,_jsx(_components.code,{children:`send`}),` method available on the `,_jsx(_components.a,{href:`api-reference/classes/Client`,children:`client`}),` class message manager. Here is an example of how you can send a message:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// assuming you already have initiated the client,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` textMessage`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` TextMessage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Hello, how are you?'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// send a message`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` whatsappClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`send`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` to:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '919876543210'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` message:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` textMessagew`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:`The .send() method is a asynchronous method and returns a promise of response which can either be a success response or a error response. It is suggested to acknowledge the response, as calling the .send() method does not gurantees the message has been sent, there may be some API error which may lead to message not being sent, the SDK does not retries the message, it is the application login responsibility to add retry mechanism. However, if you think this should be added to the SDK itlsef, you are invited to open a issue on the github repository of the SDK. `})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Sending Messages","description":"Learn how to send messages using the Wapi.js SDK","href":"/guide/building-your-application/sending-messages"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Send a message","slug":"send-a-message","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"na-730c8179","siteName":"Wapi.js","title":"Sending Messages - Wapi.js","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T02:43:47.578Z","originalFileLocation":"guide/building-your-application/sending-messages.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Learn how to send messages using the Wapi.js SDK\">\u003cmeta data-mint-head name=\"application-name\" content=\"Wapi.js\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/na-730c8179/TYkmauLBLSqpvYNB/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/na-730c8179/TYkmauLBLSqpvYNB/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/na-730c8179/TYkmauLBLSqpvYNB/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/na-730c8179/TYkmauLBLSqpvYNB/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/na-730c8179/TYkmauLBLSqpvYNB/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/na-730c8179/TYkmauLBLSqpvYNB/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/na-730c8179/TYkmauLBLSqpvYNB/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/na-730c8179/TYkmauLBLSqpvYNB/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/na-730c8179/TYkmauLBLSqpvYNB/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Sending Messages - Wapi.js\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how to send messages using the Wapi.js SDK\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Wapi.js\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://javascript.wapikit.com/guide/building-your-application/sending-messages\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://na-730c8179.mintlify.app/_mintlify/api/og/v2?division=Building+your+application\u0026amp;title=Sending+Messages\u0026amp;description=Learn+how+to+send+messages+using+the+Wapi.js+SDK\u0026amp;theme=84626bd417bce7c5cb20ffbd\u0026amp;signature=c66fa3949052d6a00a5bcda38eb62b993020bdfd0c7a6dda45b4da72996381f9\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Sending Messages - Wapi.js\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how to send messages using the Wapi.js SDK\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://na-730c8179.mintlify.app/_mintlify/api/og/v2?division=Building+your+application\u0026amp;title=Sending+Messages\u0026amp;description=Learn+how+to+send+messages+using+the+Wapi.js+SDK\u0026amp;theme=84626bd417bce7c5cb20ffbd\u0026amp;signature=c66fa3949052d6a00a5bcda38eb62b993020bdfd0c7a6dda45b4da72996381f9\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/na-730c8179/TYkmauLBLSqpvYNB/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Wapi.js\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0D9373\">\u003cmeta data-mint-head name=\"author\" content=\"Sarthak Jain \u0026lt;[email protected]\u0026gt;\">\u003clink data-mint-head rel=\"canonical\" href=\"https://javascript.wapikit.com/guide/building-your-application/sending-messages\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guide/building-your-application/sending-messages.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://javascript.wapikit.com/#organization\",\"name\":\"Wapi.js\",\"url\":\"https://javascript.wapikit.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/na-730c8179/80ga8p47TsqYrSTi/logo/light.svg?fit=max\u0026auto=format\u0026n=80ga8p47TsqYrSTi\u0026q=85\u0026s=db1f5132bf7e2a14e2b2eee4014d4306\"}},{\"@type\":\"WebSite\",\"@id\":\"https://javascript.wapikit.com#website\",\"name\":\"Wapi.js\",\"url\":\"https://javascript.wapikit.com\",\"publisher\":{\"@id\":\"https://javascript.wapikit.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://javascript.wapikit.com/guide/building-your-application/sending-messages#webpage\",\"url\":\"https://javascript.wapikit.com/guide/building-your-application/sending-messages\",\"name\":\"Sending Messages\",\"description\":\"Learn how to send messages using the Wapi.js SDK\",\"dateModified\":\"2026-01-07T02:43:47.578Z\",\"isPartOf\":{\"@id\":\"https://javascript.wapikit.com#website\"},\"breadcrumb\":{\"@id\":\"https://javascript.wapikit.com/guide/building-your-application/sending-messages#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://javascript.wapikit.com/guide/building-your-application/sending-messages#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Building your application\",\"item\":\"https://javascript.wapikit.com/guide/building-your-application/creating-wapi-client\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sending Messages\",\"item\":\"https://javascript.wapikit.com/guide/building-your-application/sending-messages\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://javascript.wapikit.com/guide/building-your-application/sending-messages#article\",\"headline\":\"Sending Messages\",\"name\":\"Sending Messages\",\"description\":\"Learn how to send messages using the Wapi.js SDK\",\"url\":\"https://javascript.wapikit.com/guide/building-your-application/sending-messages\",\"mainEntityOfPage\":{\"@id\":\"https://javascript.wapikit.com/guide/building-your-application/sending-messages#webpage\"},\"dateModified\":\"2026-01-07T02:43:47.578Z\",\"publisher\":{\"@id\":\"https://javascript.wapikit.com/#organization\"},\"isPartOf\":{\"@id\":\"https://javascript.wapikit.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Wapi.js\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Wapi.js","nav":{"global":{"anchors":[{"anchor":"Star us on GitHub","href":"https://github.com/sarthakjdev/wapi.js","icon":"github"},{"anchor":"Sign up to WapiKit","href":"https://app.wapikit.com/signin?utm_medium=wapijs+documentation\u0026utm_source=javascript.wapikit.com\u0026utm_content=sign+up+to+wapi+kit","icon":"code"},{"anchor":"Community","href":"https://join.slack.com/t/wapikit/shared_invite/zt-2kl7eg29s-4DfP9lFwojQg_yCcyW_w6Q","icon":"slack"}]},"tabs":[{"tab":"Guide","groups":[{"group":"Quick Start","pages":[{"title":"Introduction","href":"/guide/introduction"},{"title":"Quick Start Guide","href":"/guide/quickstart"}]},{"group":"Installation and Preparations","pages":[{"title":null,"href":"/guide/installation-and-preparations/setup-node"},{"title":"Setting up Wapi.js Application Development Environment","href":"/guide/installation-and-preparations/creating-application"}]},{"group":"Whatsapp API setup","pages":[{"title":"WhatsApp Business Platform","href":"/guide/whatsapp-api-setup/understanding-whatsapp-business-platform"},{"title":"Create a Meta Business App","href":"/guide/whatsapp-api-setup/creating-business-app"},{"title":"Getting API Key for WhatsApp Cloud Platform","href":"/guide/whatsapp-api-setup/getting-api-key"},{"title":"Configuring Webhook","href":"/guide/whatsapp-api-setup/configuring-webhook"}]},{"group":"Building your application","pages":[{"title":"Initiating the Wapi.js SDK","href":"/guide/building-your-application/creating-wapi-client"},{"title":"Building Message Components","description":"Build message components with ease using the Wapi.js SDK","href":"/guide/building-your-application/building-message-components"},{"title":"Sending Messages","href":"/guide/building-your-application/sending-messages"},{"title":"Handle Events","description":"Learn how to handle events using the Wapi.js SDK","href":"/guide/building-your-application/event-handling"},{"title":"Replying and Reacting to messages","href":"/guide/building-your-application/replying-and-reacting"},{"title":"Handling Media","href":"/guide/building-your-application/handling-media"}]},{"group":"Addional Resources","pages":[{"title":"Scope of Wapi.js SDK","href":"/guide/wapijs-sdk-scope"},{"title":"Important Reference Links","href":"/guide/references"},{"title":"Contributing to Wapi.js","href":"/guide/contributing"},{"title":null,"href":"/guide/contact"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/README"}]}]},"title":"Sending Messages - Wapi.js","buildId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","deploymentId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","dynamics":[],"chunks":[]}