Create a test webhook endpoint | Developer Documentation
Test a ChatArchitect webhook receiver before using it with customers
Use this guide to check a receiver for your own ChatArchitect API application. Work through local event handling, public routing and a small connection test, recording what each stage proves. The endpoint preparation checklist covers the receiver and callback contract; the ChatArchitect API quick start supplies the registration workflow and event examples.
Choose the test scope before changing a callback
- For a custom application, identify the intended account, connected business number, receiver route and person responsible for checking the result.
- For an existing CRM or help desk connector, first confirm whether it already manages the callback and how a change would affect that connection.
- Use a controlled test receiver and permitted test contact. Keep ordinary customer traffic on its agreed route while preparing the test.
- Record the existing callback setting and the supported way to restore it. Confirm the effect of registration before replacing a receiver.
Agree the callback request method, sender verification, success response, response deadline and any redelivery behavior with ChatArchitect support. The quick start documents JSON events and safe duplicate processing; it does not specify those transport details. Use the agreed contract for the test.
Check your handler locally with synthetic events
Start with the documented event shapes, replacing message references, phone values and text with fictional test data. These local fixtures exercise your application's processing; they do not register a callback or send a WhatsApp message.
| Local case | What to check |
|---|---|
Incoming text: root type = message, nested payload.type = text | Validate the source, message reference and text fields, then route the item to the intended test conversation. Use the incoming-text handling guide. |
Outgoing result: root type = message-event | Keep the result separate from incoming text and apply the delivery-status workflow for a matched attempt. |
| The same test event is processed again | Verify your duplicate-handling rule and check that it does not repeat the business action. Use a rule confirmed for the real connection. |
| Two separate incoming items contain identical text | Check that the application preserves both items. Text equality alone does not identify a repeated event. |
| Missing fields, an unknown kind or invalid JSON | Check the validation result and handling agreed for that input. Keep an incomplete item from becoming an ordinary text or delivery result by assumption. |
| Accepted event processing fails | Check that receipt and processing can be investigated separately, and exercise the recovery plan for your application. |
Keep the local test record small: case name, intended route, validation result, processing result and any repeated action. Use your data-handling policy for diagnostic records.
Check the public route and registration
- Deploy the intended handler to its stable HTTPS route. Check public DNS, certificate validity and the proxy path to that handler.
- Check requests using the agreed callback method and body. A page opened successfully in a browser establishes a different kind of request; verify the handler that receives the callback.
- Follow Step 1 of the API quick start from your server, using ChatArchitect App ID and Secret for the documented registration request. Supply your actual receiver and intended connection according to the guide.
- Review the registration response and record its time with time zone. Keep credentials out of the diagnostic record.
A successful registration response, public route check and local fixture result each establish a separate stage. Continue with an actual test event before using the receiver for customer conversations.
Test incoming text and an outgoing result
- Use the first-message guide with the permitted test contact and correct business number. Send a distinctive incoming text with no customer information.
- Record when the callback reached the receiver. Check the root event kind, source, message reference and text, then confirm the item appears once in the intended conversation.
- Reply through the supported sending workflow in the open service window. Record the synchronous result and returned message reference for that outgoing attempt.
- Check any later
message-eventresult against the same attempt, using the correlation rule confirmed for the connection. Compare it with the message actually seen on the test phone. - Record missing, unmatched or repeated events as observed. Do not infer every status, a fixed arrival order or equality between all message references from the sample guide.
Use evidence to decide the next step
| Observed result | Next check |
|---|---|
| Local fixture passes, but no actual callback arrives | Check the registered URL/connection, public route and registration response. Give support the test time and receiver details. |
| Proxy sees a request, but the application sees no item | Check the proxy-to-handler route, agreed sender verification, JSON validation and processing result. |
| Incoming text appears in the wrong conversation | Check the verified connection mapping and source value together; preserve the callback reference for diagnosis. |
| Outgoing result cannot be matched | Compare the recorded request and callback references, recipient, connection and times. Confirm the real correlation rule. |
| Same event creates repeated actions | Review the verified duplicate rule and your business processing independently of message sending. |
Before a release, retain the receiver settings, test cases and observed results, and confirm the restoration procedure with the person responsible for the connection. If the test changed an active callback, restore the agreed receiver and verify its route and event processing.
For the direct Meta developer interface, see Meta's test endpoint example. Its application setup and verification procedure belong to that interface. The ChatArchitect test above follows ChatArchitect's documented events and agreed callback contract.
No comments to display
No comments to display