Send an SMS
Use the API to send an SMS message to a recipient's mobile device.
Request
import requests
data = {
"phone_number": "12345678901",\n "message": "Hello World",\n
}
response = requests.post("https://api-eu1.stannp.com/v1/sms/create?api_key={API_KEY}", data=data)
print(response.text)
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.058, "destination_country": "GB", "status": "test", "campaign_id": 0, "created": "2024-07-25T16:16:28+00:00", "updated": "" } }