Simulate a single message

This method allows you to simulate a single message to one destination. Simulate a campaign to find out the cost and the number of SMS messages sent and filtered. This endpoint does not actually create a campaign.

GET

/send/simulate

Query Parameters

token
required if not in headers
Your token
text
required
Your message
to
required
Your destination
delay Sending date Y-m-d H:i:s. Must be in timezone Europe/Paris
sender Allows you to customize the sender
gsmsmsid An id of your choice to link it to its delivery report

Examples With token in headers then in the URL


GET /send/simulate?text=Hello world&to=33612345678 HTTP/1.1
Host: api.smsfactor.com
Accept: application/json
Authorization: Bearer your.token
      
    

GET /send/simulate?text=Hello world&to=33612345678&token=your.token&delay=2024-12-31 10:36:45 HTTP/1.1
Host: api.smsfactor.com
Accept: application/json
      
    

Result Format


{
  "status": 1,
  "message": "OK",
  "cost": 1,              //The cost of your campaign
  "credits": 642,         //Your credits after your campaign has been created
  "total": 1,             //Number of message before filtering
  "sent": 1,              //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>
  <cost>1</cost>
  <credits>642</credits>
  <total>1</total>
  <sent>1</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>