diff --git a/index.js b/index.js index f3543c8..3cf45b0 100644 --- a/index.js +++ b/index.js @@ -18,14 +18,14 @@ function Semaphore(apikey) { Semaphore.prototype.sendsms = function sendsms(sms, callback) { var data = { - from: sms.from, - api: this.apikey, + sendername: sms.from, + apikey: this.apikey, number: sms.to, message: sms.message } var options = { - url: this.endpoint + '/api/sms', + url: this.endpoint + '/api/v4/messages', method: 'POST', headers: this.headers, form: data @@ -54,7 +54,7 @@ Semaphore.prototype.bulksms = function bulksms(numbers, message, callback) { Semaphore.prototype.status = function status(callback) { var options = { - url: this.endpoint + '/api/sms/account?api=' + this.apikey, + url: this.endpoint + '/api/v4/account?apikey=' + this.apikey, method: 'GET' }