Set Delivery Service

Configure the delivery service type used as the destination for messages received at a FoneNumber.

Configure the delivery service type used as the destination for received messages. See the Notes for more information. Returns a FoneNumber object.

{
  "fonenumber": {
    "fonenumber": "3215551212",
    "sms_options": {
      "receive": {
        "type": "email",
        "email": "[email protected]",
        "device": "21915233078",
        "forward": "",
        "url": null,
        "url_method": null
      },
      ....
  }
  ....
}

Notes

type

Incoming messages can be routed to one of several destination options: a configured and registered Device (e.g. SIP handset, Fractelfone mobile app, or WebRTC endpoint), a valid Email address, a callback URL, or Forward to another telephone number. There is also the option to set the destination to None, in which case messages are deleted upon receipt without any delivery. Use the type parameter to specify the type of destination.

value

The value parameter contains the corresponding setting for the destination.

TypeValueExample
DeviceThe ID for the destination device987123543678
EmailAn email address[email protected]
URLA callback URLhttps://api.yourserver.com/handler.php?msg={{msg}}
ForwardA forwarding phone number3215551111
NoneNone

Callback Data

If type is URL, then messages are delivered through a callback URL. For more information, see Callbacks / Web Hooks.

ParameterTypeDescription
tostringFoneNumber of recipient.
fromstringPhone number of sender.
msgstringContents of the message.
uidstringUnique identifier for the message.

Delivery URLs use the POST method exclusively; GET and JSON methods are not available.

Language
Authorization
Header
Click Try It! to start a request and see the response here!