This guide covers how to test your AgentPhone integration during development, including local webhook testing and mock payloads.
To receive webhooks during development, you need to expose your local server to the internet. We recommend ngrok.
Use the provided URL as your webhook URL.
Free ngrok accounts have session limits. The tunnel will disconnect and you’ll need to restart ngrok and update your webhook URL. For persistent tunnels, consider a paid ngrok plan or deploying to a cloud service.
Use the test endpoint to verify your webhook handler is working correctly. This sends a sample agent.message payload to your configured URL:
You can also test per-agent webhooks:
Use these sample payloads to test your webhook handler locally with curl or in your test suite.
Send a mock payload to your local server:
Monitor delivery status to debug issues:
The response shows delivery attempts, HTTP status codes, error messages, and retry timestamps. Use this to verify your endpoint is receiving and acknowledging webhooks correctly.