YateSMSC JSON API to schedule SMSs

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.

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.
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." } }
Examples: schedule_sms
Send a simple SMS with text 'Test simple SMS.'
{
    "request": "schedule_sms",
    "node": "smsc",
    "params": {
        "originator": "40744334433",
        "destination": "+88250001",
        "text": "Test simple SMS."
    }
}
Send a simple SMS with text 'Test simple SMS' that has alphanumeric originator.
{
    "request": "schedule_sms",
    "node": "smsc",
    "params": {
        "originator": "Yate",
        "orignumtype": "alphanumeric",
        "destination": "+88250001",
        "text": "Test simple SMS."
    }
}
Send a simple SMS with text 'Test simple SMS' to multiple MSISDNs.
{
    "request": "schedule_sms",
    "node": "smsc",
    "params": {
        "originator": "+40744334444",
        "destination": [
            "88350001",
            "40744334411"
        ],
        "destnumtype": "international",
        "text": "Test simple SMS."
    }
}
Send encoded UD.
{
    "request": "schedule_sms",
    "node": "smsc",
    "params": {
        "originator": "407443344011",
        "orignumtype": "international",
        "destination": "88250001",
        "destnumtype": "international",
        "encoded_ud": "F3F61C442FCFE9A0B27BFC7693D3EE33282C1E83C66136BB2C07CD40",
        "dcs": "gsm7bit"
    }
}
Send custom TPDU.
{
    "request": "schedule_sms",
    "node": "smsc",
    "params": {
        "originator": "407443344011",
        "orignumtype": "international",
        "destination": "88250001",
        "destnumtype": "international",
        "tpdu": "000ba17044334410f100006111304175838020f3f61c442fcfe9a0b27bfc7693d3ee33282c1e83c66136bb2c07cd40"
    }
}

Request: hurry_sms

Request an immediate delivery attempt of a waiting SMS.
These attempts do count against the maximum number of retries!
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" } }
Examples: hurry_sms
Hurry a SMS after msg ID.
{
    "request": "hurry_sms",
    "node": "smsc",
    "params": {
        "id": 71
    }
}
Hurry a SMS after Billing ID.
{
    "request": "hurry_sms",
    "node": "smsc",
    "params": {
        "billid": "1581346360-10"
    }
}

Request: cancel_sms

Request cancellation of a waiting SMS.
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." } }
Examples: cancel_sms
Cancel a SMS after msg ID.
{
    "request": "cancel_sms",
    "node": "smsc",
    "params": {
        "id": 71
    }
}
Cancel a SMS after Billing ID.
{
    "request": "cancel_sms",
    "node": "smsc",
    "params": {
        "billid": "1581346360-10"
    }
}
This documentation was generated on 23 September 2020

Our solutions