This endpoint allows you to manage and create Sender Addresses (formerly Identities) associated with the Marketing Email feature.

add

Create a new Address.

Parameter Required Requirements Description
Identity Yes None Create an Address named this.
name Yes None Specify the name to be used for this Address.
email Yes Email address format, complying with RFC 5322 Specify the email address to be used for this Address.
replyto No Email address format, complying with RFC 5322 Specify an email address to be used in the Reply-To field. If not defined, will default to the email parameter.
address Yes None Specify the physical address to be used for this Address.
city Yes None Specify the city to be used for this Address.
state Yes None Specify the state code to be used for this Address.
zip Yes None Specify the zip code to be used for this Address.
country Yes None Specify the country code to be used for this Address.

Call

POST https://api.sendgrid.com/api/newsletter/identity/add.json
POST Data identity=Sender_Address1&name=Grant&email=grant.hull%40sendgrid.com&address=929_Pearl_Stree&city=Boulder&state=Colorado&zip=80302&country=US&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/identity/add.xml
POST Data identity=Sender_Address1&name=Grant&email=grant.hull%40sendgrid.com&address=929_Pearl_Stree&city=Boulder&state=Colorado&zip=80302&country=US&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>

edit

Edit an existing Address.

Parameter Required Requirements Description
Identity Yes Must be an existing Address. The Address you wish to edit.
newidentity No None Specify the new name to be used for this Address.
name No None Specify the new name to be used for this Address.
email Yes Email address format, complying with RFC 5322 Specify the email address to be used for this Address.
replyto No Email address format, complying with RFC 5322 Specify an email address to be used in the Reply-To field. If not defined, will default to the email parameter.
address No None Specify the new physical address to be used for this Address.
city No None Specify the new city to be used for this Address.
state No None Specify the new state code to be used for this Address.
zip No None Specify the new zip code to be used for this Address.
country No None Specify the new country code to be used for this Address.

Call

POST https://api.sendgrid.com/api/newsletter/identity/edit.json
POST Data identity=Sender_Address2&newidentity=Sender_Address3&name=Grant&email=grant.hull%40sendgrid.com&address=929_Pearl_Street&city=Boulder&state=Colorado&zip=80302&country=US&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/identity/edit.xml
POST Data identity=Sender_Address2&newidentity=Sender_Address3&name=Grant&email=grant.hull%40sendgrid.com&address=929_Pearl_Street&city=Boulder&state=Colorado&zip=80302&country=US&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 information associated with a particular Address.

Parameter Required Requirements Description
identity Yes Must be an existing Address. Retrieve contents of the specified Address.

Call

POST https://api.sendgrid.com/api/newsletter/identity/get.json
POST Data identity=Sender_Address&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
19
20
//success
{
  "city": "Boulder",
  "name": "Name",
  "zip": "80302",
  "replyto": "Email Address",
  "country": "US",
  "state": "CO",
  "address": "929 Pearl Street ste 200 ",
  "email": "example@sendgrid.com",
  "identity": "Sender_Address "
}

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

Call

POST https://api.sendgrid.com/api/newsletter/identity/get.xml
POST Data identity=Sender_Address&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
19
20
<?xml version="1.0" encoding="ISO-8859-1"?>

<identity>
   <city>Boulder</city>
   <name>Example Name</name>
   <zip>80302</zip>
   <replyto>example@sendgrid.com</replyto>
   <country>US</country>
   <state>CO</state>
   <address>929 Pearl Street ste 200 </address>
   <email>example@sendgrid.com</email>
   <identity>Sender_Address </identity>
</identity>

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

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

list

List all Addresses on your account, or check if a particular Address exists.

Parameter Required Requirements Description
identity No Must be an existing Address. Check for this particular Identity. (To list all Addresses on your account exclude this parameter)

Call

POST https://api.sendgrid.com/api/newsletter/identity/list.json
POST Data identity=Sender_Address4&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
//success
[
  {
    "identity": "Sender_Address4"
  }
]

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

Call

POST https://api.sendgrid.com/api/newsletter/identity/list.xml
POST Data identity=Sender_Address4&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"?>

<identities>
   <identity>
      <identity>Sender_Address4</identity>
   </identity>
</identities>

delete

Remove an Address from your account.

Parameter Required Requirements Description
identity Yes Must be an existing Address. Remove the specified Address from your account.

Call

POST https://api.sendgrid.com/api/newsletter/identity/delete.json
POST Data identity=Sender_Address4&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/identity/delete.xml
POST Data identity=Sender_Address4&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>