open-wa v5 is alpha. Use v4.76.0 for mature production systems unless you are validating v5.
The Client APIAPI ExplorerLicensing

Worked example: sendText

Following one method from schema definition to dispatch.

Worked example: sendText

Generated file warning: this page is generated by packages/schema/scripts/gen-client-reference-docs.ts. Do not edit generated method content by hand.

sendText is defined in packages/schema/src/methods/messaging.ts:

export const sendText = defineMethodV2('sendText', {
  meta: { description: "Sends a text message to a chat", namespace: "messages", httpMethod: "POST" },
  parameterOrder: ["to","content","options"],
  // input: z.object({ to, content, options }), output: MessageId | boolean | string
});
  1. A positional call maps by parameterOrder.
  2. An object call resolves key aliases (chatIdto, textcontent).
  3. inputSchema.parseAsync() validates before dispatch.
  4. Dispatch target is execute('sendText', validatedParams).
  5. See the full reference on the messages namespace page.
Wally the Walrus typing

Was this helpful?

Wally and his cute companion coffee mug are coding day and night to keep this up-to-date!

On this page