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
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
value
The value
parameter contains the corresponding setting for the destination.
Type | Value | Example |
---|---|---|
Device | The ID for the destination device | 987123543678 |
An email address | [email protected] | |
URL | A callback URL | https://api.yourserver.com/handler.php?msg={{msg}} |
Forward | A forwarding phone number | 3215551111 |
None | None |
Callback Data
If type
is URL, then messages are delivered through a callback URL. For more information, see Callbacks / Web Hooks.
Parameter | Type | Description |
---|---|---|
to | string | FoneNumber of recipient. |
from | string | Phone number of sender. |
msg | string | Contents of the message. |
uid | string | Unique identifier for the message. |
Delivery URLs use the POST
method exclusively; GET
and JSON
methods are not available.