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.
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".
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.
# 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