YateSMSC, as well as other Yate solutions, offers a JSON API for the configuration that can be used to setup SS7/SMPP interfaces, configure general network settings, request for SMS delivery and others.
The IP used to access the JSON API is provisioned by YateMMI (Mobile Management Interface) or can be set by hand to schedule SMS.
Related to text pushed to the phone/device:
- use: %0A as enter
- use: %20 as space
Basically, RFC3986 explains ¹ percent-encoding mechanism, ² query component and ³ path component.
Request: schedule_sms
Request delivery of text message/partially encoded message/ custom PDU in MT format.
If custom TPDU is sent, it must be formatted as a full MT SMS in hex format.
When sending a text message it will be encoded as gsm7bit (default charset/utf8) or ucs2.
You can deliver to single receiver or to multiple receivers (if array or msisdns is given instead of single msisdn).
Please see the Send SMS Form sample for an example of how to use this request in a middleware application.
If custom TPDU is sent, it must be formatted as a full MT SMS in hex format.
When sending a text message it will be encoded as gsm7bit (default charset/utf8) or ucs2.
You can deliver to single receiver or to multiple receivers (if array or msisdns is given instead of single msisdn).
Please see the Send SMS Form sample for an example of how to use this request in a middleware application.
Requests
This request has multiple formats in which it can be sent:
{ "request": "schedule_sms", "params": { "originator": "Mandatory, string. Sender of the SMS.", "destination": "Mandatory, array/string. Receiver(s) of the SMS. Must be a valid MSISDN or an Array of valid MSISDNs", "orignumtype": "Optional, string, default='international', allowed values:'international','national','alphanumeric'.", "orignumplan": "Optional, string, default='isdn', allowed values:'isdn','national','unknown'.", "destnumtype": "Optional, string, default='isdn', allowed values:'international','national'. The SMSC tries to guess the destination based of number and my_cc (country code) set in smsc.", "scheduled_time": "Optional, integer. Deliver sms(s) starting from that UNIX timestamp, no more than 2678400 seconds (31 days) in the future", "expires": "Optional, number. Expire interval (maximum 38102400 seconds = 63 weeks) or absolute UNIX timestamp of expiration", "retries": "Optional, integer. Number of delivery attempts to make, 1 to 30.", "return_billid": "Optional, boolean. Return an array of billids instead the count of scheduled messages.", "ref": "Optional, integer. TP-MR message reference (0-255) to use for status reports, by default no reports are returned", "text.encoding": "Optional, string, default='gsm7bit', allowed values: 'gsm7bit','ucs2'. Text will be encoded in gsm7bit/ucs2.", "text": "Mandatory, string. Text to deliver." } }
{ "request": "schedule_sms", "params": { "originator": "Mandatory, string. Sender of the SMS.", "destination": "Mandatory, array/string. Receiver(s) of the SMS. Must be a valid MSISDN or an Array of valid MSISDNs", "orignumtype": "Optional, string, default='international', allowed values:'international','national','alphanumeric'.", "orignumplan": "Optional, string, default='isdn', allowed values:'isdn','national','unknown'.", "destnumtype": "Optional, string, default='isdn', allowed values:'international','national'. The SMSC tries to guess the destination based of number and my_cc (country code) set in smsc.", "scheduled_time": "Optional, integer. Deliver sms(s) starting from that UNIX timestamp, no more than 2678400 seconds (31 days) in the future", "expires": "Optional, number. Expire interval (maximum 38102400 seconds = 63 weeks) or absolute UNIX timestamp of expiration", "retries": "Optional, integer. Number of delivery attempts to make, 1 to 30.", "return_billid": "Optional, boolean. Return an array of billids instead the count of scheduled messages.", "ref": "Optional, integer. TP-MR message reference (0-255) to use for status reports, by default no reports are returned", "dcs": "Optinal, integer/string,allowed values(integer): 0 - 255, allowed values(string): 'gsm7bit','ucs2'. Data Coding Scheme.", "pid": "Optional, integer, default=0, allowed values: 0 -> 255. Protocol Identifier.", "udhi": "Optional, boolean, default=false. Enable or disable 'User Data Header Indicator'.", "encoded_ud": "Mandatory, string. Already encoded ud in hex format." } }
{ "request": "schedule_sms", "params": { "originator": "Mandatory, string. Sender of the SMS.", "destination": "Mandatory, array/string. Receiver(s) of the SMS. Must be a valid MSISDN or an Array of valid MSISDNs", "orignumtype": "Optional, string, default='international', allowed values:'international','national','alphanumeric'.", "orignumplan": "Optional, string, default='isdn', allowed values:'isdn','national','unknown'.", "destnumtype": "Optional, string, default='isdn', allowed values:'international','national'. The SMSC tries to guess the destination based of number and my_cc (country code) set in smsc.", "scheduled_time": "Optional, integer. Deliver sms(s) starting from that UNIX timestamp, no more than 2678400 seconds (31 days) in the future", "expires": "Optional, number. Expire interval (maximum 38102400 seconds = 63 weeks) or absolute UNIX timestamp of expiration", "retries": "Optional, integer. Number of delivery attempts to make, 1 to 30.", "return_billid": "Optional, boolean. Return an array of billids instead the count of scheduled messages.", "ref": "Optional, integer. TP-MR message reference (0-255) to use for status reports, by default no reports are returned", "tpdu": "Mandatory, string. Completely custom tpdu. String representation of a full MT SMS in hex format." } }
Responses
{ "code": 0, "scheduled_sms": "Count of message (fragments) by default." }
Errors
{ "code": 401, "message": "Could not schedule any SMSs. All destinations are invalid." }
{ "code": 401, "message": "Could not encode alphanumeric originator: 'reason_value'." }
{ "code": 401, "message": "Invalid originator. Too long." }
{ "code": 401, "message": "Invalid return parameters from encoding." }
{ "code": 401, "message": "Could not encode text." }
{ "code": 401, "message": "Invalid dcs 'dcs_value'." }
{ "code": 402, "message": "Missing all parameters." }
{ "code": 402, "message": "Missing 'originator'." }
{ "code": 402, "message": "Missing 'destination'." }
{ "code": 402, "message": "Missing text, encoded_ud or dcs, tpdu." }
{ "code": 502, "message": "Message query request failed for 'dest_msisdn_value'." }
Examples: schedule_sms
Send a simple SMS with text 'Test simple SMS.'
Send a simple SMS with text 'Test simple SMS' that has alphanumeric originator.
Send a simple SMS with text 'Test simple SMS' to multiple MSISDNs.
Send encoded UD.
Request
{ "request": "schedule_sms", "node": "smsc", "params": { "originator": "407443344011", "orignumtype": "international", "destination": "88250001", "destnumtype": "international", "encoded_ud": "F3F61C442FCFE9A0B27BFC7693D3EE33282C1E83C66136BB2C07CD40", "dcs": "gsm7bit" } }
Response
{ "code": 0, "scheduled_sms": 1 }
Send custom TPDU.
Request
{ "request": "schedule_sms", "node": "smsc", "params": { "originator": "407443344011", "orignumtype": "international", "destination": "88250001", "destnumtype": "international", "tpdu": "000ba17044334410f100006111304175838020f3f61c442fcfe9a0b27bfc7693d3ee33282c1e83c66136bb2c07cd40" } }
Response
{ "code": 0, "scheduled_sms": 1 }
Request: hurry_sms
Request an immediate delivery attempt of a waiting SMS.
These attempts do count against the maximum number of retries!
These attempts do count against the maximum number of retries!
Requests
This request has multiple formats in which it can be sent:
{ "request": "hurry_sms", "node": "smsc", "params": { "id": "Mandatory, integer. Numeric ID of the message to hurry up" } }
{ "request": "hurry_sms", "node": "smsc", "params": { "billid": "Mandatory, string. Billing ID of the message to hurry up" } }
Responses
Response has multiple formats depending on the sent request:
{ "code": 0, "hurried_sms": "ID of the message" }
{ "code": 0, "hurried_sms": "ID of the message" }
Errors
{ "code": 402, "message": "Missing or invalid parameters 'id' and 'billid'." }
{ "code": 404, "message": "Message not found" }
Examples: hurry_sms
Hurry a SMS after msg ID.
Hurry a SMS after Billing ID.
Request: cancel_sms
Request cancellation of a waiting SMS.
Requests
This request has multiple formats in which it can be sent:
{ "request": "cancel_sms", "node": "smsc", "params": { "id": "Mandatory, integer. Numeric ID of the message to cancel.", "reason": "Optional, string, default='Cancelled-by-Operator'. Optional reason to be written in CDR." } }
{ "request": "cancel_sms", "node": "smsc", "params": { "billid": "Mandatory, string. Billing ID of the message to cancel.", "reason": "Optional, string, default='Cancelled-by-Operator'. Optional reason to be written in CDR." } }
Responses
Response has multiple formats depending on the sent request:
{ "code": 0, "canceled_sms": "ID of the message" }
{ "code": 0, "canceled_sms": "ID of the message" }
Errors
{ "code": 402, "message": "Missing or invalid parameters 'id' and 'billid'." }
{ "code": 404, "message": "Message not found" }
Examples: cancel_sms
Cancel a SMS after msg ID.
Cancel a SMS after Billing ID.
This documentation was generated on 10 June 2023