Short URL

Fügen Sie verkürzte-Links in Ihre Nachrichten ein.

POST

/send

POST

/send/lists

Body-Parameter

text
notwendig
Ihre Nachricht
value
notwendig
Empfänger-Handynummern oder die ID der Liste
links
notwendig
Zu kürzenden URLs
pushtype
notwendig
Die Art des Versands (alert oder marketing)
delay Versanddatum Y-m-d H:i:s. Muss in der Zeitzone liegen Europe/Paris
sender Ermöglicht das Personalisieren des Absenders
gsmsmsid Eine selbst gewählte ID, um die Nachricht mit ihrer Empfangsbestätigung zu verknüpfen (nur für /senden)

Beispiele


POST /send HTTP/1.1
Host: api.smsfactor.com
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": "2024-12-21 10:22:42",
      "links": [
        "https://youtu.be/dQw4w9WgXcQ",
        "https://youtu.be/X61BVv6pLtw"
      ]
    },
    "recipients": {
      "gsm": [
        {
          "gsmsmsid": "100",
          "value": "33612345678"
        },
        {
          "gsmsmsid": "101",
          "value": "33612345677"
        }
      ]
    }
  }
}
          
        

POST /send HTTP/1.1
Host: api.smsfactor.com
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>2024-12-21 10:22:42</delay>
    <links>https://youtu.be/dQw4w9WgXcQ</links>
    <links>https://youtu.be/X61BVv6pLtw</links>
  </message>
  <recipients>
    <gsm gsmsmsid="100">33612345678</gsm>
    <gsm gsmsmsid="101">33612345677</gsm>
  </recipients>
</sms>
        
      

Ergebnisformat


{
  "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>