External API docs

Enrich known people

Submit an async batch to enrich a list of known people (names + optional LinkedIn) for a company domain. Returns email and/or phone per person.

Overview

Use this endpoint when you already know who you want to enrich and just need their contact info. You provide one or more people (name, optional LinkedIn URL) scoped to a company domain; the workflow returns their email, phone, or both.

If you don't know the specific people yet and want to discover decision makers by title, use find decision makers instead.

Before you start

Make sure you have:

  • an Openmart account
  • an API key
  • a tool to send API requests, such as Postman or curl

Authentication: send your key in the X-API-Key header. Authorization: Bearer <key> is also accepted.

Submission latency. Every request to this route sleeps for about 26 seconds before the server processes it (including when the body is invalid). This is a deliberate throttle for downstream concurrency. Make sure your client timeout is at least 60 seconds.

This is an asynchronous workflow. After submit, follow: check batch status, get task IDs, then get task results.

1

Submit a batch of people lookups

Endpoint
POST https://api.openmart.ai/api/v1/task/batch/lookup_people

Parameters

Parameter
domain
Type
string
Required
Yes
Example
"bluebottlecoffee.com"
Description
Company root domain where the people work.
Parameter
company_name
Type
string
Required
No
Example
"Blue Bottle"
Description
Optional human-readable company name. Improves resolution when the domain is ambiguous.
Parameter
people
Type
array[object]
Required
Yes
Example
[{"first_name":"Jane","last_name":"Doe"}]
Description
Known people to enrich. 1 to 8 entries per task. Each needs first_name and last_name; linkedin_url is optional and helps disambiguation.
Parameter
info_access
Type
array[string]
Required
No
Example
["EMAIL","PHONE"]
Description
Which contact fields to return. Allowed values: EMAIL, PHONE. Default: ["EMAIL","PHONE"] (both).
Parameter
tracking_id
Type
string
Required
No
Example
"bluebottle-jane"
Description
Your correlation ID. Echoed back on task read.

cURL request

cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/task/batch/lookup_people \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '[
    {
      "domain": "bluebottlecoffee.com",
      "company_name": "Blue Bottle",
      "city": "Oakland",
      "state": "CA",
      "country": "US",
      "info_access": ["EMAIL", "PHONE"],
      "people": [
        {
          "first_name": "Jane",
          "last_name": "Doe",
          "linkedin_url": "https://www.linkedin.com/in/jane-doe/"
        }
      ],
      "tracking_id": "bluebottle-jane"
    }
  ]'

Submission response

JSON
{
  "batch_id": "2fc8b627-1111-2222-3333-123456789abc",
  "submit_for": "lookup_people",
  "status": {
    "processing": 1,
    "completed": 0,
    "errored": 0,
    "total": 1,
    "batch_ready": false
  }
}
Response element
batch_id
Description
UUID for the submitted batch. Use this with the polling endpoints.
Response element
submit_for
Description
Task type echoed back. Either "lookup_people" or "lookup_business_email" (depending on which endpoint you called).
Response element
status.processing / completed / errored / total
Description
Per-task counts. On submit, everything starts in processing.
Response element
status.batch_ready
Description
true once processing == 0. Keep polling GET /api/v1/task/batch/{batch_id}/status until this flips to true.

Per-task result (via GET /api/v1/task/{task_id})

Once the batch is ready, fetching each task ID returns:

JSON
{
  "task_id": "2fc8b627-aaaa-bbbb-cccc-00112233aabb",
  "status": "COMPLETED",
  "tracking_id": "bluebottle-jane",
  "data": [
    {
      "first_name": "Jane",
      "last_name": "Doe",
      "linkedin_url": "https://www.linkedin.com/in/jane-doe/",
      "email": {
        "email": "jane@bluebottlecoffee.com",
        "verified": true
      },
      "phones": [
        {
          "phone_number": "+14155550123",
          "line_type": "MOBILE",
          "valid": true,
          "confidence_grade": "A"
        }
      ]
    }
  ]
}

data is an array of PeopleInfo records (first_name, last_name, linkedin_url, email, phones).

After submission: get your results

Submission just enqueues the batch. To retrieve results:

  1. Poll GET /api/v1/task/batch/{batch_id}/status until batch_ready is true.
  2. Call GET /api/v1/task/batch/{batch_id}/task_ids?status=COMPLETED to list task IDs that finished.
  3. For each task ID, call GET /api/v1/task/{task_id} to read data — the task-specific result payload.

All request parameters

Request body is a JSON array of 1–100 task objects for POST /api/v1/task/batch/lookup_people. Batch-size errors return 400 with {"detail":"the number of tasks in each batch should be between 1 and 100"}.

Per-task fields

Each item in the batch array is one task. Submit 1 to 100 tasks per request.

domainstringRequired: Yes
Example: "bluebottlecoffee.com"

Company root domain. Missing → 400 detail:"Domain is required".

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/task/batch/lookup_people \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '[{"domain":"bluebottlecoffee.com","people":[{"first_name":"Jane","last_name":"Doe"}]}]'
company_namestringRequired: No
Example: "Blue Bottle"

