Liens courts

Insérer des liens courts dans vos messages.

POST

/send

POST

/send/lists

Paramètres du body

text
requis
Votre message
value
requis
Les numéros des destinataires ou l'id de la liste
links
requis
Les URLs à raccourcir
pushtype
requis
Le type d'envoi (alert ou marketing)
delay La date d'envoi Y-m-d H:i:s. Doit être dans la timezone Europe/Paris
sender Vous permet de personnaliser l'expéditeur
gsmsmsid Un id de votre choix pour lier le message à son accusé de réception (uniquement pour /send)

Exemples


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

{
  "sms": {
    "message": {
      "text": "Message via API with a first link : <-short-> and a second one : <-short->",
      "pushtype": "alert",
      "sender": "GLaDOS",
      "delay": "2025-01-09 10:12:18",
      "links": [
        "https://youtu.be/dQw4w9WgXcQ",
        "https://youtu.be/X61BVv6pLtw"
      ]
    },
    "recipients": {
      "gsm": [
        {
          "gsmsmsid": "100",
          "value": "41781234567"
        },
        {
          "gsmsmsid": "101",
          "value": "41781234566"
        }
      ]
    }
  }
}
          
        

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

<?xml version="1.0" encoding="UTF-8"?>
<sms>
  <message>
    <text>
      <![CDATA[Message via API with a first link : <-short-> and a second one : <-short->]]>
    </text>
    <pushtype>alert</pushtype>
    <sender>GLaDOS</sender>
    <delay>2025-01-09 10:12:18</delay>
    <links>https://youtu.be/dQw4w9WgXcQ</links>
    <links>https://youtu.be/X61BVv6pLtw</links>
  </message>
  <recipients>
    <gsm gsmsmsid="100">41781234567</gsm>
    <gsm gsmsmsid="101">41781234566</gsm>
  </recipients>
</sms>
        
      

Format de la réponse


{
  "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
  "npai": 0               //Number of npai numbers
  "invalid": 0,           //Number of invalid numbers
  "not_allowed": 0,       //Number of SMS sent to a not allowed country
  "flood": 0,             //Number of SMS filtered by anti-flood
  "country_limit": 0,     //Monthly limit for this country reached
}
          
        

<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>
  <npai>0</npai>
  <invalid>0</invalid>
  <not_allowed>0</not_allowed>
  <flood>0</flood>
  <country_limit>0</country_limit>
</response>