Single message
This method allows you to send a single message to one destination.
GET
/send
Query Parameters
token
required if not in headers
|
Your token |
text
required
|
Your message |
to
required
|
Your destination |
pushtype | The push type (alert or marketing ) |
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 |
About pushtype and sender
If you haven't already read the basic informations about the SMS and how pushtype and sender work, you might be interested in doing so.
Good to go example
Replace your.token with your own and you're good to go. If you haven't already created any token, you can do it here.
https://api.smsfactor.com/send?text=Hello world&to=33612345678&token=your.token
Detailed examples With token in headers then in the URL
GET /send?text=Hello world&to=33612345678
Host: api.smsfactor.com
Accept: application/json
Authorization: Bearer your.token
GET /send?text=Hello world&to=33612345678&token=your.token&delay=2024-10-21 10:01:02
Host: api.smsfactor.com
Accept: application/json
Result Format
A status -8 doesn't mean your SMS won't be sent. No need to retry unless you want to send the same SMS multiple times 😉
{
"status": 1,
"message": "OK",
"ticket": "14672468", //The id of your campaign
"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>
<ticket>14672468</ticket>
<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>
Quelle est la différence entre cost, total et sent ?
The cost
field is the number of credits your campaign cost. As a reminder, an SMS of more than 160 characters costs at least 2 credits. Know more
The total
field is the number of telephone numbers you provided to create your campaign.
The sent
field is the number of telephone numbers to which we have actually sent an SMS (after removing invalid numbers, blacklisting, etc.).