Send and Receive SMS and MMS
Send SMS or MMS from RooR number
Endpoint: https://mapi.gynetix.com/prizm/api/sm/sms/sendsms.json
| Field | Required | Description |
|---|---|---|
| From | Yes | A valid number (E.164 format) that will be initiating the phone call. |
| To | Yes | A valid number (E.164 format) that will receive the phone call. |
| Body | Yes/Optional |
The body message that is to be sent in the text. If a MediaURL is supplied, the body is optional otherwise it is required. Maximum GSM-7 message length is 160 characters per message. Maximum Unicode message length is 70 characters per message. Note: Adttional messages will be created automatically to send text beyond the maximum message length. |
| MediaURL | Yes/Optional |
A URL defining the location of a Media Type to send for MMS messages. Currently the only Mime Types supported are jpeg, gif and png. Note: Maximum file size is 1MB. |
| MessageStatusCallback | Optional | URL that can be requested to receive notification when SMS has Sent. A set of default parameters will be sent here once the SMS is finished. |
| MessageStatusCallbackMethod | Optional |
Specifies the HTTP method used to request the required MessageStatusCallback once the SMS is finished. Valid values: POST, GET Default value: POST |
| Method | Optional |
Specifies the HTTP method used to request the required URL once SMS sent. Valid values: POST, GET Default value: POST |
curl -X POST 'https://mapi.gynetix.com/prizm/api/sm/sms/sendsms.json' -u '{AccountSid}:{AuthToken}' --data-urlencode 'From=+1{RooRNumber}' --data-urlencode 'To=+1npanxxnxxx' --data-urlencode 'Body=Test' --data-urlencode 'MessageStatusCallback=http[s]://...'
{
"RooR": {
"ResponseStatus": 1,
"Message": {
"ApiVersion": "sm",
"MessageSid": "SMa9992d68-fc54-497d-9699-0caa364b1ec2",
"From": "+1{RooRNumber}",
"To": "+1npanxxnxxx",
"Body": "Test",
"Segments": 1,
"MessagePrice": 0.004,
"DateSent": "2020-02-11 22:30:25",
"Status": "success",
"BodyInspection": {
"emojis": 0,
"extended": 0,
"gsm": 4,
"segments": 1,
"chars": 4,
"segment_size": 160
},
"MessageStatusCallback": "http[s]://...",
"Carrier": "CELLCO PARTNERSHIP DBA VERIZON",
"Wireless": true,
"City": "Santa Ana",
"State": "CA",
"Zip": "92704"
}
}
}{
"sid":"SMf0df9f9a-3a4c-4b67-bd29-5e824e2b5318",
"status":"delivered",
"to":"+1npanxxnxxx",
"from":"+1npanxxnxxx",
"body":"+1npanxxnxxx",
"account":"{AccountSid}"
}In order to receive SMS on your number you must configure the SmsUrl using the updatenumber end point.
{
"From" : "1npanxxnxxx"
"Price" : 0.0035
"Text" : "Hello RooR"
"To" : "1npanxxnxxx"
"MessageSid" : "IMXXXX443e-3XX0-4X34-8XXe-f3b36dXXXXXX"
"NumSegments" : 1
"qts" : ""
}In order to receive MMS on your number you must configure the SmsUrl using the updatenumber end point.
{
"From" : "1npanxxnxxx"
"Price" : 0.0035
"Body" : "Hello RooR",
"MediaUrls" : [
"https://......",
"https://......"
]
"To" : "1npanxxnxxx"
"MessageSid" : "IMXXXX443e-3XX0-4X34-8XXe-f3b36dXXXXXX"
"NumSegments" : 3
"qts" : ""
}