API SMS Help -> HOME

createUser
credit
deleteReceivedMessage
deleteSendedMessage
getReceivedList
getReceivedMessage
getSendedList
getSendedMessage
listUsers
messageCost
modifyUser
sendMessage
version
viewUser

createUser

FIELDS:

__API_URL__ (mandatory, string)
__API_USER__ (mandatory, string)
__API_KEY__ (mandatory, string)
__API_CMD__ (mandatory, string)
__NEW_USER__ (mandatory, string)
__NEW_API_KEY__ (mandatory, string)
__IP__ (optional, string, ex: 192.168.0.1)
__CREDIT__ (recommended, integer, ex: 100)
__EMAIL__ (optional, string)
__STATUS__ (mandatory, integer, permitted values: 0 or 1)
__TIMEZONE__ (recommended, string list: https://php.net/manual/ro/timezones.php)
__MOBILE__ (optional, string)
__QUEUE_NAME__ (recommended, string)

PHP CODE EXAMPLE:

$url = __API_URL__;
$data['username']= __API_USER__;
$data['api_key']=__API_KEY__;
$data['cmd']=__API_CMD__;
$data['new_user']=__NEW_USER__;
$data['new_api_key']=__NEW_API_KEY__;
$data['ip']=__IP__;
$data['credit']=__CREDIT__;
$data['email']=__EMAIL__;
$data['status']=__STATUS__;
$data['timezone']=__TIMEZONE__;
$data['mobile']=__MOBILE__;
$data['queue_name']=__QUEUE_NAME__;


$options = array(
    'http' => array(
        'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
        'method'  => 'POST',
        'content' => http_build_query($data),
    ),
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

if ($result === FALSE) 
	{ 
	echo "SMS API error"; 
	}

//displaying result
print_r (json_decode($result,true));

credit

FIELDS:

__API_URL__ (mandatory, string)
__API_USER__ (mandatory, string)
__API_KEY__ (mandatory, string)
__API_CMD__ (mandatory, string)

PHP CODE EXAMPLE:

$url = __API_URL__;
$data['username']= __API_USER__;
$data['api_key']=__API_KEY__;
$data['cmd']=__API_CMD__;

$options = array(
    'http' => array(
        'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
        'method'  => 'POST',
        'content' => http_build_query($data),
    ),
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

if ($result === FALSE) 
	{ 
	echo "SMS API error"; 
	}

//displaying result
print_r (json_decode($result,true));

deleteReceivedMessage

FIELDS:

__API_URL__ (mandatory, string)
__API_USER__ (mandatory, string)
__API_KEY__ (mandatory, string)
__API_CMD__ (mandatory, string)
__ID_MESSAGE__ (mandatory, integer)

PHP CODE EXAMPLE:

$url = __API_URL__;
$data['username']= __API_USER__;
$data['api_key']=__API_KEY__;
$data['cmd']=__API_CMD__;
$data['id_message'] = __ID_MESSAGE__;

$options = array(
    'http' => array(
        'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
        'method'  => 'POST',
        'content' => http_build_query($data),
    ),
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

if ($result === FALSE) 
	{ 
	echo "SMS API error"; 
	}

//displaying result
print_r (json_decode($result,true));

deleteSendedMessage

FIELDS:

__API_URL__ (mandatory, string)
__API_USER__ (mandatory, string)
__API_KEY__ (mandatory, string)
__API_CMD__ (mandatory, string)
__ID_MESSAGE__ (mandatory, integer)

PHP CODE EXAMPLE:

$url = __API_URL__;
$data['username']= __API_USER__;
$data['api_key']=__API_KEY__;
$data['cmd']=__API_CMD__;
$data['id_message'] = __ID_MESSAGE__;

$options = array(
    'http' => array(
        'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
        'method'  => 'POST',
        'content' => http_build_query($data),
    ),
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

if ($result === FALSE) 
	{ 
	echo "SMS API error"; 
	}

//displaying result
print_r (json_decode($result,true));

getReceivedList

FIELDS:

__API_URL__ (mandatory, string)
__API_USER__ (mandatory, string)
__API_KEY__ (mandatory, string)
__API_CMD__ (mandatory, string)
__LIMIT__ (optional, integer, max 500)

PHP CODE EXAMPLE:

$url = __API_URL__;
$data['username']= __API_USER__;
$data['api_key']=__API_KEY__;
$data['cmd']=__API_CMD__;

$options = array(
    'http' => array(
        'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
        'method'  => 'POST',
        'content' => http_build_query($data),
    ),
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

if ($result === FALSE) 
	{ 
	echo "SMS API error"; 
	}

//displaying result
print_r (json_decode($result,true));

getReceivedMessage

FIELDS:

__API_URL__ (mandatory, string)
__API_USER__ (mandatory, string)
__API_KEY__ (mandatory, string)
__API_CMD__ (mandatory, string)
__ID_MESSAGE__ (mandatory, integer)

PHP CODE EXAMPLE:

$url = __API_URL__;
$data['username']= __API_USER__;
$data['api_key']=__API_KEY__;
$data['cmd']=__API_CMD__;
$data['id_message'] = __ID_MESSAGE__;

$options = array(
    'http' => array(
        'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
        'method'  => 'POST',
        'content' => http_build_query($data),
    ),
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

if ($result === FALSE) 
	{ 
	echo "SMS API error"; 
	}

//displaying result
print_r (json_decode($result,true));

getSendedList

FIELDS:

__API_URL__ (mandatory, string)
__API_USER__ (mandatory, string)
__API_KEY__ (mandatory, string)
__API_CMD__ (mandatory, string)
__STATUS__ (optional, integer, possible values: 0 = in queue waiting to be sent, 1 = message sending in progress, 2 = message sended with success, 3 = error sending message)
__ID_CAMPAING__ (optional, integer)
__LIMIT__ (optional, integer, max 500)

PHP CODE EXAMPLE:

$url = __API_URL__;
$data['username']= __API_USER__;
$data['api_key']=__API_KEY__;
$data['cmd']=__API_CMD__;

$options = array(
    'http' => array(
        'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
        'method'  => 'POST',
        'content' => http_build_query($data),
    ),
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

if ($result === FALSE) 
	{ 
	echo "SMS API error"; 
	}

//displaying result
print_r (json_decode($result,true));

getSendedMessage

FIELDS:

__API_URL__ (mandatory, string)
__API_USER__ (mandatory, string)
__API_KEY__ (mandatory, string)
__API_CMD__ (mandatory, string)
__ID_MESSAGE__ (mandatory, integer)

PHP CODE EXAMPLE:

$url = __API_URL__;
$data['username']= __API_USER__;
$data['api_key']=__API_KEY__;
$data['cmd']=__API_CMD__;
$data['id_message'] = __ID_MESSAGE__;

$options = array(
    'http' => array(
        'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
        'method'  => 'POST',
        'content' => http_build_query($data),
    ),
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

if ($result === FALSE) 
	{ 
	echo "SMS API error"; 
	}

//displaying result
print_r (json_decode($result,true));

listUsers

FIELDS:

__API_URL__ (mandatory, string)
__API_USER__ (mandatory, string)
__API_KEY__ (mandatory, string)
__API_CMD__ (mandatory, string)

PHP CODE EXAMPLE:

$url = __API_URL__;
$data['username']= __API_USER__;
$data['api_key']=__API_KEY__;
$data['cmd']=__API_CMD__;

$options = array(
    'http' => array(
        'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
        'method'  => 'POST',
        'content' => http_build_query($data),
    ),
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

if ($result === FALSE) 
	{ 
	echo "SMS API error"; 
	}

//displaying result
print_r (json_decode($result,true));

messageCost

FIELDS:

__API_URL__ (mandatory, string)
__API_USER__ (mandatory, string)
__API_KEY__ (mandatory, string)
__API_CMD__ (mandatory, string)
__MESSAGE__ (mandatory, string)

PHP CODE EXAMPLE:

$url = __API_URL__;
$data['username']= __API_USER__;
$data['api_key']=__API_KEY__;
$data['cmd']=__API_CMD__;
$data['message'] = __MESSAGE__;

$options = array(
    'http' => array(
        'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
        'method'  => 'POST',
        'content' => http_build_query($data),
    ),
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

if ($result === FALSE) 
	{ 
	echo "SMS API error"; 
	}

//displaying result
print_r (json_decode($result,true));

modifyUser

FIELDS:

__API_URL__ (mandatory, string)
__API_USER__ (mandatory, string)
__API_KEY__ (mandatory, string)
__API_CMD__ (mandatory, string)
__MODIFYUSER__ (mandatory, string, user that you want to modify)
__CREDIT__ (optional, integer)
__STATUS__ (optional, integer, permitted values: 0 or 1)
__STATUS__ and __CREDIT__ are optional but at least one must be used

PHP CODE EXAMPLE:

$url = __API_URL__;
$data['username']= __API_USER__;
$data['api_key']=__API_KEY__;
$data['cmd']=__API_CMD__;
$data['modifyuser'] = __MODIFYUSER__;
$data['credit'] = __CREDIT__;
$data['status'] = __STATUS__;

$options = array(
    'http' => array(
        'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
        'method'  => 'POST',
        'content' => http_build_query($data),
    ),
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

if ($result === FALSE) 
	{ 
	echo "SMS API error"; 
	}

//displaying result
print_r (json_decode($result,true));

sendMessage

FIELDS:

__API_URL__ (mandatory, string)
__API_USER__ (mandatory, string)
__API_KEY__ (mandatory, string)
__API_CMD__ (mandatory, string)
__MESSAGE__ (mandatory, string)
__PRIORITY__ (mandatory, integer from 1 to 10)
__ID_QUEUE__ (mandatory, see permited id_queues using viewUser)
__ID_CAMPAIGN__ (mandatory, integer)
__NUMBER__ (mandatory, string, with country prefix. ex: 40740000000)
__SEND_AFTER__ (mandatory, datetime, ex: 2018-12-12 18:00:23)

PHP CODE EXAMPLE:

$url = __API_URL__;
$data['username']= __API_USER__;
$data['api_key']=__API_KEY__;
$data['cmd']=__API_CMD__;
$data['message'] =__MESSAGE__;
$data['priority'] = __PRIORITY__;
$data['id_queue'] = __ID_QUEUE__;
$data['id_campaign'] = __ID_CAMPAIGN__;
$data['number'] = __NUMBER__;
$data['send_after'] = __SEND_AFTER__;

$options = array(
    'http' => array(
        'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
        'method'  => 'POST',
        'content' => http_build_query($data),
    ),
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

if ($result === FALSE) 
	{ 
	echo "SMS API error"; 
	}

//displaying result
print_r (json_decode($result,true));

version

FIELDS:

__API_URL__ (mandatory, string)
__API_USER__ (mandatory, string)
__API_KEY__ (mandatory, string)
__API_CMD__ (mandatory, string)

PHP CODE EXAMPLE:

$url = __API_URL__;
$data['username']= __API_USER__;
$data['api_key']=__API_KEY__;
$data['cmd']=__API_CMD__;

$options = array(
    'http' => array(
        'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
        'method'  => 'POST',
        'content' => http_build_query($data),
    ),
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

if ($result === FALSE) 
	{ 
	echo "SMS API error"; 
	}

//displaying result
print_r (json_decode($result,true));

viewUser

FIELDS:

__API_URL__ (mandatory, string)
__API_USER__ (mandatory, string)
__API_KEY__ (mandatory, string)
__API_CMD__ (mandatory, string)

PHP CODE EXAMPLE:

$url = __API_URL__;
$data['username']= __API_USER__;
$data['api_key']=__API_KEY__;
$data['cmd']=__API_CMD__;

$options = array(
    'http' => array(
        'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
        'method'  => 'POST',
        'content' => http_build_query($data),
    ),
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);

if ($result === FALSE) 
	{ 
	echo "SMS API error"; 
	}

//displaying result
print_r (json_decode($result,true));