Send a free-form WhatsApp text message
send_whatsapp_messageSend a free-form WhatsApp text message
Free-form text is restricted to Meta's 24-hour customer-service window
(the customer must have messaged the agent within the last 24 hours).
Outside the window, use POST /v1/whatsapp/templates instead.
The agent is the body's agent_id, judged as on every agent endpoint: an API key needs it on
its agent list; an AI assistant needs full access, and the person it acts for must have that
agent as a member, admin or owner. An agent_id that is missing or not a UUID is
422 invalid_agent_id.
The MCP server sends this call with an idempotency key of its own, so a retry after a timeout never sends it twice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | E.164 international phone number — leading `+`, country code, then 7–15 digits. No spaces, dashes, or parens. | |
| from | Yes | E.164 international phone number — leading `+`, country code, then 7–15 digits. No spaces, dashes, or parens. | |
| text | No | ||
| agent_id | Yes | ID of the Mojeeb agent to send from. | |
| media_url | No | One file to send: an https link Mojeeb downloads (a public address, no redirects) or the `url` of a Mojeeb upload of the agent (`createUpload`). A JPEG, PNG or WebP image up to 10 MB, an MP4 or MOV video up to 16 MB (re-encoded for WhatsApp; videos sent with messages have a budget of their own, 10 a minute per key, past which they are `429 video_send_rate_limited`), or a PDF or DOCX document up to 20 MB. |