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
});- A positional call maps by
parameterOrder. - An object call resolves key aliases (
chatId→to,text→content). inputSchema.parseAsync()validates before dispatch.- Dispatch target is
execute('sendText', validatedParams). - See the full reference on the messages namespace page.

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