Optional human-readable company name.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/task/batch/lookup_people \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '[{"domain":"bluebottlecoffee.com","company_name":"Blue Bottle","people":[{"first_name":"Jane","last_name":"Doe"}]}]'
city / state / countrystringRequired: No
Example: "Oakland" / "CA" / "US"

Optional company-location narrowing.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/task/batch/lookup_people \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '[{"domain":"bluebottlecoffee.com","city":"Oakland","state":"CA","country":"US","people":[{"first_name":"Jane","last_name":"Doe"}]}]'
info_accessarray[string]Required: No
Example: ["EMAIL","PHONE"]

Subset of contact fields to return. Each element must be "EMAIL" or "PHONE". Default (when omitted) is both.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/task/batch/lookup_people \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '[{"domain":"bluebottlecoffee.com","info_access":["EMAIL"],"people":[{"first_name":"Jane","last_name":"Doe"}]}]'
peoplearray[object]Required: Yes
Example: [{"first_name":"Jane","last_name":"Doe"}]

Known people to enrich. 1 to 8 entries per task (validator tag min=1,max=8). Each entry requires first_name and last_name; linkedin_url is optional and improves match quality.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/task/batch/lookup_people \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '[{"domain":"bluebottlecoffee.com","people":[{"first_name":"Jane","last_name":"Doe","linkedin_url":"https://www.linkedin.com/in/jane-doe/"}]}]'
tracking_idstringRequired: No
Example: "bluebottle-jane"

Caller-supplied correlation ID. Echoed back on task read.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/task/batch/lookup_people \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '[{"domain":"bluebottlecoffee.com","people":[{"first_name":"Jane","last_name":"Doe"}],"tracking_id":"bluebottle-jane"}]'
notify_urlstring (URL)Required: No
Example: "https://your.webhook/endpoint"

Optional webhook URL. Must be a valid URL when present (validator tag omitempty,url).

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/task/batch/lookup_people \
  --header 'Accept: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '[{"domain":"bluebottlecoffee.com","people":[{"first_name":"Jane","last_name":"Doe"}],"notify_url":"https://your.webhook/endpoint"}]'
# Enrich Known People

## Endpoint

POST https://api.openmart.ai/api/v1/task/batch/lookup_people

## Description

Submit an async batch to enrich KNOWN people (name + optional
LinkedIn) for a company domain. Returns email and/or phone per person.
If you don't know the specific people yet and want to discover them by
title, use find_people instead.

## Authentication

- `X-API-Key: <your_api_key>` (recommended)
- `Authorization: Bearer <your_api_key>` (also accepted)

## Latency

This route sleeps ~26 seconds before the handler runs, even when the
body is invalid. Use a client timeout of at least 60s.

## Request body

JSON array of 1–100 task objects. Per-task fields:

- `domain` — required, company root domain.
- `company_name` — optional, improves resolution.
- `city`, `state`, `country` — optional, narrow when company names clash.
- `info_access` — optional array of `"EMAIL"` and/or `"PHONE"`.
  Default when omitted: both.
- `people` — required, 1–8 entries. Each is
  `{ "first_name": "...", "last_name": "...", "linkedin_url": "..." }`.
  LinkedIn URL is optional but improves match quality.
- `tracking_id` — optional, echoed back on task read.
- `notify_url` — optional, must be a valid URL.

Batch-size errors → 400 `{"detail":"the number of tasks in each batch should be between 1 and 100"}`.
Missing required fields → 400 `{"detail":"<field> is required"}`.

## Example Request

```bash
curl -X POST "https://api.openmart.ai/api/v1/task/batch/lookup_people" \
  -H "Accept: application/json" \
  -H "X-API-Key: <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "domain": "bluebottlecoffee.com",
      "company_name": "Blue Bottle",
      "people": [{"first_name": "Jane", "last_name": "Doe"}],
      "info_access": ["EMAIL"],
      "tracking_id": "bluebottle-jane"
    }
  ]'
```

## Submission Response

```json
{
  "batch_id":   "2fc8b627-1111-2222-3333-123456789abc",
  "submit_for": "lookup_people",
  "status":     { "processing": 1, "completed": 0, "errored": 0, "total": 1, "batch_ready": false }
}
```

## Async workflow

1. Submit → receive batch_id.
2. Poll `GET /api/v1/task/batch/<batch_id>/status` until
   `batch_ready == true`.
3. List task IDs with `GET /api/v1/task/batch/<batch_id>/task_ids?status=COMPLETED`.
4. For each task ID: `GET /api/v1/task/<task_id>`. `data` is an array
   of PeopleInfo (`first_name`, `last_name`, `linkedin_url`, `email`,
   `phones`).

## Errors

- 400 — JSON bind / batch-size / per-task validator failure (`{"detail":"..."}`)
- 401 — missing or invalid API key
- 402 — credit limit reached
- 403 — banned user
- 500 — internal failure