Messages

Schedule message delivery

Scheduling messages to be delivered later

Using the Whispir API, you can schedule messages to be sent later. For example, the code will schedule a single message to be delivered at 3:55pm on 14 February 2019.

  • Using this method, messages can be easily scheduled so that the message is delivered based on when the recipient requires it or their preferred time of day.

Scheduling messages for repeated delivery

Messages can also be scheduled for sending multiple times/repeatedly (such as every hour, every day or every 7 days), starting from a date and continuing until desired. Users can configure the scheduling as part of the message sendout.

For example, the code will schedule a single message to be delivered at 3:55pm on 14 February 2019, and repeated every hour for 10 times.

Time zone

When a message is scheduled, it's scheduled as per the time zone setting of the user who initiates the message request. Each user in Whispir has a time zone set in their profile and messages are sent relative to that time zone, not the time zone where the user is currently located.

Example:
If the user’s time zone is set to UTC in their Whispir profile, messages are scheduled to be sent as per UTC, even if the user triggers the message while sitting in Singapore (+8). This is very important! Whispir doesn't honor the time zone the sender (or the message recipient) is located in. So ensure that any scheduled communication is sent at the appropriate/preferred time.

Note: Changing the user time zone after the message is triggered DOES NOT change the original scheduled time.

Bulk sending

Both of the scheduling types outlined above are also allowed in bulk messaging. You can upload a resource and trigger a bulk message to be sent using that resource at a scheduled time.

However, currently Whispir doesn't allow each message row inside the resource file to be sent at different times. They are all sent at once.

  • JSON
  • XML

Sending messages at a later date

ONCE

{{codeStart}}

HTTP 1.1 POST http://api.<region>.whispir.com/messages?apikey=<[your_api_key>

Authorization: Basic am9obi5zbWl0aDpteXBhc3N3b3Jk

x-api-key: your_api_key

Content-Type: application/vnd.whispir.message-v1+json

{

"to" : "john.smith@test.com",

"subject" : "Test scheduled email message",

"email" : {

"body" : "This is my scheduled content",

"type" : "text/plain"

},

"messageType" : "SCHEDULED",

"scheduleType" : "ONCE",

"scheduleDate" : "14/02/2019 15:55"

}

{{codeEnd}}

REPEAT

{{codeStart}}

HTTP 1.1 POST http://api.<region>.whispir.com/messages?apikey=<your_api_key>

Authorization: Basic am9obi5zbWl0aDpteXBhc3N3b3Jk

x-api-key: your_api_key

Content-Type: application/vnd.whispir.message-v1+json

{

"to" : "john.smith@test.com",

"subject" : "Test scheduled email message",

"email" : {

"body" : "This is my scheduled content",

"type" : "text/plain"

},

"messageType" : "SCHEDULED",

"scheduleType" : "REPEAT",

"scheduleDate" : "14/02/2019 15:55",

"repetitionCount" : "10",

"repeatDays" : "0",

"repeatHrs" : "1",

"repeatMin" : "0"

}

{{codeEnd}}