How do I connect incoming WhatsApp messages to automations or AI agents?

Enable Webhook Forwarding on your connected WhatsApp account and supply the payload URL from your platform (n8n, Make, Zapier, AI framework, etc.) .

How can an automation or AI agent reply back to the conversation?

Incoming webhooks contain a specific reply endpoint URL . Your automation can send an authenticated POST request to that endpoint with your API key to reply directly to the WhatsApp sender—no underlying provider credentials required .

How do I set up and authenticate the Reply API?

  1. Generate a key under API Keys in AutoForwardText (permissions default to messages:reply) . Save it securely .
  2. Send a POST request to the payload’s reply endpoint with:
    • Header: Authorization: Bearer YOUR_API_KEY
    • Header: Idempotency-Key: <UNIQUE_KEY>
    • JSON Body: {"text": "Your message here"}

Why is an Idempotency-Key required?

Automation platforms often retry network requests . The Idempotency-Key ensures AutoForwardText recognizes duplicate retries and prevents sending identical duplicate messages to the customer .

Note: Reusing the same Idempotency-Key with different reply text will result in an idempotency conflict error . Always generate a unique key per logical reply .