Send an SMS
Use the API to send an SMS message to a recipient's mobile device.
Request
using RestSharp;
var client = new RestClient("https://api-us1.stannp.com/v1/sms/create?api_key={API_KEY}");
var request = new RestRequest(Method.POST);
request.AddParameter("phone_number", "12345678901");
request.AddParameter("message", "Hello World");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Response
{ "success": true, "data": { "id": 0, "recipient_id": 0, "phone_number": "01234567890", "from": "STANNP", "profile_id": 3, "usage_campaign_id": 0, "profile_type": "sender_id", "message": "Hello World", "message_parts": 1, "cost": 0.002, "destination_country": "US", "status": "test", "campaign_id": 0, "created": "2024-07-25T16:16:28+00:00", "updated": "" } }