Bulk From Dataset
curl --request POST \
--url https://api.example.com/api/v1/email-finder/bulk-from-dataset \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"client_estimated_credits": 123,
"find_on_invalid": true
}
'import requests
url = "https://api.example.com/api/v1/email-finder/bulk-from-dataset"
payload = {
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"client_estimated_credits": 123,
"find_on_invalid": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataset_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
client_estimated_credits: 123,
find_on_invalid: true
})
};
fetch('https://api.example.com/api/v1/email-finder/bulk-from-dataset', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/email-finder/bulk-from-dataset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataset_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'client_estimated_credits' => 123,
'find_on_invalid' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/email-finder/bulk-from-dataset"
payload := strings.NewReader("{\n \"dataset_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"client_estimated_credits\": 123,\n \"find_on_invalid\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/email-finder/bulk-from-dataset")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataset_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"client_estimated_credits\": 123,\n \"find_on_invalid\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/email-finder/bulk-from-dataset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataset_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"client_estimated_credits\": 123,\n \"find_on_invalid\": true\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}email-finder
Bulk From Dataset
Bulk find on an existing dataset (PR-E1 of 2026-05-22).
Same money semantics as /bulk but the rows come from a server-resolved
dataset (via shared eligibility predicate) instead of the client’s request
body. The frontend’s Existing Datasets picker hits this route after a
user confirms the spend in the modal.
See docs/plans/2026-05-22-bulk-find-email-existing-datasets-picker-plan.md
“Backend route shape” section for phase-by-phase ordering documentation,
crash-safety properties, and failure-mode mapping.
HTTP semantics:
- 200 → job enqueued (or replayed from idempotency cache)
- 400 → missing
Idempotency-Keyheader - 402 → insufficient credits (with
required+availablein detail) - 404 → dataset not found OR not owned by user
- 409 →
REQUEST_IN_FLIGHT|IDEMPOTENCY_KEY_REUSED_WITH_DIFFERENT_BODY|reconfirm_spend(liveactual_estimated_creditsreturned) - 422 → Pydantic validation OR
INELIGIBLE_SOURCE_TYPE|NO_ELIGIBLE_ROWS|DATASET_FETCH_FAILED
POST
/
api
/
v1
/
email-finder
/
bulk-from-dataset
Bulk From Dataset
curl --request POST \
--url https://api.example.com/api/v1/email-finder/bulk-from-dataset \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"client_estimated_credits": 123,
"find_on_invalid": true
}
'import requests
url = "https://api.example.com/api/v1/email-finder/bulk-from-dataset"
payload = {
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"client_estimated_credits": 123,
"find_on_invalid": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataset_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
client_estimated_credits: 123,
find_on_invalid: true
})
};
fetch('https://api.example.com/api/v1/email-finder/bulk-from-dataset', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/email-finder/bulk-from-dataset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataset_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'client_estimated_credits' => 123,
'find_on_invalid' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/email-finder/bulk-from-dataset"
payload := strings.NewReader("{\n \"dataset_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"client_estimated_credits\": 123,\n \"find_on_invalid\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/email-finder/bulk-from-dataset")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataset_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"client_estimated_credits\": 123,\n \"find_on_invalid\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/email-finder/bulk-from-dataset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataset_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"client_estimated_credits\": 123,\n \"find_on_invalid\": true\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Body
application/json
Request body for /bulk-from-dataset.
Fields:
dataset_id: target dataset UUID (must be owned by the authenticated user AND have an eligiblesource_type).client_estimated_credits: REQUIRED. The estimate the user agreed to when they confirmed the spend in the modal. Server tolerance gate fires if3 * len(eligible_rows) > 1.2 * client_estimated_credits, returning 409 withactual_estimated_creditsso the frontend can re-display the modal with the live number.
Response
Successful Response
⌘I