External API docs

Find company emails

Submit an async batch to discover shared company inboxes (info@, support@, sales@…) for a known domain.

Overview

Use this endpoint when you have a company domain and want its generic mailboxes — the info@, support@, sales@ style addresses. This is NOT the endpoint for finding individuals; for that use find decision makers or enrich known people.

Each request submits a batch of 1 to 100 tasks. Submission returns a batch_id after job creation; results are fetched asynchronously via the standard batch → task flow.

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. We recommend sending your API key as Authorization: Bearer <your_api_key>. If your current integration already uses X-API-Key: <your_api_key>, it will continue to work.

Allow enough time to start the job. The request can take more than 30 seconds to return a batch_id, so set your HTTP client timeout to at least 60 seconds. The enrichment then continues in the background. If your app times out, check whether it saved a batch ID before starting the same job again.

This runs as a background job. After you start it, follow: check batch status, get task IDs, then get task results.

1

Submit a batch of email lookups

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

Parameters

Parameter
domain
Type
string
Required
Yes
Example
"milvali.com"
Description
Company root domain.
Parameter
company_name
Type
string
Required
Yes
Example
"Milvali"
Description
Company display name. This field cannot be empty.
Parameter
city / state / country
Type
string
Required
No
Example
"San Francisco" / "CA" / "US"
Description
Optional company-location narrowing when multiple companies share a name.
Parameter
tracking_id
Type
string
Required
No
Example
"milvali-emails"
Description
Your correlation ID. Echoed back when you fetch the task result.

cURL request

cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/task/batch/lookup_business_email \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '[
    {
      "domain": "milvali.com",
      "company_name": "Milvali",
      "city": "San Francisco",
      "state": "CA",
      "country": "US",
      "tracking_id": "milvali-emails"
    }
  ]'

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. Keep the submission request open long enough to read it; use a client timeout of at least 60 seconds.
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-0011aabbccdd",
  "status": "COMPLETED",
  "tracking_id": "milvali-emails",
  "data": [
    { "email": "info@milvali.com",    "status": "VALID" },
    { "email": "support@milvali.com", "status": "VALID" }
  ]
}

data is an array of {email, status} records.

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_business_email. 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: "milvali.com"

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

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/task/batch/lookup_business_email \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '[{"domain":"milvali.com","company_name":"Milvali"}]'
company_namestringRequired: Yes
Example: "Milvali"

Company display name. Marked required by the validator. Missing → 400 detail:"CompanyName is required".

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/task/batch/lookup_business_email \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '[{"domain":"milvali.com","company_name":"Milvali"}]'
citystringRequired: No
Example: "San Francisco"

Optional company-location narrowing.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/task/batch/lookup_business_email \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '[{"domain":"milvali.com","company_name":"Milvali","city":"San Francisco"}]'
statestringRequired: No
Example: "CA"

Optional company-location narrowing.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/task/batch/lookup_business_email \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '[{"domain":"milvali.com","company_name":"Milvali","state":"CA"}]'
countrystringRequired: No
Example: "US"

Optional company-location narrowing.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/task/batch/lookup_business_email \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '[{"domain":"milvali.com","company_name":"Milvali","country":"US"}]'
tracking_idstringRequired: No
Example: "milvali-emails"

Caller-supplied correlation ID. Echoed back on task read. Useful for reconciling async results with your local records.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/task/batch/lookup_business_email \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '[{"domain":"milvali.com","company_name":"Milvali","tracking_id":"milvali-emails"}]'
notify_urlstring (URL)Required: No
Example: "https://your.webhook/endpoint"

Optional webhook URL. It must be a complete, valid URL when provided.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v1/task/batch/lookup_business_email \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '[{"domain":"milvali.com","company_name":"Milvali","notify_url":"https://your.webhook/endpoint"}]'

If this request fails

Match the error number or message in the response, then use the action below.

Error 400 / 422“... is required” or another field error
Read the error or detail field, then fix the named input.
Error 401“Invalid API Key”
Check the complete key and authentication header.
Error 402“Credit limit reached”
Check the team balance before trying again.
Error 403“Forbidden” or “not allowed”
Check whether this key and account can use the action.
Error 404“Not Found”
Check the API address, version, and GET, POST, or DELETE method.
Error 429“Too many requests”
Wait, then retry with fewer requests running at once.
Error 500–504Server error or timeout
Wait briefly and retry. Avoid duplicating an async job.

See Troubleshooting & FAQ for step-by-step help and the information to include when asking for support.