webhooks

Send a test webhook to verify the endpoint is working.

Sends a synthetic agent.message payload (flagged "test": true) through the real delivery path to the configured URL. The optional JSON body overrides from, to, message and channel so a handler can be exercised with the numbers it actually routes on. Pass ?agentId=... to control which agent appears in the payload; otherwise the first agent in the account is used.

post/v1/webhooks/test

Request

  • Base URL
    https://api.agentphone.ai
  • URL
    https://api.agentphone.ai/v1/webhooks/test
  • Auth
    HTTP bearer

Query parameters

agentIdstring nullable

Agent ID to include in the test payload

Request body

fromstring nullable

Sender number, E.164

tostring nullable

Recipient number, E.164

messagestring nullable

Message text

channel'sms' | 'imessage' | 'mms' | 'whatsapp' | 'rcs' nullable

Channel to report in the payload (default sms)

Response

Successful Response

unknown required

Changes