When this webhook fires
This webhook fires every time an inbound SMS or MMS is received on a mycpaas number. It fires once per message, immediately on receipt.Payload fields
mycpaas sends the following fields asapplication/x-www-form-urlencoded in the POST body:
The phone number that sent the message, in E.164 format (e.g.,
+491234567890).Your mycpaas phone number that received the message, in E.164 format (e.g.,
+491098765432).The text content of the message.
A unique identifier for this message (e.g.,
SM123abc...). Use this to deduplicate retries.Raw POST payload example
Responding with LaML XML
To send a reply back to the sender, return a LaML XML response withContent-Type: text/xml and HTTP 200. Wrap your reply text in <Response><Message>:
<Response> or any HTTP 200 response with an empty body.
Handler example
The following Express handler parses the inbound payload and replies with a confirmation message:Your webhook endpoint must respond with HTTP 200 within a few seconds. If it times out or returns an error status, mycpaas may retry the delivery. Use the
MessageSid field to detect and ignore duplicate requests.
