Evolution WhatsApp
v0.3.1Send and read WhatsApp messages, send media and manage instances via the Evolution API.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
send_text
Send a WhatsApp text message to a phone number. The message reaches a real person and can't be unsent. Don't call it twice for the same message: the second call sends a duplicate. Don't use it to test the connection, use connection_status for that.
| Parameter | Type | Description |
|---|---|---|
number * | string | Recipient phone, e.g. "+55 11 99999-9999". |
text * | string | Message body. |
instance | string | Evolution instance name. Falls back to EVOLUTION_DEFAULT_INSTANCE. |
send_media
Send an image, video, document or audio via URL or base64. The file reaches a real person and can't be unsent. Don't call it again after a call that returned a result, or the file is sent twice.
| Parameter | Type | Description |
|---|---|---|
media * | string | Public URL or base64-encoded content. |
mediatype * | string | |
number * | string | Recipient phone. |
caption | string | |
delay | integer | Delay in ms before sending. |
fileName | string | |
instance | string | Evolution instance name. Falls back to EVOLUTION_DEFAULT_INSTANCE. |
mimetype | string | e.g. "image/png". |
find_chats
List the WhatsApp chats/conversations on the instance. Returns at most `limit` chats (default 50, max 200).
| Parameter | Type | Description |
|---|---|---|
instance | string | Evolution instance name. Falls back to EVOLUTION_DEFAULT_INSTANCE. |
limit | integer | Maximum items to return (1-200, default 50). |
find_messages
Read the message history of a chat (by phone or JID).
| Parameter | Type | Description |
|---|---|---|
chat * | string | Phone ("5511999999999") or JID ("...@s.whatsapp.net"). |
instance | string | Evolution instance name. Falls back to EVOLUTION_DEFAULT_INSTANCE. |
limit | integer | Messages per page (1-200, default 50). |
page | integer | Page number, starting at 1. |
create_instance
Create a new Evolution instance (a WhatsApp connection slot). Don't call it for an instance that already exists: check with connection_status first, and use get_qrcode to link a number to an existing instance.
| Parameter | Type | Description |
|---|---|---|
instance * | string | Name for the new instance. |
get_qrcode
Get the QR code (base64) to link a WhatsApp number to the instance.
| Parameter | Type | Description |
|---|---|---|
instance | string | Evolution instance name. Falls back to EVOLUTION_DEFAULT_INSTANCE. |
connection_status
Check whether the instance is connected (state "open").
| Parameter | Type | Description |
|---|---|---|
instance | string | Evolution instance name. Falls back to EVOLUTION_DEFAULT_INSTANCE. |
disconnect_instance
Log the WhatsApp number out of the instance. Reconnecting needs a person to scan a new QR code, so don't call it to fix a failed send or to restart the connection. Only call it when the user asks to disconnect.
| Parameter | Type | Description |
|---|---|---|
instance | string | Evolution instance name. Falls back to EVOLUTION_DEFAULT_INSTANCE. |
configure_webhook
Point the instance webhook to a public URL for inbound events. This replaces the current webhook, so whatever was receiving events stops receiving them. Don't call it unless the user gave you the URL.
| Parameter | Type | Description |
|---|---|---|
url * | string | Public HTTPS webhook URL (http only for localhost). |
events | array | Evolution events. Defaults to ["MESSAGES_UPSERT","CONNECTION_UPDATE"]. |
instance | string | Evolution instance name. Falls back to EVOLUTION_DEFAULT_INSTANCE. |