Reveal

Reveal phones

Get phones and phone statuses for people.

Webhook result: Documentation

POST
/v2/reveal/phones

Request Body

application/jsonRequired
personIdsRequiredPersonids

List of Ocean person ids to fetch the phone data for. One phone credit will be charged for every verified phone found.

webhookUrlRequiredWebhookurl

Url of the webhook the phone data should be sent to, when completed.

Query Parameters

apiTokenstring | null | null

Header Parameters

x-api-tokenstring | null | null

Response Body

Successful Response

TypeScript Definitions

Use the response body type in TypeScript.

statusRequiredStatus

Status of the request. "in progress" if any phone has to be verified in the background. All the phone results are sent to the webhook once they are all done.

Value in: "in progress" | "webhook sent"

Bad Request

TypeScript Definitions

Use the response body type in TypeScript.

detailRequiredstring
Value in: "Conflicting API tokens provided in query parameters and headers"

Payment Required

TypeScript Definitions

Use the response body type in TypeScript.

detailRequiredstring
Value in: "Credits might be insufficient because of pending phone verifications. Please try again later." | "Insufficient phone credits"

Forbidden

TypeScript Definitions

Use the response body type in TypeScript.

detailRequiredstring
Value in: "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.

detailDetail
curl -X POST "https://api.ocean.io/v2/reveal/phones?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/phones?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/phones?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/phones?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 phone verifications. Please try again later."
}
{
  "detail": "API token should be provided in headers or query parameters"
}
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}