You can use this endpoint directly to send SMS to a contact number.
ENDPOINT | https://cp.sparksender.com/api/send/ |
---|---|
TYPE | GET OR POST |
RETURN TYPE | JSON |
Key | Value | Required |
---|---|---|
user_id | User ID from your profile page. | YES |
api_key | API key from your profile page. | YES |
sender_id | Your approved Sender ID. Use “SparkDEMO” for testing. This one is case sensitive. | YES |
message | Your message. Max: 480 chars. | YES |
recipient_contact_no | The Number of the Recipient. | YES |
{
"status_code": 204,
"msg_id": "14364"
}
Key | Description |
---|---|
status_code | Your Status Code |
msg_id | Message Id |
HTTP Response | Response |
---|---|
201 | Client API Status is Inactive |
202 | Invalid API Key |
203 | Contact Number is Invalid or Operator not Support |
204 | Successfuly Sent the Message |
205 | Length of Contact is Invalid |
206 | Country is not Availble for Sending SMS |
207 | No Contact Numbers |
208 | Account Balance is Insufficient |
209 | Sending the Messsage is Unsuccessfull |
210 | Client is Suspended |
211 | No Mask ID / Mask Id is not Approved |
212 | Rate Card is not Set for the Country |
213 | Route is not Set for the Country |
You can use this endpoint directly to send SMS to bulk contact numbers.
ENDPOINT | https://cp.sparksender.com/api/bulkSMS/ |
---|---|
TYPE | GET OR POST |
RETURN TYPE | JSON |
Key | Value | Required |
---|---|---|
user_id | User ID from your profile page. | YES |
api_key | API key from your profile page. | YES |
sender_id | Your approved Sender ID. Use “SparkDEMO” for testing. This one is case sensitive. | YES |
message | Your message. Max: 480 chars. | YES |
recipient_contacts | The Numbers of the Recipients. (E.g. 94711111111, 94773333333, 94752222222, 94214545455, 58478) | YES |
{
"success": [
[
{
"number": "94711111111",
"msgId": "1000"
},
{
"number": "94773333333",
"msgId": "1001"
},
{
"number": "94752222222",
"msgId": "1002"
}
]
],
"unsuccess": [
[
{
"number": "94214545455",
"status": 203
},
{
"number": "58478",
"status": 203
}
]
]
}
Key | Description |
---|---|
success | Your Result (Success Messages Details) |
unsuccess | Your Result (Unsuccess Messages Details) |
number | Your Contact Number |
msgId | Message Id |
status | Your Status Code |
HTTP Response | Response |
---|---|
201 | Client API Status is Inactive |
202 | Invalid API Key |
203 | Contact Number is Invalid or Operator not Support |
205 | Length of Contact is Invalid |
206 | Country is not Availble for Sending SMS |
207 | No Contact Numbers |
208 | Account Balance is Insufficient |
209 | Sending the Messsage is Unsuccessfull |
210 | Client is Suspended |
211 | No Mask ID / Mask Id is not Approved |
212 | Rate Card is not Set for the Country |
213 | Route is not Set for the Country |
The protocol is used to query the submission result of specific msgId array
Parameters | Description | Required | Type |
---|---|---|---|
user_id | User ID from your profile page. | YES | String |
api_key | API key from your profile page. | YES | String |
msg_id | Your Message ID. | YES | String |
{
"sms_status": 2
}
Key | Description |
---|---|
sms_status | SMS Status Code |
HTTP Response | Response |
---|---|
0 | Pending |
1 | Send |
2 | Delivered |
3 | Fail |
4 | Processing |
5 | Invalid Msg Id |
6 | Api key is invalid |
7 | Api status in inactive |
8 | Client is Suspended |