API KIRIM SMS REGULER

Untuk mengirim SMS ke satu penerima.

Perintah:

POST
https://gsm.zenziva.net/api/sendsms/
PARAMETER DESKRIPSI
userkey Userkey anda
passkey Passkey anda
nohp Nomor tujuan
pesan Isi pesan

Contoh respon dalam format JSON.

{
	"messageId":"157365",
	"to":"081111111111",
	"status":"1",
	"text":"Success"
}

Contoh script php:

$userkey = "xxxxxx"; //userkey lihat di zenziva
$passkey = "xxxxxx"; // set passkey di zenziva
$telepon = "081234567890";
$message = "Terima Kasih, pendaftaran atas nama $nama telah berhasil di websiteAnda.com. Silahkan baca dan download petunjuk selanjutnya. Harap Maklum";
$url = "https://gsm.zenziva.net/api/sendsms/";
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curlHandle, CURLOPT_TIMEOUT,30);
curl_setopt($curlHandle, CURLOPT_POST, 1);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, array(
    'userkey' => $userkey,
    'passkey' => $passkey,
    'nohp' => $telepon,
    'pesan' => $message
));
$results = json_decode(curl_exec($curlHandle), true);
curl_close($curlHandle);

API KIRIM SMS MASKING

Untuk mengirim SMS ke satu penerima.

Perintah:

POST
https://masking.zenziva.net/api/sendsms/
PARAMETER DESKRIPSI
userkey Userkey anda
passkey Passkey anda
nohp Nomor tujuan
pesan Isi pesan (Maksimum 580 karakter)

Contoh respon dalam format JSON.

{
	"messageId":"157365",
	"to":"081111111111",
	"status":"1",
	"text":"Success"
}

Contoh script php:

$userkey = "xxxxxx"; //userkey lihat di zenziva
$passkey = "xxxxxx"; // set passkey di zenziva
$telepon = "081234567890";
$message = "Terima Kasih, pendaftaran atas nama $nama telah berhasil di websiteAnda.com. Silahkan baca dan download petunjuk selanjutnya. Harap Maklum";
$url = "https://masking.zenziva.net/api/sendsms/";
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curlHandle, CURLOPT_TIMEOUT,30);
curl_setopt($curlHandle, CURLOPT_POST, 1);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, array(
    'userkey' => $userkey,
    'passkey' => $passkey,
    'nohp' => $telepon,
    'pesan' => $message
));
$results = json_decode(curl_exec($curlHandle), true);
curl_close($curlHandle);

API KIRIM SMS CENTER V2.0

API KIRIM SMS V2.0 hanya untuk pelanggan SMS Center yang terdaftar mulai dari Januari 2018.

Perintah:

POST
http://SUBDOMAIN/api/sendsms/
PARAMETER DESKRIPSI
userkey Userkey anda
passkey Passkey anda
nohp Nomor tujuan
pesan Isi pesan

Respon dari perintah di atas dalam format JSON.

Contoh respon:

{
	"messageId":"157365",
	"to":"081111111111",
	"status":"1",
	"text":"Success"
}

Contoh script php:

$userkey = 'XXXXX';
$passkey = 'XXXXX';
$telepon = '081111111111';
$message = 'Terima Kasih, pendaftaran atas nama $nama telah berhasil di websiteAnda.com';
$url = 'http://SUBDOMAIN_ANDA/api/sendsms/';
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curlHandle, CURLOPT_TIMEOUT,30);
curl_setopt($curlHandle, CURLOPT_POST, 1);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, array(
    'userkey' => $userkey,
    'passkey' => $passkey,
    'nohp' => $telepon,
    'pesan' => $message
));
$results = json_decode(curl_exec($curlHandle), true);
curl_close($curlHandle);
echo $results ;

API KIRIM TEXT To VOICE

Perintah:

POST
https://console.zenziva.net/voice/api/sendvoice/
PARAMETER DESKRIPSI
userkey Userkey anda
passkey Passkey anda
to Nomor tujuan
message Isi pesan

Respon dari perintah di atas dalam format JSON.

Contoh respon:

{
   "messageId":"2349",
   "to":"+628123456789",
   "status":"1",
   "text":"Success"
}

Contoh script php:

$userkey = "xxxxxx";
$passkey = "xxxxxx";
$telepon = '081111111111';
$message = 'Hi John Doe, have a nice day.';
$url = 'https://console.zenziva.net/voice/api/sendvoice/';
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curlHandle, CURLOPT_TIMEOUT,30);
curl_setopt($curlHandle, CURLOPT_POST, 1);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, array(
    'userkey' => $userkey,
    'passkey' => $passkey,
    'to' => $telepon,
    'message' => $message
));
$results = json_decode(curl_exec($curlHandle), true);
curl_close($curlHandle);