SMS operations
You can perform the following SMS-related operations using the endpoint API:
- List sent and received SMS
- Send SMS to a device
- Get details about a device SMS
- Cancel a buffered SMS
Example
To send SMS directly from your application to a device, make the following API call:
POST https://cdn.emnify.net/api/v1/endpoint/{endpoint_id}/sms
The required headers are Content-Type and Authorization with the respective values application/json and Bearer TOKEN.
Replace TOKEN with your auth_token and make sure there’s a non-breaking space between Bearer and the token value.
Request body for Mobile terminated (MT) SMS:
Successful response:
The source address is the sender number that appears on the receiving device. The payload is the actual text sent as an SMS.
To receive SMS on your application from the device, you need to first set up a callback URL in the service profile assigned to the device. For more information, see Receive MO SMS via API Callback.