Subuser Invalid Emails
Retrieve Invalid Emails
URI Parameter | Required | Requirements | Description |
---|---|---|---|
task | Yes | Must be set to get |
Task to retrieve the invalid emails for the specified subuser |
user | Yes | Subuser must be under your account | The subuser retrieving invalid emails from |
date | No | 0 or 1 | Optional argument to retrieve the timestamps, in ISO-8601 format, Pacific Timezone: YYYY-MM-DD HH:MM:SS |
Call
POST | https://api.sendgrid.com/apiv2/customer.invalidemails.json |
POST Data | api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=subuser_username&task=get&date=1 |
Response
[
{
"email": "example@example.com",
"reason": "Mail domain mentioned in email address is unknown",
"created": "2009-06-01 19:41:39"
},
{
"email": "isaac@hotmail",
"reason": "Bad Syntax",
"created": "2009-06-01 19:41:39"
},
{
"email": "example@example.com",
"reason": "Known bad domain",
"created": "2009-06-01 19:41:39"
}
]
Call
POST | https://api.sendgrid.com/apiv2/customer.invalidemails.xml |
POST Data | api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=subuser_username&task=get&date=1 |
Response
<invalidemails>
<invalidemail>
<email>example@example.com</email>
<reason>Mail domain mentioned in email address is unknown</reason>
<created>2009-06-10 12:40:30</created>
</invalidemail>
<invalidemail>
<email>isaac@hotmail</email>
<reason>Bad Syntax</reason>
<created>2009-06-10 12:40:30</created>
</invalidemail>
<invalidemail>
<email>example@example.com</email>
<reason>Known bad domain</reason>
<created>2009-06-10 12:40:30</created>
</invalidemail>
</invalidemails>
Delete Invalid Emails
SendGrid drops messages to invalid emails. Users can remove invalid emails from their list at any time if they believe the address to now be valid.
URI Parameter | Required | Requirements | Description |
---|---|---|---|
task | Yes | Must be set to delete |
Task to remove the specified email from the invalid email list for the specified subuser |
user | Yes | Subuser must be under your account | The subuser to retrieve invalid emails from |
Yes | Must be a string | You must specify the invalid emails to remove |
Call
POST | https://api.sendgrid.com/apiv2/customer.invalidemails.json |
POST Data | api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=subuser_username&task=delete&email=invalidemail@example.com |
Response
{
"message": "success"
}
Call
POST | https://api.sendgrid.com/apiv2/customer.invalidemails.xml |
POST Data | api_user=your_sendgrid_username&api_key=your_sendgrid_password&user=subuser_username&task=delete&email=invalidemail@example.com |
Response
<result>
<message>success</message>
</result>
Need some help?
We all do sometimes. Get help now from the Twilio SendGrid Support Team.
Running into a coding hurdle? Lean on the wisdom of the crowd by browsing the SendGrid tag on Stack Overflow or visiting Twilio's Stack Overflow Collective.