Bulk Email Validation - Huddle/huddle-apis GitHub Wiki
The Bulk Email Validation API validates a given list of emails for a given workspace in a company, and creates a valid, an invalid and a whitelisted list from these emails.
POST /people/companies/{id}/bulkemailvalidation HTTP/1.1
Accept: application/vnd.huddle.data+xml
Authorization: OAuth2 frootymcnooty/vonbootycherooty
<workspaceId>123</workspaceId>
<emails>[email protected]</emails>
<emails>[email protected]</emails>
<emails>[email protected]</emails>
HTTP/1.1 200 OK
Content-Type: application/xml
<valid>[email protected]</valid>
<valid>[email protected]</valid>
<invalid>foobar.com</invalid>
<notwhitelist>[email protected]</notwhitelist>
POST /people/companies/{id}/bulkemailvalidation HTTP/1.1
Accept: application/vnd.huddle.data+json
Authorization: OAuth2 frootymcnooty/vonbootycherooty
{
"workspaceId":"123",
"emails":[
"[email protected]",
"[email protected]",
"[email protected]"
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"valid":[
"[email protected]",
"[email protected]"
],
"invalid":[
"foobar.com"
],
"notwhitelist":[
"[email protected]"
]
}
Case | Response |
---|---|
401 Unauthorized | Invalid authorization token |
400 Bad request | Invalid request body/ Exceeds the accepted emails limit |
404 Not Found | User doesn't belong to company/workspace |