Quick API integration
Create a revocable API key in your API Centre and send it in the HTTPS Authorization header. Replace the placeholders with your integration details.
Send SMS
curl -H 'Authorization: Bearer YOUR_API_KEY' -X POST 'https://www.newbulksms.com/api/send' --data-urlencode 'sender=YOUR_SENDER_ID' --data-urlencode 'recipients=234XXXXXXXXXX' --data-urlencode 'message=YOUR_MESSAGE'Check balance
curl -H 'Authorization: Bearer YOUR_API_KEY' 'https://www.newbulksms.com/api/balance'Check message status
curl -H 'Authorization: Bearer YOUR_API_KEY' 'https://www.newbulksms.com/api/status?messageid=MSG123'Keep API keys private. Use HTTPS and never publish an API key in frontend website code. Existing Basic-auth and older query-string username/password integrations remain supported for compatibility, but new integrations should use a revocable Bearer API key. For personalised guidance, sign in and open your API Centre.
Response codes
NewBulkSMS codes stay consistent even when the underlying SMS service changes.
NS1000Request accepted for processingSave the message ID and check its status.NS1001Message processed successfullyNo further action is required.NS1002Still processingCheck the message status again shortly.NS1100Balance request successfulUse the returned balance in your application.NS2001Authentication failedCheck the account or API credentials.NS2002Invalid or unavailable Sender IDUse an approved Sender ID.NS2003Invalid recipientCheck the recipient number and international format.NS2004Invalid or missing messageSupply a message before sending.NS2005Insufficient balanceFund the account and try again.NS2008Request limit exceededWait before sending more requests.NS2009Message ID not foundCheck the message ID returned by Send SMS.NS2010Account or API access unavailableCheck account access or contact support.NS3001Message processing failedCheck message status/details before retrying.NS9000Service errorTry again later or contact support if it continues.How sending works
A successful Send API response means NewBulkSMS accepted the request for processing. Save the returned messageid and use Check message status for the final processing result.
