post /v2/enrich/people

Enrich people

Match people with our database and enrich it with additional information.

Webhook result: Documentation


Endpoint POST /v2/enrich/people
Credit cost 0.1 credits / result
Response Asynchronous — results delivered to your webhook
Max per request 10,000 people

Quickstart#

curl -X POST "https://api.ocean.io/v2/enrich/people" \
  -H "X-Api-Token: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "peopleDataMapping": {
      "contact-001": { "person": { "linkedin": "linkedin.com/in/jane-doe-123" } },
      "contact-002": {
        "person": { "firstName": "John", "lastName": "Smith", "jobTitle": "CTO" },
        "company": { "domain": "acme.com" }
      },
      "contact-003": { "person": { "id": "ocean-person-id-abc" } }
    },
    "webhookUrl": "https://yourapp.com/webhooks/ocean-people"
  }'
import requests

response = requests.post(
    'https://api.ocean.io/v2/enrich/people',
    headers={'X-Api-Token': 'YOUR_API_TOKEN'},
    json={
        'peopleDataMapping': {
            'contact-001': {'person': {'linkedin': 'linkedin.com/in/jane-doe-123'}},
            'contact-002': {
                'person': {'firstName': 'John', 'lastName': 'Smith', 'jobTitle': 'CTO'},
                'company': {'domain': 'acme.com'},
            },
            'contact-003': {'person': {'id': 'ocean-person-id-abc'}},
        },
        'webhookUrl': 'https://yourapp.com/webhooks/ocean-people',
    },
)
data = response.json()  # {"status": "in progress"} — results arrive at your webhook
const response = await fetch('https://api.ocean.io/v2/enrich/people', {
  method: 'POST',
  headers: { 'X-Api-Token': 'YOUR_API_TOKEN', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    peopleDataMapping: {
      'contact-001': { person: { linkedin: 'linkedin.com/in/jane-doe-123' } },
      'contact-002': {
        person: { firstName: 'John', lastName: 'Smith', jobTitle: 'CTO' },
        company: { domain: 'acme.com' },
      },
      'contact-003': { person: { id: 'ocean-person-id-abc' } },
    },
    webhookUrl: 'https://yourapp.com/webhooks/ocean-people',
  }),
});
const data = await response.json(); // {"status": "in progress"} — results arrive at your webhook

Immediate response:

{ "status": "in progress" }

Webhook payload:

{
  "results": {
    "contact-001": {
      "status": "found",
      "person": { "id": "abc123", "name": "Jane Doe", "jobTitle": "Head of Product" }
    },
    "contact-002": { "status": "not_found", "person": null }
  }
}

Authorizations

apiToken string
x-api-token string

Body application/json

A dictionary where each key is a unique user-defined ID for a person, and each value is the data for that person to be enriched. This ID will be included in the webhook response together with the enriched person data, allowing the user to match the response to the original request.
object
webhookUrl string Required
Url of the webhook the enriched people should be sent to, when completed.

Responses

200 Successful Response
status const Required
Status of the enrichment request. Always `"in progress"` initially, as enrichment is processed asynchronously in the background. Once completed, results for all people will be sent to the provided webhook.
400 Bad Request
detail enum Required
"Conflicting API tokens provided in query parameters and headers"
402 Payment Required
detail enum Required
"Insufficient credits"
403 Forbidden
detail enum Required
"API token should be provided in headers or query parameters""Current API token is not registered in our database"
404 Not found
422 Validation Error
Array of ValidationError
Array of string | integer
string | integer
msg string Required
type string Required
input any
object

FAQs#

How do I get emails for the enriched people?

Batch enrichment does not include email reveal. Once you have the enriched profiles with their id values, pass those to Reveal Emails.

Can I mix identifier types in the same batch?

Yes. Each entry is independent — some can have linkedin, others name + company.domain, others an Ocean ID. Costs are calculated per record based on the identifiers provided.