...
Operation | Description |
---|---|
addSchedule | Schedule a delivery time for an existing Marketing Email. |
Retrieve the scheduled delivery time for an existing Marketing Email. | |
deleteSchedule | Cancel a scheduled send for a Marketing Email. |
Operation details
This section provides details on the operations.
Adding a Schedule Anchor Adding a Schedule Adding a Schedule
The addSchedule operation schedules a delivery time for an existing Marketing Email.
...
after: Number of minutes until delivery should occur.
Code Block | ||||
---|---|---|---|---|
| ||||
{
"apiUrl":"https://api.sendgrid.com/api/newsletter",
"apiUser":"UserName",
"apiKey":"PassWord",
"name":"test"
} |
Retrieves a schedule. Anchor Retrieves a schedule. Retrieves a schedule.
The getSchedule operation retrieves the scheduled delivery time for an existing Marketing Email.
...
name: Required - Retrieve the delivery time scheduled for this Marketing Email.
Code Block | ||||
---|---|---|---|---|
| ||||
{
"apiUrl":"https://api.sendgrid.com/api/newsletter",
"apiUser":"UserName",
"apiKey":"PassWord",
"name":"test"
} |
Delete a schedule Anchor Delete a schedule Delete a schedule
The deleteSchedule operation cancels a scheduled send for a Marketing Email.
...
name: required - Remove the scheduled delivery time from an existing Marketing Email.
Code Block | ||||
---|---|---|---|---|
|
...
| |
{
"apiUrl":"https://api.sendgrid.com/api/newsletter",
"apiUser":"UserName",
"apiKey":"PassWord",
"name":"test"
} |
Sample configuration
Following is a sample proxy service that illustrates how to connect to SendGrid with the init
operation and use the getSchedule operation. You can use this sample as a template for using other operations in this category.
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="sendgrid_getSchedule" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="apiUser" expression="json-eval($.apiUser)"/> <property name="apiKey" expression="json-eval($.apiKey)"/> <property name="listname" expression="json-eval($.list)"/> <property name="email" expression="json-eval($.email)"/> <property name="unsubscribed" expression="json-eval($.unsubscribed)"/> <sendgrid.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiUser>{$ctx:apiUser}</apiUser> <apiKey>{$ctx:apiKey}</apiKey> </sendgrid.init> <sendgrid.getSchedule> <name>{$ctx:name}</name> </sendgrid.getSchedule> <respond/> </inSequence> <outSequence> <log/> <send/> </outSequence> </target> <description/> </proxy> |
...