Campaign

This method allows you to send a campaign to one or multiple destinations.

POST

/send

Body Parameters

text
required
Your message
value
required
The recipients' numbers
pushtype The push type (alert or marketing)
delay Sending date Y-m-d H:i:s
sender Allows you to customize the sender
gsmsmsid An id of your choice to link it to its delivery report
unicode (default 0) Activate the unicode mode, reducing the SMS length to 70 characters

Examples


POST /send HTTP/1.1
Host: api.smsup.ch
Authorization: Bearer your.token
Accept: application/json

{
  "sms": {
    "message": {
      "text": "Message via API",
      "pushtype": "alert",
      "sender": "Illidan",
      "delay": "2024-04-07 10:36:33",
      "unicode": 0
    },
    "recipients": {
      "gsm": [
        {
          "gsmsmsid": "100",
          "value": "41781234567"
        },
        {
          "gsmsmsid": "101",
          "value": "41781234566"
        }
      ]
    }
  }
}
          
        

<?xml version="1.0" encoding="UTF-8"?>
<sms>
  <message>
    <text>Message via API</text>
    <pushtype>alert</pushtype>
    <sender>Illidan</sender>
    <delay>2024-04-07 10:36:33</delay>
    <unicode>0</unicode>
  </message>
  <recipients>
    <gsm gsmsmsid="100">41781234567</gsm>
    <gsm gsmsmsid="101">41781234566</gsm>
  </recipients>
</sms>
        
      

Result Format


{
  "status": 1,      
  "message": "OK",
  "ticket": "14672468",   //The id of your campaign
  "cost": 2,              //The cost of your campaign
  "credits": 642,         //Your credits after your campaign has been created
  "total": 2,             //Number of message before filtering  
  "sent": 2,              //Number of message after filtering
  "blacklisted": 0,       //Number of blacklisted numbers
  "duplicated": 0,        //Number of duplicated numbers
  "invalid": 0,           //Number of invalid numbers
  "npai": 0               //Number of npai numbers
}
          
        

<response>
  <status>1</status>
  <message>OK</message>
  <ticket>14672468</ticket>
  <cost>2</cost>
  <credits>642</credits>
  <total>2</total>
  <sent>2</sent>
  <blacklisted>0</blacklisted>
  <duplicated>0</duplicated>
  <invalid>0</invalid>
  <npai>0</npai>
</response>