This endpoint allows you to add, view, or remove scheduled delivery events for Marketing Emails.

If you wish to send a marketing email immediately, leave off the at and after parameters.

add

Schedule a delivery time for an existing Marketing Email.

Parameter Required Requirements Description
name Yes Must be an existing Marketing Email. Marketing Email to schedule delivery for. (If Marketing Email should be sent now, include no additional parameters.)
at No Date / Time must be provided in ISO 8601 format (YYYY-MM-DDTHH:MM:SS+-HH:MM) Date / Time to schedule marketing email Delivery.
after No Must be a positive integer. Number of minutes until delivery should occur.
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/api/newsletter/schedule/add.json
POST Data name=test&at=2013-12-20T11:55:00-05:00&api_user=your_sendgrid_username&api_key=your_sendgrid_password

Response

1
2
3
4
5
6
7
8
9
10
11
12
//success
{
  "message": "success"
}

//error
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Call

POST https://api.sendgrid.com/api/newsletter/schedule/add.xml
POST Data name=test&at=2013-12-20T11:55:00-05:00&api_user=your_sendgrid_username&api_key=your_sendgrid_password

Response

1
2
3
4
5
6
7
8
9
10
11
12
<?xml version="1.0" encoding="ISO-8859-1"?>

<result>
   <message>success</message>
</result>

<!-- error -->
<?xml version="1.0" encoding="ISO-8859-1"?>

<result>
   <message>error: reason</message>
</result>

get

Retrieve the scheduled delivery time for an existing Marketing Email.

Parameter Required Requirements Description
name Yes Must be an existing Marketing Email. Retrieve the delivery time scheduled for this Marketing Email.
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/api/newsletter/schedule/get.json
POST Data name=SendGrid_Test2&api_user=your_sendgrid_username&api_key=your_sendgrid_password

Response

1
2
3
4
5
6
7
8
9
10
11
12
//success
{
  "date": "2012-09-05 21:22:02"
}

//error
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Call

POST https://api.sendgrid.com/api/newsletter/schedule/get.xml
POST Data name=SendGrid_Test2&api_user=your_sendgrid_username&api_key=your_sendgrid_password

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?xml version="1.0" encoding="ISO-8859-1"?>

<result>
   <message>success</message>
</result>

<!-- error -->
<?xml version="1.0" encoding="ISO-8859-1"?>

<scheduled>
   <date>
    2012-09-05 21:22:02
  </date>
</scheduled>

delete

Cancel a scheduled send for a Marketing Email.

Parameter Required Requirements Description
name Yes Must be an existing Marketing Email Remove the scheduled delivery time from an existing Marketing Email.
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/api/newsletter/schedule/delete.json
POST Data name=test&api_user=your_sendgrid_username&api_key=your_sendgrid_password

Response

1
2
3
4
5
6
7
8
9
10
11
{
  "message": "success"
}

//error
{
  "message": "error",
  "errors": [
    "...error messages..."
  ]
}

Call

POST https://api.sendgrid.com/api/newsletter/schedule/delete.xml
POST Data name=test&api_user=your_sendgrid_username&api_key=your_sendgrid_password

Response

1
2
3
4
5
6
7
8
9
10
11
12
<?xml version="1.0" encoding="ISO-8859-1"?>

<result>
   <message>success</message>
</result>

<!-- error -->
<?xml version="1.0" encoding="ISO-8859-1"?>

<result>
   <message>error: reason</message>
</result>