This documentation will provide instructions on how to quickly integrate Snipnet SMS messaging services into various solutions by using Snipnet HTTP API. Snipnet API is based on REST standards. In order to interact with our API, any HTTP client in PHP programming language can be used.
How to get started
Easy. Only two steps actually:
1. Create a Snipnet accountIn order to use our API, you will need credentials. These are not used only for API but also for other Snipnet services like Snipnet Projects. If you already have an Snipnet account you can skip this step. Otherwise, follow this link:
Create new account
2. Test your account by sending a text message to yourselfThe best way to check if your account is operational is to test it, and the best way to test it is to send an SMS to your own phone. Use this simple API call to send your first message.
Our base URL for all API calls is
Endpoint for sending simple SMS is
|method||string||This represents your domain name and can be retrived by default using PHP
|user_email||string||Response message will be deliverd to the email address retrieved from this string (example:
|api_key||string||Represents your license ID, this can be found on your license panel (example:
|senderid||string||Represents sender ID and it can be alphanumeric or numeric. Alphanumeric sender ID length should be between 3 and 11 characters (example:
|phone||string||Represents Destination address and must be in international format (example:
|message||string||Text of the message that will be sent.|
|report||string||This will output a JSON response. If successful, the response header HTTP status code will be
<?php //extract data from the post extract($_POST); $fields = array( 'method' => $_SERVER['SERVER_NAME'], 'user_email' => "", 'api_key' => "xxxx-xxxx-xxxx-xxxx-xxxx-xxxx", 'senderid' => "Snipnet", 'phone' => "233547946168", 'message' => "This is a test message" ); //set POST variables $url = 'https://snipnetworks.com/gateway/RESTAPI/sms/write.php'; //url-ify the data for the POST $fields_string = http_build_query($fields); //open connection $ch = curl_init(); curl_setopt($ch,CURLOPT_URL, $url); curl_setopt($ch,CURLOPT_POST, 1); curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); curl_exec ($ch); curl_close($ch);