For the complete documentation index, see llms.txt. This page is also available as Markdown.

4. Test your Agent

Before customers reach your agent, send it test messages and check the replies. The test endpoint returns the agent's response plus useful diagnostics — no real WhatsApp message is sent.

curl -s -X POST https://waba-v2.360dialog.io/agent_test \
  -H "D360-API-KEY: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{ "user_msg": "Do you deliver to Rio?" }'

Run an agent test

A 4XX or 500 from agent_test isn't always a real error. Endpoints occasionally fail with no obvious cause while Meta debugs an ongoing instability. Retry after a few hours before treating it as a configuration problem. See Known limitations.

The response includes agent_response (the reply text), conversation_id, handoff_reason, no_response_reason, quick_replies, and product_variant_ids.

How to test safely today

Because of the caveat above, the practical way to test before a public launch is to test on real WhatsApp under an allowlist, not through agent_test:

  1. Set ai_audience to ALLOWLISTED_ONLY and add your own phone numbers to the allowlist.

  2. Message the agent from those allowlisted numbers on WhatsApp and observe the replies directly on the phone.

  3. Iterate on skills, FAQs, and business info, then repeat.

Use agent_test for quick automated checks in environments where it's acceptable to have the agent on EVERYONE (for example, a dedicated test number), and use the allowlist-on-real-WhatsApp method for pre-launch validation of a production number.

Each agent_test call starts a fresh conversation unless you pass a conversation_id back in to continue a thread. The consumer/to field is ignored. So to test a multi-turn flow, capture the conversation_id from the first response and send it with the next message.

Once you're happy with the replies, continue to Go live with an allowlist.

Last updated

Was this helpful?