Skip to content

Bulk Email Validation

fkazakou edited this page Feb 15, 2017 · 6 revisions

Summary

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.

JSON Example

Request

POST /people/companies/{id}/bulkemailvalidation HTTP/1.1
Accept: application/vnd.huddle.data+xml
Authorization: OAuth2 frootymcnooty/vonbootycherooty
<workspaceId>123</workspaceId>
<emails>foo@bar.com</emails>
<emails>foo@something.com</emails>
<emails>someone@huddle.com</emails>

Response

HTTP/1.1 200 OK
Content-Type: application/xml
<valid>someone@huddle.com</valid>
<valid>another@huddle.com</valid>
<invalid>foobar.com</invalid>
<notwhitelist>foo@something.com</notwhitelist>

JSON Example

Request

POST /people/companies/{id}/bulkemailvalidation HTTP/1.1
Accept: application/vnd.huddle.data+json
Authorization: OAuth2 frootymcnooty/vonbootycherooty
{
    "workspaceId":"123",
    "emails":[
        "foo@bar.com",
        "foo@something.com",
        "someone@huddle.com"
    ]
}

Response

HTTP/1.1 200 OK
Content-Type: application/json
{
    "valid":[
           "someone@huddle.com",
           "another@huddle.com"
     ],
    "invalid":[
           "foobar.com" 
     ],
    "notwhitelist":[
            "foo@something.com" 
     ]
}

Other Responses

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

Classic
Clone this wiki locally