How to hit the Evolution API (WhatsApp) API

Evolution API is an open-source WhatsApp API you run yourself. Each connected WhatsApp number is an instance; paths use the instance name.

Authentication

The global API key is set in your server's configuration (AUTHENTICATION_API_KEY). Send it as the apikey header. In the examples it's written {{EVOLUTION_API_KEY}}; {{EVOLUTION_HOST}} is your server.

Full reference: https://doc.evolution-api.com/

List instances

curl https://{{EVOLUTION_HOST}}/instance/fetchInstances \
  -H "apikey: {{EVOLUTION_API_KEY}}"
Run in PostTaco

Send a text message

number in international format, digits only.

curl -X POST https://{{EVOLUTION_HOST}}/message/sendText/{{INSTANCE}} \
  -H "apikey: {{EVOLUTION_API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{"number": "{{TO_NUMBER}}", "text": "Hello from PostTaco"}'
Run in PostTaco