Skip to main content
POST
Enrich a single contact
Enqueue a single contact for waterfall enrichment. The endpoint returns immediately with an enrichment_id and status: "pending"; the waterfall runs asynchronously in the background. The Location header, also returned as status_url, is where the result will be.

When to use this endpoint

Use the async endpoint when:
  • You can accept results via webhook, or you can poll for them later.
  • You’re enriching at scale and don’t want to hold an HTTP connection per contact.
  • You want to retain the enrichment result on the contact record for later retrieval via GET /contacts/{id}.

Enrichment Types

Pass enrichment_type as an array with any combination of:
  • "email" — Find and validate the professional email
  • "phone" — Find phone numbers (requires linkedin_url)
  • "personal_email" — Find a personal email (requires linkedin_url and account-level consent — see below)
For example ["email"], or ["email", "phone"] to run both in one request.
Requesting personal_email requires the authenticated user to have consented to personal email enrichment in their account settings. If consent is missing, the API responds with 422 Unprocessable Entity and the message "You can't use the personal email enrichment feature without consenting with our terms of use". This consent gate is required for GDPR compliance.

Required Fields

enrichment_type is always required. To identify the contact, send either:
  • linkedin_url — enough on its own for every enrichment type, or
  • firstname + lastname and domain or company_name — only for email.
Phone and personal email enrichment need the linkedin_url.

Phone type filter

When enrichment_type includes phone, pass phone_type to choose which numbers come back: With ["mobile"], the waterfall keeps querying providers until one returns a mobile number — a provider that only has a landline doesn’t stop the search. Landlines, VoIP, toll-free and other non-mobile numbers are dropped from both phone and phone_details. If only non-mobile numbers were found, phone is an empty array. phone_type combines with phone_country_codes (both filters apply). Any other value is rejected with 422 Unprocessable Entity: {"error": "phone_type must be [\"all\"] or [\"mobile\"]"}.

Phone types

Results on GET /contacts/{id} and on the webhook callback list every number in phone_details with its line type:
phone keeps returning the plain list of E.164 numbers for existing integrations; phone_details holds the same numbers in the same order.

Number format

Numbers are in E.164 format, with no spaces ("+33622222222"). A number your workspace has suppressed is returned as the literal string "Contacts not shared", in both phone (phones on the webhook) and phone_details[].number.

Do Not Call screening

When your workspace has DNC screening enabled, each US number in phone_details also carries:

Receiving results

You have two options:
  1. Webhook — pass webhook_url in the request. We POST the final result to that URL once the waterfall completes. The body is close to the GET /contacts/{id} response, with three differences: status is "completed", phone numbers are under phones (not phone), and it adds the company domain:
    If the enrichment stops because your credit balance or the workspace weekly credit limit runs out while it is running, the webhook receives a failure instead, without any contact data. code is insufficient_credits or workspace_limit_exceeded, and custom is only present when you sent it:
    Branch on status: completed or failed.
  2. Polling — call the URL in the Location header, GET /contacts/{id} with the returned enrichment_id. While the waterfall is running the status is pending. It flips to finished once every requested enrichment type has completed, with or without data, or to failed when credits ran out; a failed result carries the same code as the failure webhook. Stop polling on either. To retry a failed enrichment, top up (or have the weekly limit raised) and send a new request.

Custom Fields

Pass custom: { ... } in the request to attach arbitrary correlation data (e.g. your CRM record ID). The same payload is echoed back on GET /contacts/{id} and on the webhook callback.

Pricing

Each enrichment consumes credits based on the requested enrichment_type and the providers used. A phone enrichment is only charged when a mobile number (mobile or fixed_or_mobile) is found. Check your account credits via the Account Credits endpoint. Credits are checked before the contact is enqueued. If your balance cannot cover the enrichment the request is rejected with 402 Payment Required and code: "insufficient_credits" (the response carries a top_up_url); if it would exceed your workspace weekly credit limit, with 403 Forbidden and code: "workspace_limit_exceeded". Nothing is enqueued in either case. See Credit and limit errors.

Authorizations

X-API-KEY
string
header
required

Your API key

Headers

Idempotency-Key
string

A unique value you generate per operation, such as a UUID. Retrying with the same key and the same body returns the stored response instead of running the request again, so a retry after a timeout never charges twice. Successful responses are kept for 24 hours; a failed request is not stored and can be retried with the same key.

Maximum string length: 255
Example:

"4f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11"

Body

application/json

Contact information for enrichment

Send linkedin_url, or firstname + lastname with domain or company_name. A linkedin_url alone is enough for every enrichment type; without it, only email can run.

enrichment_type
enum<string>[]
required

What to look for: any combination of email, phone and personal_email, e.g. ["email"] or ["email", "phone"]. phone and personal_email need linkedin_url; personal_email also needs account-level GDPR consent.

Required array length: 1 - 3 elements
Available options:
email,
phone,
personal_email
linkedin_url
string<uri>
required

LinkedIn profile URL of the contact.

Example:

"https://www.linkedin.com/in/mathieu-brun-picard/"

firstname
string

First name of the contact.

lastname
string

Last name of the contact.

domain
string

Company domain.

Example:

"pipecorn.com"

company_name
string

Company name.

Example:

"Pipecorn"

webhook_url
string<uri>

Webhook URL to receive enrichment results

phone_country_codes
string[]

Optional. Restrict phone enrichment to phone numbers from these countries. When omitted, the user's account-level default phone country codes are applied.

ISO 3166-1 alpha-2 country code (e.g. "US", "FR", "GB")

phone_type
enum<string>[]

Optional. Filters the phone numbers returned by phone enrichment. ["all"] (default) returns every number found; ["mobile"] returns only mobile numbers (type of mobile or fixed_or_mobile) and drops landlines, VoIP, toll-free and other non-mobile numbers. With ["mobile"] the waterfall keeps querying providers until one returns a mobile number. Any other value is rejected with 422. Ignored unless enrichment_type includes phone.

Maximum array length: 1
Available options:
all,
mobile
custom
object

Custom fields to include with the enrichment that will be returned in the webhook (like crm id, etc.)

Response

Enrichment request accepted. The waterfall runs asynchronously: poll the URL in the Location header (GET /contacts/{id}, using the returned enrichment_id) or wait for the webhook_url callback. The callback body is close to, but not the same as, the GET /contacts/{id} response: it carries status: "completed", phone numbers under phones (not phone), and the company domain. If the enrichment stops because credits run out, the callback is {"enrichment_id", "first_name", "last_name", "status": "failed", "code": "insufficient_credits" | "workspace_limit_exceeded", "custom"} instead (custom only when you sent it).

enrichment_id
string<uuid>

The ID of the enrichment request. Use it to poll GET /contacts/{id}.

first_name
string

The contact's first name

last_name
string

The contact's last name

status
enum<string>

Always pending on creation; the waterfall runs asynchronously.

Available options:
pending
custom
object

Custom fields passed in the request

status_url
string<uri>

Where to poll the result: GET /contacts/{id}. Same value as the Location header.

Example:

"https://app.pipecorn.com/api/v2/contacts/123e4567-e89b-12d3-a456-426614174000"