Attribute | Type | Omschrijving |
from | string | Verzender van het bericht |
to | array,string | Array of String (gescheiden voor komma) van ontvangers (gsm nummers) |
content | string | Het SMS bericht (max 500 tekens) |
$sms = new SMSApi_Sms("API_KEY", "API_SECRET");
$data = $sms->send([
"from" => "SMS_SENDER",
"to" => ["NUMBER"],
"content" => "Have a nice day",
]);
curl 'http://smsapi.be/nl/api/sms' \
-d api_key=API_KEY \
-d api_secret=API_SECRET \
-d to=YOUR_NUMBER \
--data-urlencode "content=Have a nice day." \
-d from=SMSAPI_NUMBER
Attribute | Type | Omschrijving |
from | string | Verzender van het bericht |
group_id | array,string | Array of String (gescheiden voor komma) van group id's |
content | string | Het SMS bericht (max 500 tekens) |
$sms = new SMSApi_Sms("API_KEY", "API_SECRET");
$data = $sms->group([
"group_id" => [1,2,3],
"from" => "SMS_SENDER",
"content" => "Have a nice day",
]);
curl 'http://smsapi.be/sms/json' \
-d api_key=API_KEY \
-d api_secret=API_SECRET \
-d to=YOUR_NUMBER \
--data-urlencode "text=Have a nice day." \
-d from=SMSAPI_NUMBER
Attribute | Type | Omschrijving |
limit | int | Max aantal berichten (standaard 20) |
offset | int | Berichten offset |
$sms = new SMSApi_Sms("API_KEY", "API_SECRET");
$data = $sms->messages(["limit" => 5 , "offset" => 5]);
curl 'http://smsapi.be/nl/api/sms/message' \
-d api_key=API_KEY \
-d api_secret=API_SECRET \
-d limit=5 \
-d offset=5
{
success: 1,
data: [
{
messageID: 1,
from: "SMS Sender",
content: "Have a nice day",
total_count: 1,
send_count: 1,
time_created: "2017-04-26 11:16:51",
scheduled_time: "2017-05-26 08:20:00"
},
{
messageID: 2,
from: "SMS Sender",
content: "Test message 2",
total_count: 2,
send_count: 2,
time_created: "2017-04-26 11:18:55"
}
],
offset: 5,
limit: 5,
total_count: 374
}
Attribute | Type | Omschrijving |
messageID | int | Uniek ID van het bericht |
$sms = new SMSApi_Sms("API_KEY", "API_SECRET");
$data = $sms->message( "messageID" );
curl 'http://smsapi.be/nl/api/sms/message/:id' \
-d api_key=API_KEY \
-d api_secret=API_SECRET
{
success: 1,
data: {
messageID: 43,
from: "SMS Sender",
content: "Have a nice day",
total_count: 3,
send_count: 0,
time_created: "2017-09-08 11:44:48",
sms_items: [
{
smsID: "5618",
contactID: "9128",
from: "SMS Sender",
to: "32486******",
send_status: "1",
time_in: "2017-07-17 15:23:49",
time_send: "2017-07-17 15:23:49",
content: "Have a nice day",
msg_length: "21",
msg_count: 1,
price: "0.08"
}
]
}
}
Attribute | Type | Omschrijving |
smsID | int | Uniek ID van de sms |
$sms = new SMSApi_Sms("API_KEY", "API_SECRET");
$data = $sms->get( "smsID" );
curl 'http://smsapi.be/nl/api/sms/:id' \
-d api_key=API_KEY \
-d api_secret=API_SECRET
{
success: 1,
data: {
smsID: "5618",
contactID: "9128",
from: "SMS Sender",
to: "32486******",
send_status: "1",
time_in: "2017-07-17 15:23:49",
time_send: "2017-07-17 15:23:49",
content: "Have a nice day",
msg_length: "21",
msg_count: 1,
price: "0.08"
}
}
Attribute | Type | Omschrijving |
name | string | Contact naam |
number | int | Gsm nummer |
$contact = new SMSApi_Contact("API_KEY", "API_SECRET");
$data = $contact->create([
"name" => "Contact Name",
"number" => "NUMBER",
]);
curl 'http://smsapi.be/sms/json' \
-d api_key=API_KEY \
-d api_secret=API_SECRET \
-d to=YOUR_NUMBER \
--data-urlencode "text=Have a nice day." \
-d from=SMSAPI_NUMBER
Attribute | Type | Omschrijving |
name | string | Contact naam |
number | int | Gsm nummer |
$contact = new SMSApi_Contact("API_KEY", "API_SECRET");
$data = $contact->update("contactID",[
"name" => "Contact Name",
"number" => "NUMBER",
]);
curl 'http://smsapi.be/sms/json' \
-d api_key=API_KEY \
-d api_secret=API_SECRET \
-d to=YOUR_NUMBER \
--data-urlencode "text=Have a nice day." \
-d from=SMSAPI_NUMBER
Attribute | Type | Omschrijving |
limit | int | Max aantal contacten (standaard 20) |
offset | int | Contacten offset |
$contact = new SMSApi_Contact("API_KEY", "API_SECRET");
$data = $contact->get(["limit" => 5 , "offset" => 5]);
curl 'http://smsapi.be//contact/json' \
-d api_key=API_KEY \
-d api_secret=API_SECRET \
-d to=YOUR_NUMBER \
--data-urlencode "text=Have a nice day." \
-d from=SMSAPI_NUMBER
{
success: 1,
data: [
{
contactID: 1,
name: null,
number: "+32488888888",
var1: null,
var2: null,
var3: null,
var4: null,
var5: null,
var6: null,
groups: [
{
groupID: "1",
name: "SMS Api Group"
},
{
groupID: "2",
name: "SMS Api Group 2"
}
]
},
{
contactID: 2,
name: null,
number: "+32499999999",
var1: null,
var2: null,
var3: null,
var4: null,
var5: null,
var6: null,
groups: [
{
groupID: "1",
name: "SMS Api Group"
}
]
},
],
offset: 0,
limit: 20,
total_count: 5
}
Attribute | Type | Omschrijving |
contactID | int | Uniek ID van contact |
$contact = new SMSApi_Contact("API_KEY", "API_SECRET");
$data = $contact->get( "contactID" );
curl 'http://smsapi.be//contact/json' \
-d api_key=API_KEY \
-d api_secret=API_SECRET \
-d to=YOUR_NUMBER \
--data-urlencode "text=Have a nice day." \
-d from=SMSAPI_NUMBER
{
success: 1,
data: {
contactID: 1,
name: null,
number: "32488888888",
var1: null,
var2: null,
var3: null,
var4: null,
var5: null,
var6: null,
groups: [
{
groupID: "1",
name: "SMS Api Group"
},
{
groupID: "2",
name: "SMS Api Group 2"
}
]
},
}
$contact = new SMSApi_Contact("API_KEY", "API_SECRET");
$data = $contact->delete("contactID");
curl 'http://smsapi.be/sms/json' \
-d api_key=API_KEY \
-d api_secret=API_SECRET \
-d to=YOUR_NUMBER \
--data-urlencode "text=Have a nice day." \
-d from=SMSAPI_NUMBER
Attribute | Type | Omschrijving |
name | string | Groep naam |
$group = new SMSApi_Group("API_KEY", "API_SECRET");
$data = $group->create([
"name" => "Group Name",
]);
curl 'http://smsapi.be/sms/json' \
-d api_key=API_KEY \
-d api_secret=API_SECRET \
-d to=YOUR_NUMBER \
--data-urlencode "text=Have a nice day." \
-d from=SMSAPI_NUMBER
Attribute | Type | Omschrijving |
name | string | Contact naam |
$group = new SMSApi_Group("API_KEY", "API_SECRET");
$data = $group->update("groupID",[
"name" => "Group Name",
]);
curl 'http://smsapi.be/sms/json' \
-d api_key=API_KEY \
-d api_secret=API_SECRET \
-d to=YOUR_NUMBER \
--data-urlencode "text=Have a nice day." \
-d from=SMSAPI_NUMBER
Attribute | Type | Omschrijving |
limit | int | Max aantal groepen (standaard 20) |
offset | int | Groepen offset |
$group = new SMSApi_Group("API_KEY", "API_SECRET");
$data = $group->get(["limit" => 5 , "offset" => 5]);
curl 'http://smsapi.be//contact/json' \
-d api_key=API_KEY \
-d api_secret=API_SECRET \
-d to=YOUR_NUMBER \
--data-urlencode "text=Have a nice day." \
-d from=SMSAPI_NUMBER
{
success: 1,
data: [
{
groupID: 1,
name: "Groep 1",
contact_count: 3
},
{
groupID: 2,
name: "Groep 2",
contact_count: 1
},
{
groupID: 3,
name: "Groep 3"
}
],
offset: 0,
limit: 20,
total_count: 3
}
Attribute | Type | Omschrijving |
groupID | int | Uniek ID van de groep |
$group = new SMSApi_Group("API_KEY", "API_SECRET");
$data = $group->get( "groupID" );
curl 'http://smsapi.be//contact/json' \
-d api_key=API_KEY \
-d api_secret=API_SECRET \
-d to=YOUR_NUMBER \
--data-urlencode "text=Have a nice day." \
-d from=SMSAPI_NUMBER
{
success: 1,
data: {
groupID: 1,
name: "Groep 1",
contact_count: 3
}
}
$group = new SMSApi_Group("API_KEY", "API_SECRET");
$data = $group->delete("groupID");
curl 'http://smsapi.be/sms/json' \
-d api_key=API_KEY \
-d api_secret=API_SECRET \
-d to=YOUR_NUMBER \
--data-urlencode "text=Have a nice day." \
-d from=SMSAPI_NUMBER
Attribute | Type | Omschrijving |
groupID | int | Uniek id van de groep |
number | array,string | Array of String (gescheiden voor komma) van contacten (gsm nummers) |
contact_id | array,string | Array of String (gescheiden voor komma) van contacten (contactID) |
Nummer(s) of contactID(s) verplicht.
$group = new SMSApi_Group("API_KEY", "API_SECRET");
$data = $group->addContact("groupID",[
"number" => ["NUMBER"],
]);
curl 'http://smsapi.be/sms/json' \
-d api_key=API_KEY \
-d api_secret=API_SECRET \
-d to=YOUR_NUMBER \
--data-urlencode "text=Have a nice day." \
-d from=SMSAPI_NUMBER
Attribute | Type | Omschrijving |
limit | int | Max aantal contacten (standaard 20) |
offset | int | Contacten offset |
$group = new SMSApi_Group("API_KEY", "API_SECRET");
$data = $group->getContacts("groupID" , ["limit" => 5 , "offset" => 0]);
curl 'http://smsapi.be/sms/json' \
-d api_key=API_KEY \
-d api_secret=API_SECRET \
-d to=YOUR_NUMBER \
--data-urlencode "text=Have a nice day." \
-d from=SMSAPI_NUMBER
{
success: 1,
data: [
{
contactID: 1,
name: null,
number: "+32488888888",
var1: null,
var2: null,
var3: null,
var4: null,
var5: null,
var6: null
},
{
contactID: 2,
name: null,
number: "+32499999999",
var1: null,
var2: null,
var3: null,
var4: null,
var5: null,
var6: null
},
],
offset: 0,
limit: 5,
total_count: 5
}
$group = new SMSApi_Group("API_KEY", "API_SECRET");
$data = $group->deleteContact("groupID","contactID");
curl 'http://smsapi.be/sms/json' \
-d api_key=API_KEY \
-d api_secret=API_SECRET \
-d to=YOUR_NUMBER \
--data-urlencode "text=Have a nice day." \
-d from=SMSAPI_NUMBER
$saldo = new SMSApi_Saldo("API_KEY", "API_SECRET");
$data = $saldo->get();
curl 'http://smsapi.be//contact/json' \
-d api_key=API_KEY \
-d api_secret=API_SECRET \
-d to=YOUR_NUMBER \
--data-urlencode "text=Have a nice day." \
-d from=SMSAPI_NUMBER
{
success: 1,
data: {
saldo_excl: 100,
saldo_incl: 121
}
}