Reveal emails
Get emails and email statuses for people.
Webhook result: Documentation
Request Body
application/json
RequiredpersonIds
RequiredPersonidsList of Ocean person ids to fetch the email data for. One email credit will be charged for every verified email found.
webhookUrl
RequiredWebhookurlUrl of the webhook the email data should be sent to, when completed.
Query Parameters
apiToken
string | null | nullHeader Parameters
x-api-token
string | null | nullResponse Body
Successful Response
TypeScript Definitions
Use the response body type in TypeScript.
status
RequiredStatusStatus of the request. "in progress"
if any email has to be verified in the background. All the email results are sent to the webhook once they are all done.
"in progress" | "webhook sent"
Bad Request
TypeScript Definitions
Use the response body type in TypeScript.
detail
Requiredstring"Conflicting API tokens provided in query parameters and headers"
Payment Required
TypeScript Definitions
Use the response body type in TypeScript.
detail
Requiredstring"Credits might be insufficient because of pending email verifications. Please try again later." | "Insufficient email credits"
Forbidden
TypeScript Definitions
Use the response body type in TypeScript.
detail
Requiredstring"API token should be provided in headers or query parameters" | "Current API token is not registered in our database"
Not found
Validation Error
TypeScript Definitions
Use the response body type in TypeScript.
detail
Detailcurl -X POST "https://api.ocean.io/v2/reveal/emails?apiToken=string" \
-H "x-api-token: string" \
-H "Content-Type: application/json" \
-d '{
"personIds": [
"personId1",
"personId2"
],
"webhookUrl": "https://some-url.com"
}'
const body = JSON.stringify({
"personIds": [
"personId1",
"personId2"
],
"webhookUrl": "https://some-url.com"
})
fetch("https://api.ocean.io/v2/reveal/emails?apiToken=string", {
headers: {
"x-api-token": "string"
},
body
})
package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://api.ocean.io/v2/reveal/emails?apiToken=string"
body := strings.NewReader(`{
"personIds": [
"personId1",
"personId2"
],
"webhookUrl": "https://some-url.com"
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("x-api-token", "string")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://api.ocean.io/v2/reveal/emails?apiToken=string"
body = {
"personIds": [
"personId1",
"personId2"
],
"webhookUrl": "https://some-url.com"
}
response = requests.request("POST", url, json = body, headers = {
"x-api-token": "string",
"Content-Type": "application/json"
})
print(response.text)
{
"status": "in progress"
}
{
"detail": "Conflicting API tokens provided in query parameters and headers"
}
{
"detail": "Credits might be insufficient because of pending email verifications. Please try again later."
}
{
"detail": "API token should be provided in headers or query parameters"
}
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}