Handling Incoming SMS/MMS

    Plivo will forward incoming messages to the message_url configured for the application associated with the phone number on which the message was received.



    This is the unique identifier for the message.


    This is the source number of the incoming message. This will be the phone number from which the message originated.


    This is the Plivo number on which the message was received.

    Text<SMS Only>

    This is the content of the message. Note that Plivo automatically concatenates multi-part long messages before forwarding them to your message_url.

    Body<MMS Only>

    This is the text content(if any) in the Multimedia Message(MMS). Together, Body and Media should not exceed 5MB limit.


    This can be set to either sms or mms. Defaults to sms.


    This is the number of parts in which the incoming message was received. This would > 1 for multi-part long messages.


    This is the charge applicable per incoming SMS unit.


    Total charge for receiving the SMS (TotalRate * No. of Units)


    Set to optout if the incoming message matches with one of the standard Opt-Out keywords. Set to optin if the incoming message matches with one of the standard Opt-In keywords. Set to help if the incoming message matches with one of the standard Help keywords. Is left blank in all other cases.


    The UUID of the Powerpack associated with the To phone number. If the phone number does not belong to a Powerpack, this field will be empty.

    MediaCount<MMS Only>

    The number of media files attached with this MMS.

    Media<count> ex: Media1, Media2 ...<MMS Only>

    The URL to a specific media file associated with the MMS. The integer suffixes range from 1 to the count of media files received.

    Replying To An Incoming Message

    It is possible to reply to an incoming message by returning a Plivo Message XML element in the response to the incoming request.

    Make sure to set the response Content-Type to application/xml in this case.