Our Messaging API designed to fullfill most of your use cases and can be easily integrate to any of the system. We can implement single SMS, Personlized batch SMS's, Unicode (language types), Scheduling SMS, etc using this API.
POST
/messages/v1/send
Authentication
AUTHORIZATION: Bearer Token
Request parameters
Parameter
Value / Pattern
*originator
The Sender/Header of a message. We can use your brand name with a maximum character limit of 11 or your mobile number with your country code. If you would like to register a new Sender ID, you can submit your details here
*recipients
Mobile Numbers to send SMS seperated by comma in an array. The recipient's phone number should have a country code prefix. You can also set the Default Countryhere, and all your messages will be prefixed with the selected country code.
*content
The message content is being sent. A long message over 160 characters will be split into multiple messages with 153 characters each and forwarded to telecom. When Unicode messages exceed 70 characters, they are split into multiple messages of 63 characters each. Also, billing will be based on the number of message parts sent
*channel
To select the messaging channel that you want to use. (e.g., SMS, WhatsApp, Viber, Telegram, etc.)
num_lookup
Type: Boolean. To number lookup every SMS sent from your account. This will help you to send sms only to reachable numbers. Additional charges included for this service. (Default: False). You can also enable Number Lookuphere, and all your recipients will be lookup.
report_url
To receive delivery status (DLR) for your message, specify the callback server URL where you want to receive the message status updates using the report_url parameter. When the delivery status changes, the status updates will be sent to the specified URL. For information on the format of the DLR message, please refer to the "Receiving DLR" section.
data_coding
Set as text for normal GSM 03.38 characters(English, normal characters). Set as unicode for non GSM 03.38 characters (Arabic, Chinese, Hebrew, Greek like regional languages and Unicode characters). Set as auto so we will find the data_coding based on your content.
msg_type
text, audio sms, multimedia, image
schedule_time
To schedule the message to be sent at a specific date and time, provide the value of the schedule_time parameter in the following format: "YYYY-MM-DDTHH:MM+HH:MM", where "YYYY-MM-DD" represents the date, "HH:MM" represents the time, and "+HH:MM" represents the timezone offset. For example, if your timezone is four hours ahead of Coordinated Universal Time (UTC+04:00), the schedule_time parameter should be set as "2023-04-17T16:18+04:00".
Response
When the request is validated, request_id, status and created time will be returned. Users can use this request_id to query status using the Get status endpoint.
{"detail":{"code":"ACCESS_TOKEN_SIGNATURE_VERIFICATION_FAILED","message":"It looks like your requests were failed due to a missing or invalid 'Access Token'. Sign up at https://app.d7networks.com and create an authentication token in the developer section."}}
varaxios=require('axios');vardata=JSON.stringify({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Greetings from D7 API","msg_type":"text","data_coding":"text"}],"message_globals":{"originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}});varconfig={method:'post',url:'https://api.d7networks.com/messages/v1/send',headers:{'Content-Type':'application/json','Accept':'application/json','Authorization':'Bearer {{api_access_token}}'},data:data};axios(config).then(function(response){console.log(JSON.stringify(response.data));}).catch(function(error){console.log(error);});
importrequestsimportjsonurl="https://api.d7networks.com/messages/v1/send"payload=json.dumps({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Greetings from D7 API","msg_type":"text","data_coding":"text"}],"message_globals":{"originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}})headers={'Content-Type':'application/json','Accept':'application/json','Authorization':'Bearer {{api_access_token}}'}response=requests.request("POST",url,headers=headers,data=payload)print(response.text)
<?php$curl=curl_init();$token="YOUR_API_TOKEN";// Replace it with your API Token$originator="SignOTP";// Replace it with your Sender ID$recipients=array("receipient_1","receipient_2");// Replace it with real recipients$content="Greetings from D7 API - Second Message";// Replace it with message content$message_obj=array("channel"=>"sms","msg_type"=>"text","recipients"=>$recipients,"content"=>$content,"data_coding":"auto");$globals_obj=array("originator"=>$originator,"report_url"=>"https://the_url_to_recieve_delivery_report.com",);$payload=json_encode(array("messages"=>array($message_obj),"message_globals"=>$globals_obj));curl_setopt_array($curl,array(CURLOPT_URL=>'https://api.d7networks.com/messages/v1/send',CURLOPT_RETURNTRANSFER=>true,CURLOPT_ENCODING=>'',CURLOPT_MAXREDIRS=>10,CURLOPT_TIMEOUT=>0,CURLOPT_FOLLOWLOCATION=>true,CURLOPT_HTTP_VERSION=>CURL_HTTP_VERSION_1_1,CURLOPT_CUSTOMREQUEST=>'POST',CURLOPT_POSTFIELDS=>$payload,CURLOPT_HTTPHEADER=>array('Content-Type: application/json','Accept: application/json','Authorization: Bearer '.$token),));$response=curl_exec($curl);curl_close($curl);echo$response;// Add custom code to save the response in database and use it later to track the delivery report?>
varsettings={"url":"https://api.d7networks.com/messages/v1/send","method":"POST","timeout":0,"headers":{"Content-Type":"application/json","Accept":"application/json","Authorization":"Bearer {{api_access_token}}"},"data":JSON.stringify({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Greetings from D7 API","msg_type":"text","data_coding":"text"}],"message_globals":{"originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}}),};$.ajax(settings).done(function(response){console.log(response);});
varheaders={'Content-Type':'application/json','Accept':'application/json','Authorization':'Bearer {{api_access_token}}'};varrequest=http.Request('POST',Uri.parse('https://api.d7networks.com/messages/v1/send'));request.body=json.encode({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Greetings from D7 API","msg_type":"text","data_coding":"text"}],"message_globals":{"originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}});request.headers.addAll(headers);http.StreamedResponseresponse=awaitrequest.send();if(response.statusCode==200){print(awaitresponse.stream.bytesToString());}else{print(response.reasonPhrase);}
require"uri"require"json"require"net/http"url=URI("https://api.d7networks.com/messages/v1/send")https=Net::HTTP.new(url.host,url.port)https.use_ssl=truerequest=Net::HTTP::Post.new(url)request["Content-Type"]="application/json"request["Accept"]="application/json"request["Authorization"]="Bearer {{api_access_token}}"request.body=JSON.dump({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Greetings from D7 API","msg_type":"text","data_coding":"text"}],"message_globals":{"originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}})response=https.request(request)putsresponse.read_body
varaxios=require('axios');vardata=JSON.stringify({"messages":[{"recipients":["{{recipient1}}","{{recipient2}}"],"content":"Greetings from D7 API - First message","msg_type":"text","data_coding":"text"},{"recipients":["{{recipient3}}","{{recipient4}}"],"content":"Greetings from D7 API - Second Message","msg_type":"text","data_coding":"text"}],"message_globals":{"channel":"sms","originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}});varconfig={method:'post',url:'https://api.d7networks.com/messages/v1/send',headers:{'Content-Type':'application/json','Accept':'application/json','Authorization':'Bearer {{api_access_token}}'},data:data};axios(config).then(function(response){console.log(JSON.stringify(response.data));}).catch(function(error){console.log(error);});
importrequestsimportjsonurl="https://api.d7networks.com/messages/v1/send"payload=json.dumps({"messages":[{"recipients":["{{recipient1}}","{{recipient2}}"],"content":"Greetings from D7 API - First message","msg_type":"text","data_coding":"text"},{"recipients":["{{recipient3}}","{{recipient4}}"],"content":"Greetings from D7 API - Second Message","msg_type":"text","data_coding":"text"}],"message_globals":{"channel":"sms","originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}})headers={'Content-Type':'application/json','Accept':'application/json','Authorization':'Bearer {{api_access_token}}'}response=requests.request("POST",url,headers=headers,data=payload)print(response.text)
varsettings={"url":"https://api.d7networks.com/messages/v1/send","method":"POST","timeout":0,"headers":{"Content-Type":"application/json","Accept":"application/json","Authorization":"Bearer {{api_access_token}}"},"data":JSON.stringify({"messages":[{"recipients":["{{recipient1}}","{{recipient2}}"],"content":"Greetings from D7 API - First message","msg_type":"text","data_coding":"text"},{"recipients":["{{recipient3}}","{{recipient4}}"],"content":"Greetings from D7 API - Second Message","msg_type":"text","data_coding":"text"}],"message_globals":{"channel":"sms","originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}}),};$.ajax(settings).done(function(response){console.log(response);});
varheaders={'Content-Type':'application/json','Accept':'application/json','Authorization':'Bearer {{api_access_token}}'};varrequest=http.Request('POST',Uri.parse('https://api.d7networks.com/messages/v1/send'));request.body=json.encode({"messages":[{"recipients":["{{recipient1}}","{{recipient2}}"],"content":"Greetings from D7 API - First message","msg_type":"text","data_coding":"text"},{"recipients":["{{recipient3}}","{{recipient4}}"],"content":"Greetings from D7 API - Second Message","msg_type":"text","data_coding":"text"}],"message_globals":{"channel":"sms","originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}});request.headers.addAll(headers);http.StreamedResponseresponse=awaitrequest.send();if(response.statusCode==200){print(awaitresponse.stream.bytesToString());}else{print(response.reasonPhrase);}
require"uri"require"json"require"net/http"url=URI("https://api.d7networks.com/messages/v1/send")https=Net::HTTP.new(url.host,url.port)https.use_ssl=truerequest=Net::HTTP::Post.new(url)request["Content-Type"]="application/json"request["Accept"]="application/json"request["Authorization"]="Bearer {{api_access_token}}"request.body=JSON.dump({"messages":[{"recipients":["{{recipient1}}","{{recipient2}}"],"content":"Greetings from D7 API - First message","msg_type":"text","data_coding":"text"},{"recipients":["{{recipient3}}","{{recipient4}}"],"content":"Greetings from D7 API - Second Message","msg_type":"text","data_coding":"text"}],"message_globals":{"channel":"sms","originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}})response=https.request(request)putsresponse.read_body
varaxios=require('axios');vardata=JSON.stringify({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Привет от D7 API, Спасибо за тестирование наших служб обмена сообщениями","msg_type":"text","data_coding":"unicode"}],"message_globals":{"originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}});varconfig={method:'post',url:'https://api.d7networks.com/messages/v1/send',headers:{'Content-Type':'application/json','Accept':'application/json','Authorization':'Bearer {{api_access_token}}'},data:data};axios(config).then(function(response){console.log(JSON.stringify(response.data));}).catch(function(error){console.log(error);});
importrequestsimportjsonurl="https://api.d7networks.com/messages/v1/send"payload=json.dumps({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Привет от D7 API, Спасибо за тестирование наших служб обмена сообщениями","msg_type":"text","data_coding":"unicode"}],"message_globals":{"originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}})headers={'Content-Type':'application/json','Accept':'application/json','Authorization':'Bearer {{api_access_token}}'}response=requests.request("POST",url,headers=headers,data=payload)print(response.text)
varsettings={"url":"https://api.d7networks.com/messages/v1/send","method":"POST","timeout":0,"headers":{"Content-Type":"application/json","Accept":"application/json","Authorization":"Bearer {{api_access_token}}"},"data":JSON.stringify({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Привет от D7 API, Спасибо за тестирование наших служб обмена сообщениями","msg_type":"text","data_coding":"unicode"}],"message_globals":{"originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}}),};$.ajax(settings).done(function(response){console.log(response);});
varheaders={'Content-Type':'application/json','Accept':'application/json','Authorization':'Bearer {{api_access_token}}'};varrequest=http.Request('POST',Uri.parse('https://api.d7networks.com/messages/v1/send'));request.body=json.encode({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Привет от D7 API, Спасибо за тестирование наших служб обмена сообщениями","msg_type":"text","data_coding":"unicode"}],"message_globals":{"originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}});request.headers.addAll(headers);http.StreamedResponseresponse=awaitrequest.send();if(response.statusCode==200){print(awaitresponse.stream.bytesToString());}else{print(response.reasonPhrase);}
require"uri"require"json"require"net/http"url=URI("https://api.d7networks.com/messages/v1/send")https=Net::HTTP.new(url.host,url.port)https.use_ssl=truerequest=Net::HTTP::Post.new(url)request["Content-Type"]="application/json"request["Accept"]="application/json"request["Authorization"]="Bearer {{api_access_token}}"request.body=JSON.dump({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Привет от D7 API, Спасибо за тестирование наших служб обмена сообщениями","msg_type":"text","data_coding":"unicode"}],"message_globals":{"originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}})response=https.request(request)putsresponse.read_body
varaxios=require('axios');vardata=JSON.stringify({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Привет от D7 API, Спасибо за тестирование наших служб обмена сообщениями","msg_type":"text","data_coding":"auto"}],"message_globals":{"originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}});varconfig={method:'post',url:'https://api.d7networks.com/messages/v1/send',headers:{'Content-Type':'application/json','Accept':'application/json','Authorization':'Bearer {{api_access_token}}'},data:data};axios(config).then(function(response){console.log(JSON.stringify(response.data));}).catch(function(error){console.log(error);});
importrequestsimportjsonurl="https://api.d7networks.com/messages/v1/send"payload=json.dumps({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Привет от D7 API, Спасибо за тестирование наших служб обмена сообщениями","msg_type":"text","data_coding":"auto"}],"message_globals":{"originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}})headers={'Content-Type':'application/json','Accept':'application/json','Authorization':'Bearer {{api_access_token}}'}response=requests.request("POST",url,headers=headers,data=payload)print(response.text)
varsettings={"url":"https://api.d7networks.com/messages/v1/send","method":"POST","timeout":0,"headers":{"Content-Type":"application/json","Accept":"application/json","Authorization":"Bearer {{api_access_token}}"},"data":JSON.stringify({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Привет от D7 API, Спасибо за тестирование наших служб обмена сообщениями","msg_type":"text","data_coding":"auto"}],"message_globals":{"originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}}),};$.ajax(settings).done(function(response){console.log(response);});
varheaders={'Content-Type':'application/json','Accept':'application/json','Authorization':'Bearer {{api_access_token}}'};varrequest=http.Request('POST',Uri.parse('https://api.d7networks.com/messages/v1/send'));request.body=json.encode({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Привет от D7 API, Спасибо за тестирование наших служб обмена сообщениями","msg_type":"text","data_coding":"auto"}],"message_globals":{"originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}});request.headers.addAll(headers);http.StreamedResponseresponse=awaitrequest.send();if(response.statusCode==200){print(awaitresponse.stream.bytesToString());}else{print(response.reasonPhrase);}
require"uri"require"json"require"net/http"url=URI("https://api.d7networks.com/messages/v1/send")https=Net::HTTP.new(url.host,url.port)https.use_ssl=truerequest=Net::HTTP::Post.new(url)request["Content-Type"]="application/json"request["Accept"]="application/json"request["Authorization"]="Bearer {{api_access_token}}"request.body=JSON.dump({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Привет от D7 API, Спасибо за тестирование наших служб обмена сообщениями","msg_type":"text","data_coding":"auto"}],"message_globals":{"originator":"SignOTP","report_url":"https://the_url_to_recieve_delivery_report.com"}})response=https.request(request)putsresponse.read_body
constaxios=require('axios');letdata=JSON.stringify({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Привет от D7 API, Спасибо за тестирование наших служб обмена сообщениями"},{"channel":"sms","recipients":["{{recipient3}}","{{recipient4}}"],"content":"Hello from D7 API, Thanks for testing our messaging services"}],"message_globals":{"originator":"D7Web","data_coding":"auto","report_url":"https://the_url_to_recieve_delivery_report.com","schedule_time":"2023-04-19T16:18+04:00"}});letconfig={method:'post',maxBodyLength:Infinity,url:'https://api.d7networks.com/messages/v1/send',headers:{'Content-Type':'application/json','Authorization':'Bearer {{api_access_token}}'},data:data};axios.request(config).then((response)=>{console.log(JSON.stringify(response.data));}).catch((error)=>{console.log(error);});
importrequestsimportjsonurl="https://api.d7networks.com/messages/v1/send"payload=json.dumps({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Привет от D7 API, Спасибо за тестирование наших служб обмена сообщениями"},{"channel":"sms","recipients":["{{recipient3}}","{{recipient4}}"],"content":"Hello from D7 API, Thanks for testing our messaging services"}],"message_globals":{"originator":"D7Web","data_coding":"auto","report_url":"https://the_url_to_recieve_delivery_report.com","schedule_time":"2023-04-19T16:18+04:00"}})headers={'Content-Type':'application/json','Authorization':'Bearer {{api_access_token}}'}response=requests.request("POST",url,headers=headers,data=payload)print(response.text)
varsettings={"url":"https://api.d7networks.com/messages/v1/send","method":"POST","timeout":0,"headers":{"Content-Type":"application/json","Authorization":"Bearer {{api_access_token}}"},"data":JSON.stringify({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Привет от D7 API, Спасибо за тестирование наших служб обмена сообщениями"},{"channel":"sms","recipients":["{{recipient3}}","{{recipient4}}"],"content":"Hello from D7 API, Thanks for testing our messaging services"}],"message_globals":{"originator":"D7Web","data_coding":"auto","report_url":"https://the_url_to_recieve_delivery_report.com","schedule_time":"2023-04-19T16:18+04:00"}}),};$.ajax(settings).done(function(response){console.log(response);});
varheaders={'Content-Type':'application/json','Authorization':'Bearer {{api_access_token}}'};varrequest=http.Request('POST',Uri.parse('https://api.d7networks.com/messages/v1/send'));request.body=json.encode({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Привет от D7 API, Спасибо за тестирование наших служб обмена сообщениями"},{"channel":"sms","recipients":["{{recipient3}}","{{recipient4}}"],"content":"Hello from D7 API, Thanks for testing our messaging services"}],"message_globals":{"originator":"D7Web","data_coding":"auto","report_url":"https://the_url_to_recieve_delivery_report.com","schedule_time":"2023-04-19T16:18+04:00"}});request.headers.addAll(headers);http.StreamedResponseresponse=awaitrequest.send();if(response.statusCode==200){print(awaitresponse.stream.bytesToString());}else{print(response.reasonPhrase);}
require"uri"require"json"require"net/http"url=URI("https://api.d7networks.com/messages/v1/send")https=Net::HTTP.new(url.host,url.port)https.use_ssl=truerequest=Net::HTTP::Post.new(url)request["Content-Type"]="application/json"request["Authorization"]="Bearer {{api_access_token}}"request.body=JSON.dump({"messages":[{"channel":"sms","recipients":["{{recipient1}}","{{recipient2}}"],"content":"Привет от D7 API, Спасибо за тестирование наших служб обмена сообщениями"},{"channel":"sms","recipients":["{{recipient3}}","{{recipient4}}"],"content":"Hello from D7 API, Thanks for testing our messaging services"}],"message_globals":{"originator":"D7Web","data_coding":"auto","report_url":"https://the_url_to_recieve_delivery_report.com","schedule_time":"2023-04-19T16:18+04:00"}})response=https.request(request)putsresponse.read_body