This endpoint allows you to add, view, or remove marketing emails.

add

Create a new Marketing Email.

Parameter Required Requirements Description
identity Yes Must be an existing Identity The Identity (Sender Address) that will be used for the Marketing Email being created.
name Yes None The name that will be used for the Marketing Email being created.
subject Yes None The subject that will be used for the Marketing Email being created.
text Yes None The text portion of the Marketing Email being created.
html Yes None The html portion of the Marketing Email being created.
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/api/newsletter/add.json
POST Data identity=Sender_Address&name=SendGrid_Test&subject=testsubject&text=testtextbody&html=%3Chtml%3E%3Cp%3Etest_html_body%3C%2Fp%3E%3C%2Fhtml%3E&api_user=your_sendgrid_username&api_key=your_sendgrid_password

Response

1
2
3
{
  "message": "success"
}

Call

POST https://api.sendgrid.com/api/newsletter/add.xml
POST Data identity=Sender_Address&name=SendGrid_Test&subject=testsubject&text=testtextbody&html=%3Chtml%3E%3Cp%3Etest_html_body%3C%2Fp%3E%3C%2Fhtml%3E&api_user=your_sendgrid_username&api_key=your_sendgrid_password

Response

1
2
3
<result>
   <message>success</message>
</result>

edit

Edit an existing Marketing Email.

Parameter Required Requirements Description
identity Yes Must be an existing Identity The Identity (Sender Address) that will be used for the Marketing Email being created.
name Yes None The name that will be used for the Marketing Email.
newname No None The new name that will be used for the Marketing Email.
subject Yes None The subject that will be used for the Marketing Email.
text Yes None The text portion of the Marketing Email.
html Yes None The html portion of the Marketing Email.
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/api/newsletter/edit.json
POST Data identity=Sender_Address&name=SendGrid_Edit_Test&newname=new_name_test&subject=test_subject&text=test_text&html=%3Chtml%3E%3Cp%3ETest_html_text%3C%2Fp%3E%3C%2Fhtml%3E&api_user=your_sendgrid_username&api_key=your_sendgrid_password

Response

1
2
3
{
  "message": "success"
}

Call

POST https://api.sendgrid.com/api/newsletter/edit.xml
POST Data identity=Sender_Address&name=SendGrid_Edit_Test&newname=new_name_test&subject=test_subject&text=test_text&html=%3Chtml%3E%3Cp%3ETest_html_text%3C%2Fp%3E%3C%2Fhtml%3E&api_user=your_sendgrid_username&api_key=your_sendgrid_password

Response

1
2
3
<result>
   <message>success</message>
</result>

get

Retrieve the contents of an existing Marketing Email.

Parameter Required Requirements Description
name Yes Must be an existing Marketing Email Retrieve the content of an existing Marketing Email.
Parameter Value Requirements Description

Call

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

Response

1
2
3
4
5
6
7
8
9
10
11
12
{
  "can_edit": true,
  "name": "SendGrid NL Test",
  "text": null,
  "newsletter_id": 38074,
  "total_recipients": 1,
  "html": null,
  "type": "html",
  "date_schedule": null,
  "identity": "d22de3a53fac1abef944c80c19032c2c",
  "subject": null
}

Call

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

Response

1
2
3
4
5
6
7
8
9
10
11
<newsletter>
   <can_edit>True</can_edit>
   <name>SendGrid NL Test</name>
   <text/>
   <newsletter_id>38074</newsletter_id>
   <total_recipients>1</total_recipients>
   <type>html</type>
   <date_schedule/>
   <identity>d22de3a53fac1abef944c80c19032c2c</identity>
   <subject/>
</newsletter>

list

Retrieve a list of all existing Marketing Email.

Parameter Required Requirements Description
name No Must be an existing Marketing Email Search to see if a specific Marketing Email exists rather than a list of all Marketing Emails.
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/api/newsletter/list.json
POST Data name=SendGrid_Test&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
15
16
17
18
[
  {
    "name": "Just Testing",
    "newsletter_id": 560308
  },
  {
    "name": "LSRC",
    "newsletter_id": 560869
  },
  {
    "name": "LSRC test",
    "newsletter_id": 560908
  },
  {
    "name": "Test",
    "newsletter_id": 38074
  }
]

Call

POST https://api.sendgrid.com/api/newsletter/list.xml
POST Data name=SendGrid_Test&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
15
16
17
18
<newsletters>
   <newsletter>
      <name>Just Testing</name>
      <newsletter_id>560308</newsletter_id>
   </newsletter>
   <newsletter>
      <name>LSRC</name>
      <newsletter_id>560869</newsletter_id>
   </newsletter>
   <newsletter>
      <name>LSRC test</name>
      <newsletter_id>560908</newsletter_id>
   </newsletter>
   <newsletter>
      <name>Test</name>
      <newsletter_id>38074</newsletter_id>
   </newsletter>
</newsletters>

delete

Remove an existing Marketing Email.

Parameter Required Requirements Description
name Yes Must be an existing Marketing Email Remove the Marketing Email with this name.
Parameter Value Requirements Description

Call

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

Response

1
2
3
{
  "message": "success"
}

Call

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

Response

1
2
3
<result>
   <message>success</message>
</result>