API ReferenceWhatsApp
whatsapp.sendMessage
Authorization
ApiKeyAuth x-api-key<token>
API key from /account/api-keys. Free tier: 100 req/hr. Pro tier: 1000 req/hr.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://gmp.ffstudios.io/api/rpc/api-reference/whatsapp/sendMessage" \ -H "Content-Type: application/json" \ -d '{ "clientId": "string", "target": "string", "message": {} }'{
"type": "string",
"client": "string",
"message": "string",
"res": {
"key": {
"remoteJid": "string",
"fromMe": true,
"id": "string",
"participant": "string",
"property1": null,
"property2": null
},
"messageTimestamp": 0,
"status": 0,
"message": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
},
"error": "string",
"property1": null,
"property2": null
}Notes
Proxies to apps/server: POST /api/wa/send-message.
Send only one message-type field at a time. The server validates exactly-one via Zod discriminated union — see Message Types on the index for the full list.
oRPC client example
import { orpc } from "@/utils/orpc";
import { useMutation } from "@tanstack/react-query";
const send = useMutation(orpc.whatsapp.sendMessage.mutationOptions());
send.mutate({
clientId: "my-client",
target: "919876543210",
message: { text: "Hello!" },
});