This endpoint allows you to manage and create Sender Addresses (formerly Identities) associated with the Newsletter 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
1
http://sendgrid.com/api/newsletter/identity/add.json?identity=Sender_Address1&name=Grant&email=grant.hull%40sendgrid.com&address=929v1_(deprecated)Pearlv1_(deprecated)Stree&city=Boulder&state=Colorado&zip=80302&country=US&api_user=SGusername&api_key=SGpassword
Response: Success
1
2
3
{
"message" : "success"
}
Response: Error
1
2
3
4
5
6
{
"message" : "error" ,
"errors" : [
"...error messages..."
]
}
Call
1
http://sendgrid.com/api/newsletter/identity/add.xml?identity=Sender_Address1&name=Grant&email=grant.hull%40sendgrid.com&address=929v1_(deprecated)Pearlv1_(deprecated)Stree&city=Boulder&state=Colorado&zip=80302&country=US&api_user=SGusername&api_key=SGpassword
Response: Success
1
2
3
4
5
<?xml version="1.0" encoding="ISO-8859-1"?>
<result>
<message> success</message>
</result>
Response: Error
1
2
3
4
5
<?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
1
http://sendgrid.com/api/newsletter/identity/edit.json?identity=Sender_Address2&newidentity=Sender_Address3&name=Grant&email=grant.hull%40sendgrid.com&address=929v1_(deprecated)Pearlv1_(deprecated)Street&city=Boulder&state=Colorado&zip=80302&country=US&api_user=SGusername&api_key=SGpassword
Response: Success
1
2
3
{
"message" : "success"
}
Response: Error
1
2
3
4
5
6
{
"message" : "error" ,
"errors" : [
"...error messages..."
]
}
Call
1
http://sendgrid.com/api/newsletter/identity/edit.xml?identity=Sender_Address2&newidentity=Sender_Address3&name=Grant&email=grant.hull%40sendgrid.com&address=929v1_(deprecated)Pearlv1_(deprecated)Street&city=Boulder&state=Colorado&zip=80302&country=US&api_user=SGusername&api_key=SGpassword
Response: Success
1
2
3
4
5
<?xml version="1.0" encoding="ISO-8859-1"?>
<result>
<message> success</message>
</result>
Response: Error
1
2
3
4
5
<?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
1
http://sendgrid.com/api/newsletter/identity/get.json?identity=Sender_Address&api_user=SGusername&api_key=SGpassword
Response: Success
1
2
3
4
5
6
7
8
9
10
11
{
"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 "
}
Response: Error
1
2
3
4
5
6
{
"message" : "error" ,
"errors" : [
"...error messages..."
]
}
Call
1
http://sendgrid.com/api/newsletter/identity/get.xml?identity=Sender_Address&api_user=SGusername&api_key=SGpassword
Response: Success
1
2
3
4
5
6
7
8
9
10
11
12
13
<?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>
Response: Error
1
2
3
4
5
<?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
1
http://sendgrid.com/api/newsletter/identity/list.json?identity=Sender_Address4&api_user=SGusername&api_key=SGpassword
Response: Success
1
2
3
4
5
[
{
"identity" : "Sender_Address4"
}
]
Response: Error
1
2
3
4
5
6
{
"message" : "error" ,
"errors" : [
"...error messages..."
]
}
Call
1
http://sendgrid.com/api/newsletter/identity/list.xml?identity=Sender_Address4&api_user=SGusername&api_key=SGpassword
Response: Success
1
2
3
4
5
<?xml version="1.0" encoding="ISO-8859-1"?>
<result>
<message> success</message>
</result>
Response: Error
1
2
3
4
5
6
7
<?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
1
http://sendgrid.com/api/newsletter/identity/delete.json?identity=Sender_Address4&api_user=SGusername&api_key=SGpassword
Response: Success
1
2
3
{
"message" : "success"
}
Response: Error
1
2
3
4
5
6
{
"message" : "error" ,
"errors" : [
"...error messages..."
]
}
Call
1
http://sendgrid.com/api/newsletter/identity/delete.xml?identity=Sender_Address4&api_user=SGusername&api_key=SGpassword
Response: Success
1
2
3
4
5
<?xml version="1.0" encoding="ISO-8859-1"?>
<result>
<message> success</message>
</result>
Response: Error
1
2
3
4
5
<?xml version="1.0" encoding="ISO-8859-1"?>
<result>
<message> error: reason</message>
</result>