}}
    Show / Hide Table of Contents

    Schedule Message

    A message can be scheduled to be delivered at a specific date and time. This can be done by setting the date and time at which the message should be sent to the parameter name schedule.

    Parameter Info Description
    Parameter Name schedule
    Parameter Type String
    Required No

    The parameter schedule is optional when sending a message. It is however required if the message needs to be scheduled to be sent at a specified date and time.

    Date and Time Format

    The date and time value that should be set must be in the format YYYY-MM-DD hh:mm to pass validation. The time component should be set in 24 hr format. For example, the date and time for scheduling the message can be set as 2021-09-30 15:45.

    The following shows a request data that indicates that the message should be scheduled to be sent at a specified date and time.

    key=API_KEY&text=MESSAGE_TEXT&type=0&sender=SENDER_ID&schedule=2021-09-30+15%3A45&to=0246314915,233242053072
    

    Notice that the schedule date and time value has been URL encoded.

    The request data can be sent as shown below

    POST https://api.smsonlinegh.com/v5/message/sms/send
    
    Host: api.smsonlinegh.com 
    ContentType: application/x-www-form-urlencoded
    Accept: application/json
    
    key=API_KEY&text=MESSAGE_TEXT&type=0&sender=SENDER_ID&schedule=2021-09-30+15%3A45&to=0246314915,233242053072
    

    Alternatively, the request can be sent through HTTP GET method by appending the request data to the base request URI separated by the character ?.

    GET https://api.smsonlinegh.com/v5/message/sms/send?key=API_KEY&text=MESSAGE_TEXT&type=0&sender=SENDER_ID&schedule=2021-09-30+15%3A45&to=0246314915,233242053072
    
    Host: api.smsonlinegh.com 
    ContentType: application/x-www-form-urlencoded
    Accept: application/json
    

    As indicated earlier, HTTP POST method is recommended for submitting SMS since it can contain large request data than the HTTP GET method.

    Back to top