API reference
SMS API
A simple HTTP API to send and receive SMS at scale. Send messages on behalf of users, track delivery status in real time, and receive inbound SMS on your dedicated short code.
- Base URL
- https://api.applink.com.bd
- Content type
- application/json;charset=utf-8
- Endpoints
- 3
SMS Mobile Termination
https://api.applink.com.bd/sms/sendThis service allows the user to send SMS to one or more terminals (phones or any SMS-enabled device) from their application. SMS send service supports only POST HTTP requests. This is used when sending SMS to a mobile phone from an application. An application wishing to initiate an MT (Mobile Terminate) SMS message should use this operation type.
Request body
application/json;charset=utf-8
versionstringRequired- API version shall be numbered as 1.0, 2.0 etc. If version is specified in the request, same version must be sent in the response. If version is not specified in the request, the latest version will be specified in the response.Example
1.0 applicationIdstringRequired- Used to identify the application. This is a unique identifier generated while provisioning an application. Only a single value can be sent per request.Example
APP_999999 passwordstringRequired- This API key will be sent to your registered email address on the platform upon application approval.Example
password messagestringRequired- Content of the message that needs to be sent. Messages over the limit shall be broken up by the platform before sendingExample
Hello destinationAddressesarrayRequired- List of destination addresses should be telephone numbers.(tel - for MSISDN). tel:+8801959979376. Address can also have the value - tel: all which will in return be a message to the subscribed base of the application at least one should be specified Note : tel might be a masked number depending on the type of application
sourceAddressstringOptional- Address of the source. sourceAddress: tel:+8801959979376 at least one will be specifiedExample
77000 deliveryStatusRequeststring enumOptional- Indicates the need of a Delivery Status Report for the message. 0 - Delivery Report not required 1 - Delivery Report RequiredAllowed
01Example1 encodingstring enumOptional- Encoding scheme used in the message If not specified taken as Text If the encoding type is “Binary” then the message content will be represented as hex encoded. 0 - Text 240 - Flash SMS 245 - Binary SMSAllowed
0240245Example245 binaryHeaderstringOptional- For advanced type of messages where the binary header shall be sent from the applicationExample
526574697265206170706c69636174696f6e20616e642072656c6561736520524b7320696620666f756e642065787069726564
curl -X POST https://api.applink.com.bd/sms/send \
-H "Content-Type: application/json;charset=utf-8" \
-d '{
"version": "1.0",
"applicationId": "APP_999999",
"password": "password",
"message": "Hello",
"destinationAddresses": [
"tel:+8801959979376"
],
"sourceAddress": "77000",
"deliveryStatusRequest": "1",
"encoding": "245",
"binaryHeader": "526574697265206170706c69636174696f6e20616e642072656c6561736520524b7320696620666f756e642065787069726564"
}'Response
versionstringRequired- API version shall be numbered as 1.0, 2.0 etc. If version is specified in the request, same version must be sent in the response. If version is not specified in the request, the latest version will be specified in the response.Example
1.0 requestIdstringRequired- Uniquely identifies a request within TAPExample
101901031657410007 destinationResponsesarrayRequired- The list of responses for the full list of addresses It will be a collection with individual entry for each element in the address list of the request. -Address - timeStamp - Processed Time stamp - messageId - Message Identifier - statusCode - Status Code - statusDetail: Status detail
destinationResponses.timeStampstringOptional- ·Example
20190103165801 destinationResponses.addressstringOptional- ·Example
tel:+8801959979376 destinationResponses.messageIdstringOptional- ·Example
101901031657410007 destinationResponses.statusCodestring enumOptional- Status code for the request. S = success, E = error, P = partial. See the status code table.Allowed
S1000E1303E1308E1309E1311E1312E1313E1315E1317E1318E1319E1325E1331E1334E1335E1341E1342E1343E1601E1603ExampleS1000 destinationResponses.statusDetailstringOptional- Human-readable description of the status. See the status code table.Example
Success statusCodestring enumRequired- Status code for the request. S = success, E = error, P = partial. See the status code table.Allowed
S1000E1303E1308E1309E1311E1312E1313E1315E1317E1318E1319E1325E1331E1334E1335E1341E1342E1343E1601E1603ExampleS1000 statusDetailstringRequired- Human-readable description of the status. See the status code table.Example
Success.
{
"version": "1.0",
"requestId": "101901031657410007",
"destinationResponses": [
{
"timeStamp": "20190103165801",
"address": "tel:+8801959979376",
"messageId": "101901031657410007",
"statusCode": "S1000",
"statusDetail": "Success"
}
],
"statusCode": "S1000",
"statusDetail": "Success."
}Status codes this endpoint returns20
S1000 | Process completed successfully for all the available destination numbers. |
|---|---|
E1303 | IP address from which this request originated is not provisioned to send requests to application <application-id>. Please use a provisioned system to send requests or contact system admin to provision the new IP. |
E1308 | Permanent charging error due to <specify_reason E.g., Insufficient Balance>. |
E1309 | Requested SMS service is not allowed for this application. Please check the issue with mSpace system administrator. |
E1311 | Mobile terminated SMS messages are not enabled. Check your NCS configuration in provisioning. |
E1312 | Request is invalid. <specify_the_reason> Refer the TAP NBL API Developer Guide for the mandatory fields and correct format of the request. |
E1313 | Authentication failed. No such active application with applicationId <application-id>, or no active service provider or the given password in the request is invalid. |
E1315 | Cannot find the requested service SMS or it is not active. |
E1317 | <MSISDN> in request is invalid or not allowed. |
E1318 | Transaction limit per second has exceeded. Please throttle requests not to exceed the transaction limit. Contact TAP admin to increase the traffic limit. |
E1319 | Transaction limit for today has exceeded. Please try again tomorrow or contact TAP admin to increase the transaction per day limit. |
E1325 | Format of the address is invalid. Expected format is tel:8801959979376. |
E1331 | <sourceAddress> is not allowed. Please use one of the values configured in alias configuration in the SLAs or send the request without <sourceAddress>, so mSpace will use the default source address to send the message to subscriber. |
E1334 | SMS sent to <application name> application could not be processed as the message length is too long. Maximum message length allowed is <specify_max_limit>. |
E1335 | SMS sent to <application name> application could not be processed as the advertisement message length is too long. Maximum message length allowed for advertisements is <specify_max_adv_limit>. |
E1341 | Request failed. An error occurred while sending the request for all the destinations. |
E1342 | MSISDN is black listed. Not authorized to use the application <application_name>. |
E1343 | MSISDN is not white listed. Only white listed numbers are allowed to send messages at this state. |
E1601 | System experienced an unexpected error. |
E1603 | Temporary system error occurred while delivering your request. |
SMS Mobile Origination
https://api.applink.com.bd/sms/receiveThis service retrieves the SMS sent to the web application. Receive service returns only a list of SMS messages received since the previous invocation of the method.
Request body
application/json;charset=utf-8
versionstringRequired- API version shall be numbered as 1.0, 2.0 etc. If version is specified in the request, same version must be sent in the response. If version is not specified in the request, the latest version will be specified in the response.Example
1.0 applicationIdstringRequired- Used to identify the application. This is a unique identifier generated while provisioning an application. Only a single value can be sent per request.Example
APP_000029 sourceAddressstringRequired- Address of the source. sourceAddress: tel:+8801959979376 at least one will be specifiedExample
tel:+8801959979376 messagestringRequired- Content of the message sent by the user
requestIdstringRequired- Uniquely identifies a request within TAPExample
APP_000001 encodingstring enumRequired- Encoding scheme used in the message. If the encoding type is “Binary” then the message content will be represented as hex encoded. 0 - Text 240 - Flash SMS 245 - Binary SMSAllowed
0240245Example0
curl -X POST https://api.applink.com.bd/sms/receive \
-H "Content-Type: application/json;charset=utf-8" \
-d '{
"version": "1.0",
"applicationId": "APP_000029",
"sourceAddress": "tel:+8801959979376",
"message": "",
"requestId": "APP_000001",
"encoding": "0"
}'Response
statusCodestring enumRequired- Status code for the request. S = success, E = error, P = partial. See the status code table.Allowed
S1000E1303E1308E1309E1311E1312E1313E1315E1317E1318E1319E1325E1331E1334E1335E1341E1342E1343E1601E1603ExampleS1000 statusDetailstringRequired- Human-readable description of the status. See the status code table.Example
Success.
{
"statusCode": "S1000",
"statusDetail": "Success."
}Status codes this endpoint returns20
S1000 | Process completed successfully for all the available destination numbers. |
|---|---|
E1303 | IP address from which this request originated is not provisioned to send requests to application <application-id>. Please use a provisioned system to send requests or contact system admin to provision the new IP. |
E1308 | Permanent charging error due to <specify_reason E.g., Insufficient Balance>. |
E1309 | Requested SMS service is not allowed for this application. Please check the issue with mSpace system administrator. |
E1311 | Mobile terminated SMS messages are not enabled. Check your NCS configuration in provisioning. |
E1312 | Request is invalid. <specify_the_reason> Refer the TAP NBL API Developer Guide for the mandatory fields and correct format of the request. |
E1313 | Authentication failed. No such active application with applicationId <application-id>, or no active service provider or the given password in the request is invalid. |
E1315 | Cannot find the requested service SMS or it is not active. |
E1317 | <MSISDN> in request is invalid or not allowed. |
E1318 | Transaction limit per second has exceeded. Please throttle requests not to exceed the transaction limit. Contact TAP admin to increase the traffic limit. |
E1319 | Transaction limit for today has exceeded. Please try again tomorrow or contact TAP admin to increase the transaction per day limit. |
E1325 | Format of the address is invalid. Expected format is tel:8801959979376. |
E1331 | <sourceAddress> is not allowed. Please use one of the values configured in alias configuration in the SLAs or send the request without <sourceAddress>, so mSpace will use the default source address to send the message to subscriber. |
E1334 | SMS sent to <application name> application could not be processed as the message length is too long. Maximum message length allowed is <specify_max_limit>. |
E1335 | SMS sent to <application name> application could not be processed as the advertisement message length is too long. Maximum message length allowed for advertisements is <specify_max_adv_limit>. |
E1341 | Request failed. An error occurred while sending the request for all the destinations. |
E1342 | MSISDN is black listed. Not authorized to use the application <application_name>. |
E1343 | MSISDN is not white listed. Only white listed numbers are allowed to send messages at this state. |
E1601 | System experienced an unexpected error. |
E1603 | Temporary system error occurred while delivering your request. |
Delivery Status Report Service
your endpoint · /sms/reportWhen performing a SendSms Operation if an application has requested for a Delivery Response message from the Message Centre, then TAP will initiate the Delivery Report service to hand over the Delivery Response message to the application. The messageId should be used to match the MT (Mobile Terminate) response with the Delivery Report.
Body AppLink sends you
application/json;charset=utf-8
destinationAddressstringRequired- Address of the subscriberExample
tel:+8801959979376 timeStampstringRequired- The timestamp sent from the SMS "yyMMddHHmm" yy: last two digits of the year (00-99), MM: month (01-12), dd: day (01-31), HH: hour (00-23), mm: minute (00-59)Example
20120113082110 requestIdstringRequired- Uniquely identifies a request within TAPExample
MSG_000111 deliveryStatusstring enumRequired- Enum from TAP to Application: DELIVERED ,EXPIRED ,DELETED ,UNDELIVERABLE ,ACCEPTED ,UNKNOWN ,REJECTEDAllowed
DELIVEREDEXPIREDDELETEDUNDELIVERABLEACCEPTEDUNKNOWNREJECTEDExampleDELIVERED
{
"destinationAddress": "tel:+8801959979376",
"timeStamp": "20120113082110",
"requestId": "MSG_000111",
"deliveryStatus": "DELIVERED"
}Body you return
statusCodestring enumRequired- Status code for the request. S = success, E = error, P = partial. See the status code table.Allowed
S1000E1303E1308E1309E1311E1312E1313E1315E1317E1318E1319E1325E1331E1334E1335E1341E1342E1343E1601E1603ExampleS1000 statusDetailstringRequired- Human-readable description of the status. See the status code table.Example
Success.
{
"statusCode": "S1000",
"statusDetail": "Success."
}Status codes this endpoint returns20
S1000 | Process completed successfully for all the available destination numbers. |
|---|---|
E1303 | IP address from which this request originated is not provisioned to send requests to application <application-id>. Please use a provisioned system to send requests or contact system admin to provision the new IP. |
E1308 | Permanent charging error due to <specify_reason E.g., Insufficient Balance>. |
E1309 | Requested SMS service is not allowed for this application. Please check the issue with mSpace system administrator. |
E1311 | Mobile terminated SMS messages are not enabled. Check your NCS configuration in provisioning. |
E1312 | Request is invalid. <specify_the_reason> Refer the TAP NBL API Developer Guide for the mandatory fields and correct format of the request. |
E1313 | Authentication failed. No such active application with applicationId <application-id>, or no active service provider or the given password in the request is invalid. |
E1315 | Cannot find the requested service SMS or it is not active. |
E1317 | <MSISDN> in request is invalid or not allowed. |
E1318 | Transaction limit per second has exceeded. Please throttle requests not to exceed the transaction limit. Contact TAP admin to increase the traffic limit. |
E1319 | Transaction limit for today has exceeded. Please try again tomorrow or contact TAP admin to increase the transaction per day limit. |
E1325 | Format of the address is invalid. Expected format is tel:8801959979376. |
E1331 | <sourceAddress> is not allowed. Please use one of the values configured in alias configuration in the SLAs or send the request without <sourceAddress>, so mSpace will use the default source address to send the message to subscriber. |
E1334 | SMS sent to <application name> application could not be processed as the message length is too long. Maximum message length allowed is <specify_max_limit>. |
E1335 | SMS sent to <application name> application could not be processed as the advertisement message length is too long. Maximum message length allowed for advertisements is <specify_max_adv_limit>. |
E1341 | Request failed. An error occurred while sending the request for all the destinations. |
E1342 | MSISDN is black listed. Not authorized to use the application <application_name>. |
E1343 | MSISDN is not white listed. Only white listed numbers are allowed to send messages at this state. |
E1601 | System experienced an unexpected error. |
E1603 | Temporary system error occurred while delivering your request. |