By using a SMS API service you can send a single message which you can get the status of messages instantly.
An API built to Deliver messages in a quick action, we also offer custom API’s to fit our customers needs and requirements.
Single Message URL:
https://valuetext.io/valuetext/rest/message/single/rest
Method:
GET
Parameters:
Parameter | Description | Required |
---|---|---|
mobileNumber | Mobile number of the receiver, Country Code is mandatory before mobile. Ex:- +91-xxxxxxxxx or +1 –xxx-xxx-xxx or 1xxxxx | Yes |
sms | The content of the message must be URL encoded and UTF-8 character set | Yes |
Alphanumeric string or Number which indicates FROM address of the message. | Yes | |
clientId | Optionally, you can set your own ID up to 40 Char and the same will be sent back in response. | No |
Headers:
“APIKEY” and “SECRETKEY” are the authentication protocols we use. For Authentication – header values have to be set as below:
To Find the “APIKEY” and “SECRETKEY” of your account, login to www.valuetext.io -> click on your name -> click on Settings
Sample Request:
https://valuetext.io/valuetext/rest/message/single/rest?mobileNumber=918019350891&sms=Dear%20Nancy%2C%20your%20payment%20is%20successful&senderId=VLUTXT&clientId=879635
Important Note: The body (sms) of the message must be URL Encoded and UTF-8 CharSet for Single SMS API.
Sample Response:
{
“balance”: 0.9151,
“result”: [{
“sms”: “Dear Nancy, your payment is successful”,
“senderId”: “VLUTXT”,
“smsId”: “VT-456-1481563405645”,
“statusCode”: 7003,
“statusMsg”: “Delivered”,
“statusDescription”: “Message delivered successfully”,
“mobileNumber”: “91-xxx-xxx-xx”,
“clientId”: “123”,
“messageCount”: 1,
“messageCost”: 0.0012
}]}
Know about Response parameters & Status Codes
Bulk SMS API
By using the Bulk SMS API service you can send list of messages in a single call.
An API built to Deliver messages in quick fashion, we also offer custom API’s to fit our customers needs and requirements.
Bulk Messages URL:
https://valuetext.io/valuetext/rest/message/bulk/rest
Method:
POST
Parameters:
The following table shows the parameters you use in the request
Parameter | Description | Required |
---|---|---|
mobileNumber | Mobile number of the receiver, Country Code is mandatory before mobile. Ex:- +91-xxxxxxxxx or +1 –xxx-xxx-xxx or 1xxxxx | Yes |
sms | The content of the message must be UTF-8 character set | Yes |
Alphanumeric string or Number which indicates FROM address of message . | Yes | |
clientId | Optionally, you can set your own ID up to 40 Char and the same will be sent back in response. | No |
Headers:
Supported Content Type based on request type you are sending
“APIKEY” and “SECRETKEY” are the authentication parameters for calls to ValueText API. For Authentication – header values have to be set as below:
To Find the “APIKEY” and “SECRETKEY” of your account, login to www.valuetext.io -> click on your name -> click on Settings
Sample request with content-type: application/json
[
{
“sms”: “Dear Avinash, Thank you for your payment.”,
“senderId”: “VluTxt”,
“mobileNumber”: “91xxxxxxxxx”,
“clientId”: “123454b”,
“deliveryModes” : “SMS”
},
{
“sms”: “Dear Nancy, Thank you for your payment.”,
“senderId”: “VluTxt”,
“mobileNumber”: “91xxxxxxxx”,
“clientId”: “”,
“deliveryModes”:”WHATSAPP”
}
]
Possible values for deliveryModes
you can pass “SMS”, “WHATSAPP” OR “WHATSAPP,SMS”
“WHATSAPP,SMS” – It will try to send WhatApp if customer not using or WA filed then SMS will be sent.
Sample Response:
The response comes in JSON format only.
{
“balance”: “0.9018”,
“result”:
[
{
“sms”: “Dear Avinash, Thank you for your payment.”,
“senderId”: “VluTxt”,
“smsId”: “VT-499-1481622882333”,
“statusCode”: “7001”,
“statusMsg”: “Queued “,
“statusDescription”: “Placed your request”,
“mobileNumber”: “91-xxxxxxxxxx”,
“clientId”: “123454b”,
“messageCount”: “1”,
“messageCost”: “0.0019”
},
{
“sms”: “Dear Nancy, Thank you for your payment.”,
“senderId”: “VluTxt”,
“smsId”: “VT-853-1481622882332”,
“statusCode”: “7001”,
“statusMsg”: “Queued “,
“statusDescription”: “Placed your request”,
“mobileNumber”: “91-xxxxxxxxx”,
“clientId”: “”,
“messageCount”: “1”,
“messageCost”: “0.0019”
}
]
}
The response contains the following Parameter:
Parameter | Description |
---|---|
sms | Content of the message must be URL encoded and UTF-8 character set |
Alphanumeric string which indicates FROM address of message | |
smsId | Unique id will be generated for the each message request raised |
statusCode | Status code for the message |
statusMsg | Status of the message like Sent, Delivered, Fail…. |
statusDescription | Detailed description about status of message |
mobileNumber | Contact number at which accepts delivery of the message. |
clientId | The id which you have set at the sms request |
messageCount | Body /Text of the sms, 160 characters is equal to 1 sms count |
messageCost | Cost per message sent. Ex: messageCount 2 & each message cost is 0.0012 so messageCost is equal to 0.0024 (2 * 0.0012) |
balance | Balance available to send message for all countries (excluding India). |
statusCode, status & statusMsg:
Possible values for statusCode, Status & statusMsg at response:
statusCode | status | statusMsg |
---|---|---|
7000 | Submitted | Accepted message to sent |
7001 | Queued | Placed your request |
7002 | Sent | Message sent and waiting for an operator response |
7003 | Delivered | Message delivered successfully |
7004 | Undelivered | Undelivered with unknown reasons |
7005 | Undelivered | Number Barred or Unsupported Number |
7006 | Undelivered | Message content is invalid |
7007 | Unknown | Unknown status |
7008 | FAIL | Invalid parameters |
7009 | FAIL | Invalid Sender Id or Sender Id Activation Pending |
7010 | FAIL | Invalid Mobile Number |
7011 | FAIL | Invalid msg body or template |
7012 | FAIL | Exceeding Maximum limit of 650 characters |
7013 | FAIL | Unsupported country or Unable to identify country code |
7014 | FAIL | Trail account can send messages only to registered trusted numbers |
7015 | FAIL | Authentication failed |
7016 | FAIL | Internal process error |
7017 | FAIL | Insufficient funds |
7018 | FAIL | Throttled/exceeding limit |
7019 | FAIL | Opted Out Mobile Number |
7020 | FAIL | Do not disturb rules accounted |
7022 | FAIL | Unsupported SenderId for the receiving country |
7021 | Hold | hold by the user |
Setup Webhook
ValueText will sent HTTP (POST) request to Webhook to receive updated status about the messages.
You can configure your Webhook at setting page after you login.
Sample Webhook Request
[
{
“sms”: “Dear Avinash, Thank you for your payment.”,
“senderId”: “VluTxt”,
“smsId”: “VT-499-1481622882333”,
“statusCode”: “7003”,
“statusMsg”: “Delivered “,
“statusDescription”: “Message delivered successfully”,
“mobileNumber”: “91-xxxxxxxxxx”,
“clientId”: “123454b”,
“messageCount”: “1”,
“messageCost”: “0.0019”
},
{
“sms”: “Dear Nancy, Thank you for your payment.”,
“senderId”: “VluTxt”,
“smsId”: “VT-853-1481622882332”,
“statusCode”: “7003”,
“statusMsg”: “Delivered “,
“statusDescription”: “Message delivered successfully”,
“mobileNumber”: “91-xxxxxxxxx”,
“clientId”: “”,
“messageCount”: “1”,
“messageCost”: “0.0019”
}
]