v1.0
REST + JSON

Build with the
Tapflow API

Give your agent the ability to search 500M+ candidate profiles, score them against any job with AI, find verified emails, and manage recruiting pipelines — through a single API.

Terminal
curl -s https://www.tapflowai.com/api/v1/projects \
  -H "Authorization: Bearer tap_live_abc123..." \
  -H "Content-Type: application/json" | jq

{
  "data": [
    {
      "id": "prj_8x2k",
      "title": "Senior ML Engineer",
      "status": "open"
    }
  ],
  "meta": {
    "requestId": "req_m4n9",
    "timestamp": "2026-03-20T12:00:00Z",
    "version": "1.0"
  },
  "usage": {
    "credits_consumed": 0,
    "balance_remaining": 4850,
    "action": "read"
  }
}

Quick start

Four steps from zero to your first agent call.

1

Create a key

Sign up, open Settings → API and click Create key. Pick the scopes your agent needs: read for GET calls, write for everything else, batch for the two batch routes.

2

Authenticate

Send Authorization: Bearer tap_live_… on every call. Keys are scoped to your company and can be revoked anytime.

3

Make your first call

POST /api/v1/projects with the job description in start. The search starts by itself; follow it with GET /projects/:id/search.

4

Subscribe to webhooks

Register a https:// endpoint, pick events (candidate.scouted, outreach.replied, …), and verify HMAC-SHA256 signatures on X-Tapflow-Signature.

Authentication

Bearer token auth with scope-based access control.

API Key Auth

Bearer token authentication with plan-based rate limits. Keys are SHA-256 hashed at rest.

Structured Responses

Every response includes a data envelope, request metadata, and usage blocks — designed for machine parsing.

Idempotency

Send an Idempotency-Key header on mutations to safely retry without duplicate side-effects.

Webhooks with HMAC

Real-time events with SHA-256 HMAC signatures, exponential backoff retry, and delivery logs.

Batch Operations

Deep-dive or enrich up to 50 candidates in a single call, free. Partial results — failures don't block successes.

Agent-Friendly Errors

Every error includes a machine code, human message, and actionable recovery hint — no guessing.

All requests
Authorization: Bearer tap_live_YOUR_API_KEY_HERE
Content-Type: application/json
Idempotency-Key: my-unique-request-id   # optional, for safe retries

MCP server

Use Tapflow from ChatGPT, Claude, Cursor, VS Code, Windsurf or any MCP client — no code. Sign in or use a key: same scopes, prices and rate limits as the REST API.

Connect your AI assistant

Work with Tapflow from Claude, Cursor, VS Code or any MCP client: create roles, start searches, read the shortlist. Same keys, scopes and prices as the API.

ChatGPT and Claude.ai: sign in, no key

Add https://www.tapflowai.com/mcp as a connector (ChatGPT: Settings → Apps → Create, authentication OAuth; Claude.ai: Settings → Connectors → Add custom connector), then sign in to Tapflow and approve. Each teammate connects with their own account.

Paste into: Settings → Connectors → Add custom connector
https://www.tapflowai.com/mcp

Paste the address, then sign in with your Tapflow account when asked.

Step-by-step Claude setup →Setup guide for every assistant →

Endpoint https://www.tapflowai.com/mcp (Streamable HTTP, stateless). ChatGPT and Claude.ai: add the URL as a connector and sign in to Tapflow (OAuth) — no key; each teammate connects with their own account, and Settings → API → Connected apps lets you revoke it. Other clients send Authorization: Bearer tap_live_… or tap_test_…. https://www.tapflowai.com/mcp/demo answers a read-only demo on sample data without a key. Every tool call is a public API call and shows in your request log.

Roles

tapflow_list_rolestapflow_get_roletapflow_create_roletapflow_get_ideal_profiletapflow_update_ideal_profiletapflow_archive_role

Search

tapflow_get_start_pricetapflow_start_searchtapflow_get_search_statustapflow_stop_searchtapflow_answer_search_check_in

Review

tapflow_get_role_reviewtapflow_answer_role_reviewtapflow_approve_role_reviewtapflow_comment_on_role_analysistapflow_retry_role_analysis

People

tapflow_list_candidatestapflow_get_candidatetapflow_get_shortlisttapflow_set_candidate_stagetapflow_deep_dive_candidatetapflow_get_deep_divetapflow_find_candidate_emailtapflow_add_candidatetapflow_forget_person

Outreach

tapflow_list_outreachtapflow_pause_outreachtapflow_resume_outreach

Account

tapflow_get_balancetapflow_whoamitapflow_list_exclusionstapflow_add_exclusions

Research connectors

searchfetch

Endpoints

All under /api/v1. Every card shows what it does, why your agent calls it, and what it costs before technical details. Older compatibility aliases are listed in the OpenAPI spec.

GET/api/v1/projects

List all recruiting projects your company has open. The starting point for every agent session.

Your agent's entry point to the talent pool — call this first to discover available positions and choose which project to operate on.

POST/api/v1/projects
Half price

Create a role. Send its job description in start and Tapflow drafts the ideal profile, builds the Search Plan and starts the search by itself, exactly like Start in the app, at half its price. The call is the approval: nobody needs to open Tapflow.

Your ATS calls this when a job opens. Store the returned id, then follow the search with GET /projects/:id/search or the search.* webhooks.

GET/api/v1/projects/:id

Read one role with its readiness: whether it can search now and, if not, what is missing.

Check canSearch before POST /projects/:id/search. When it is false, blockers says what to fix (missing_title, missing_location, …).

DELETE/api/v1/projects/:id

Archive a role when the job closes. Nothing is deleted: the role and its people can still be read.

Stop a running search first (Stop a search, below). Archived roles leave GET /projects unless you ask for status=archived or all.

POST/api/v1/projects/:id/search
Half price

Start the role's search toward a goal. A ready Search Plan launches now; otherwise the plan is built and launches by itself. Costs half the price of Start in the app: a shortlist place on a typical role is $2.50 here, $5 in the app.

Returns 202 with status running (and the missionId) or starting. 409 SEARCH_ALREADY_RUNNING means one is live — read it with GET /projects/:id/search. The role's ideal profile is the query: keywords, title or location in the body return 400 with details.retiredFields.

GET/api/v1/projects/:id/search

Where the role's search stands, with the numbers Tapflow shows: goal, progress, profiles read, each step, people held back and why, and what it needs from you.

Read again after checkAgainInSeconds (also the Retry-After header) until it is null, or use the search.* webhooks. On needs_you, answer search.checkIn with POST .../check-in; a needsYou hold says who fixes it (fixedBy api | app | tapflow) and how (fix). A search that finds nobody more ends by itself with search.conclusion: change the role and start again.

GET/api/v1/projects/:id/price

What a Start would cost on this role right now, with your balance and what to add if it falls short. The same quote the Start locks, at half the app's price.

Show it before you start. state quoted once the role's plan is ready (final); estimate before. A 402 on Start carries the same object in details.price.

GET/api/v1/projects/:id/review

Read the role questions and the role analysis: what the role is, who fits, the signals the search ranks by and where to look.

With start.review ask, read again after checkAgainInSeconds (also Retry-After) until state is waiting_for_you, or use the role.review_ready webhook; answer, then approve. A failed analysis is retried by Tapflow at roleAnalysis.nextRetryAt; once it will not be (state failed), retry it yourself. With a tap_test_ key, send X-Tapflow-Test-Scenario: review_preparing | analysis_retrying | analysis_failed on POST /projects to read those states. Every question already stands at its defaultAnswer: pre-select it, and no answer is required. price says what approving holds; reach.aboveReachable says the goal asks for more than the people here are expected to yield: add ?count= to see the price and reach of a lower count, then approve with that count. With review auto Tapflow already decided (answeredBy tapflow).

POST/api/v1/projects/:id/review/answers

Answer role questions with option values, or in your own words when no option fits. No answer is required: an unanswered question keeps its defaultAnswer.

Send values or customAnswer per question, never both. A written answer guides the role analysis (and through it who is shortlisted); it is not offered where acceptsCustomAnswer is false. An exclusive option is sent alone. On the titles question (acceptsTitles) send titles to add your own: each is counted in the place and added picked only when people there hold it (titles[] says what happened to each). Answers apply in the background: approve once state is waiting_for_you again. Works after the search started too. Each answer is taken on its own: a refused one is listed in refused[] and its question keeps the answer it had.

POST/api/v1/projects/:id/role-analysis/comments

Tell Tapflow how to read the role, in your own words. It rewrites the role analysis to follow every comment, and the search looks for and shortlists by it.

The comment shows in roleAnalysis.comments as applying until the new analysis is ready, then applied. failed: send the same text again to retry. Locked sections stay as they are. 1,000 characters, 20 comments per role. Free.

POST/api/v1/projects/:id/role-analysis/retry

Retry a failed role analysis now — the same retry as Retry in the app.

Only when roleAnalysis.state is failed (409 ROLE_ANALYSIS_NOT_FAILED otherwise). Tapflow retries a failed analysis by itself at roleAnalysis.nextRetryAt; once those retries are spent (nextRetryAt null, review state failed) this call starts a new one. Free.

DELETE/api/v1/projects/:id/role-analysis/comments/:commentId

Remove a comment on the role analysis; Tapflow rewrites the analysis without it.

roleAnalysis.state is outdated until the rewritten analysis is ready. Free.

POST/api/v1/projects/:id/review/approve

Approve the questions and the role analysis and start the search toward the goal sent at creation, or toward another count.

Send { count } to start toward another count than the one sent at creation (the goal's unit and range; 400 outside it): the hold is priced for it. 409 REVIEW_NOT_READY with Retry-After and details.waitingOn while anything is still being prepared. 409 ANSWERS_NOT_APPLIED (retryable): the latest answers are being applied again; approve once answers.state is applied. Answers like POST /projects/:id/search.

POST/api/v1/projects/:id/missions/:missionId/check-in

Answer a search that asks whether to go on: continue, stop, widen or restart — whichever checkIn.answers offers.

Same answer as the buttons in the app. Returns the search's progress after the answer.

POST/api/v1/projects/:id/missions/:missionId/stop

Stop a search and keep everyone it found — for example when the job closes in your ATS.

Returns 202; search.ended follows.

GET/api/v1/projects/:id/missions

Every search the role has run, newest first.

Pass an id from here to the next endpoint for that search's numbers.

GET/api/v1/projects/:id/missions/:missionId

One search, past or live, with the same numbers as GET /projects/:id/search.

Failed counts read as null, never 0 — treat null as unknown.

GET/api/v1/projects/:id/ideal-profile

Read the role's ideal profile: must-haves and nice-to-haves (skills, languages, certifications, industries, education), titles, every place, work mode, level and years, with readiness.

requirements is the same reading GET /projects/:id/review gives. exists is false until the role has an ideal profile: Tapflow saves one when it reads the role's description (roles created with start have one), or on the first PATCH.

PATCH/api/v1/projects/:id/ideal-profile

Write the role's ideal profile yourself instead of sending a job description.

Send approve: true to also build its Search Plan. Missing required fields return 409 ICP_VALIDATION_FAILED with blockers.

GET/api/v1/projects/:id/candidates

Retrieve the talent pipeline with optional score and status filters. Works for both spot-checks and full pipeline sweeps.

After a search completes, filter by min_score=70 to get only high-fit candidates. Use pagination to process large pools without memory pressure.

GET/api/v1/projects/:id/candidates/:candidateId

One person in full: profile, score, Deep-dive when there is one, and contact details found so far.

Call this on a candidate.scouted or candidate.shortlisted event before you push the person into your ATS.

GET/api/v1/projects/:id/shortlist

The role's shortlist: the people ready for outreach.

Same as listCandidates with status=shortlisted. Page with limit (max 200) and offset.

POST/api/v1/projects/:id/candidates/export

Export the role's people as JSON or CSV — up to 5,000 rows (1,000 on smaller plans).

When the export hit your plan's cap, the response carries the X-Tapflow-Truncated: true header — page with GET /projects/:id/candidates for the rest.

GET/api/v1/projects/:id/pipeline

Counts per stage for the role, the spread of fit levels, and the latest search.

A cheap health check for dashboards: one call instead of paging through every candidate.

POST/api/v1/projects/:id/analyze
Free

Deep-dive one candidate: a confirmed score, the deciding line with its profile quote, each role signal judged with evidence, strengths, concerns and a shortlist recommendation.

Returns 202 with a researchId. Poll GET /projects/:id/research/:researchId (usually 30–90 s) or listen for candidate.analyzed. Free through the API. Analyzing someone again runs a fresh read.

GET/api/v1/projects/:id/research/:researchId

Read a queued Deep-dive: its status and, once finished, the candidate's full Deep-dive.

Read again after checkAgainInSeconds (also the Retry-After header) until it is null, or use candidate.analyzed. outcome is done or failed; deepDive holds the result.

POST/api/v1/projects/:id/enrich
Free

Find and verify a candidate's personal email using waterfall enrichment across multiple data sources.

Free through the API. Run it once a Deep-dive confirms the person is worth contacting; use batch-enrich for many people.

POST/api/v1/projects/:id/candidates/batch-analyze
Free

Queue Deep-dives for up to 50 candidates in one call (10 on smaller plans). Each item succeeds or fails on its own.

Each queued item returns its own researchId to poll. Free through the API.

POST/api/v1/projects/:id/candidates/batch-enrich
Free

Find personal emails for up to 50 shortlisted candidates in one call (10 on smaller plans). Per-item results so one miss doesn't block others.

Free through the API. Run this after batch-analyze on your shortlist.

GET/api/v1/billing/balance

Check your credit balance. Only searches spend credits through the API; reads, Deep-dives and email lookups are free.

Check before starting a search. A search the balance can't cover returns 402 INSUFFICIENT_CREDITS and nothing is charged.

PATCH/api/v1/projects/:id/candidates/:candidateId/stage

Move a candidate through the hiring pipeline. Fires candidate.stage_changed webhook so downstream systems stay in sync.

Call this after your ATS or CRM confirms a stage change to keep Tapflow's funnel view accurate. Required for pipeline analytics.

GET/api/v1/projects/:id/outreach

The role's outreach sequences with each person's messages: who was contacted, who replied, what is still queued.

Take a sequence id from here to pause or resume it.

POST/api/v1/outreach/sequences/:sequenceId/pause

Pause an active outreach sequence. Queued messages are held — no emails or LinkedIn messages are sent while paused.

Pause before making major edits to message content or timing. Resume when you're ready — queued sends pick up from where they stopped.

POST/api/v1/outreach/sequences/:sequenceId/resume

Resume a paused outreach sequence. Queued messages restart from the next scheduled send time.

Call after pause when edits are done. If the sequence is not paused, this returns 400 SEQUENCE_NOT_PAUSED — check the status field before calling.

GET/api/v1/me

The user behind the API key, with their notification settings.

Read notificationSurfacePrefs before you change them.

PATCH/api/v1/me/notification-prefs

Turn notifications on or off per category and surface. Only the keys you send change.

Read the category names from GET /me. Each category takes toast, bell and email booleans.

PATCH/api/v1/projects/:id

Put your own id and metadata on a role, so matching never depends on titles.

Find the role later with GET /projects?externalId=…. Every webhook about the role carries project.externalId and project.metadata.

POST/api/v1/projects/:id/candidates
Free

Add a person you already know to a role, by LinkedIn URL or by name and company. Deep-dive and email lookup then work on them like on anyone a search found.

The role must have been started once. Added people never count toward a search goal. 409 PERSON_EXCLUDED means they are on your exclusion list; 503 PROFILE_READ_PENDING means send the same request again after Retry-After.

PATCH/api/v1/projects/:id/candidates/:candidateId

Put your own id and metadata on a candidate.

Every webhook about the person carries candidate.externalId and candidate.metadata.

POST/api/v1/projects/:id/candidates/:candidateId/forget

Erase a person from every role in your account, archived ones included, and add them to your exclusion list so no search finds them again.

Pending emails to them are cancelled and never sent. Other accounts are not touched. Cannot be undone.

POST/api/v1/people/forget

The same erasure, by any identity you hold: LinkedIn URL, email, or the sha256 of the email.

Works whether or not the person is on a role now; they are excluded either way.

GET/api/v1/exclusions

Read your exclusion list, or check whether one person is on it.

Only hashes are stored. Pass linkedinUrl, email or emailSha256 to check one person; page with pagination.nextCursor.

POST/api/v1/exclusions

Add people no search of yours may admit: people who opted out, applied already, or were contacted recently.

An excluded person never takes a paid place, is never emailed and never looked up, including in searches already running. expiresAt ends an entry by itself.

DELETE/api/v1/exclusions/:exclusionId

Remove an entry; later searches can find the person again.

Find the entry id with GET /exclusions?linkedinUrl=… first.

POST/api/v1/webhooks

Add a webhook endpoint for your account. It receives its events for every role, so one endpoint serves all your brands.

The signing secret is returned once in data.secret: store it before going live. Then POST /webhooks/:id/test to check your signature code.

GET/api/v1/webhooks

Read your webhook endpoints, their events and status.

Change one with PATCH /webhooks/:id (url, events, status active | paused), remove it with DELETE /webhooks/:id.

PATCH/api/v1/webhooks/:webhookId

Change an endpoint's URL or events, or pause it.

A paused endpoint gets no new deliveries. The secret stays the same.

DELETE/api/v1/webhooks/:webhookId

Delete an endpoint. Its queued retries are dropped.

To stop deliveries for a while instead, pause it with PATCH.

POST/api/v1/webhooks/:webhookId/rotate-secret

Get a new signing secret, returned once.

Deliveries from now on, retries included, are signed with the new secret; the old one stops working at once.

POST/api/v1/webhooks/:webhookId/test

Send one signed webhook.test event now and see what your endpoint answered.

Never retried. Ignore webhook.test in production handlers.

GET/api/v1/webhooks/:webhookId/deliveries

Recent deliveries of an endpoint, with status, attempt and next retry.

A delivery is tried 5 times: now, then after 1, 5, 15 and 60 minutes. Send a failed one again with POST …/deliveries/:deliveryId/retry.

POST/api/v1/webhooks/:webhookId/deliveries/:deliveryId/retry

Send a failed delivery again, now.

Only failed deliveries; one still retrying is sent again by itself (409 INVALID_STATUS).

GET/api/v1/account/settings

Read account settings.

apiRoleOutreach off means roles created or started through the API never email anyone.

PATCH/api/v1/account/settings

Keep the roles this key runs from ever emailing people. Each key and app has its own switch.

Off: this key's reach_out or get_applicants starts return 409 API_ROLE_OUTREACH_OFF; no email is written on its roles.

Playground

Paste your API key, pick an endpoint, fill params, and run it live.

Paste your API key, pick an endpoint and run it live. The playground opens here.

Webhooks

Subscribe to real-time events with POST /webhooks or in Settings → API. Endpoints belong to your account and get events for every role. Payloads carry full resource data and your externalId/metadata. Signed with HMAC-SHA256; a failed delivery is tried again after 1, 5, 15 and 60 minutes.

HMAC signature verification

Verify every incoming webhook to protect against spoofed events.

Security note

Skip HMAC verification and anyone can POST fake events to your endpoint. Always validate the X-Tapflow-Signature header on the raw request body before processing.

webhook-verify.js
const crypto = require("crypto");

function verifyWebhook(rawBody, signature, secret) {
  // rawBody must be the unmodified Buffer — do NOT parse JSON first.
  const expected = crypto.createHmac("sha256", secret)
    .update(rawBody)
    .digest("hex");
  if (typeof signature !== "string" || signature.length !== expected.length) return false;

  // Constant-time comparison prevents timing attacks.
  return crypto.timingSafeEqual(
    Buffer.from(expected),
    Buffer.from(signature)
  );
}

// Express example:
app.post("/webhook", express.raw({ type: "application/json" }), (req, res) => {
  const sig = req.headers["x-tapflow-signature"];
  if (!verifyWebhook(req.body, sig, process.env.TAPFLOW_WEBHOOK_SECRET)) {
    return res.status(401).json({ error: "Invalid signature" });
  }
  const event = JSON.parse(req.body);
  // process event.event (e.g. "candidate.analyzed") and event.data …
  res.json({ ok: true });
});

Error reference

Every error response includes a machine code, HTTP status, plain-English cause, and a recovery hint. No guessing.

CodeHTTPCauseRecovery hint
MISSING_API_KEY401No Authorization: Bearer header was sentAdd Authorization: Bearer tap_live_… to every request
INVALID_API_KEY_FORMAT401The key does not start with tap_live_ or tap_test_Copy the full key from Settings → API
INVALID_API_KEY401The key doesn't match any key on recordCheck for typos; create a new key in Settings → API
API_KEY_REVOKED401The key was revokedCreate a new key in Settings → API
API_KEY_ROTATED401The key was rotated and the old secret's grace window has closedDeploy the new secret issued at rotation time
TOO_MANY_FAILED_AUTH_ATTEMPTS429Too many failed authentications from your IPFix the key, then wait for the Retry-After period
INSUFFICIENT_SCOPE403The key lacks a scope this endpoint needs (read, write or batch)Edit scopes in Settings → API
ACCESS_DENIED403The project belongs to a different companyUse the API key for the company that owns the project
NOT_FOUND404The project, candidate, research run or search does not exist hereConfirm the ID; it may have been archived
VALIDATION_ERROR400The request body failed validationThe message names the invalid field
BATCH_SIZE_EXCEEDED400candidateIds is longer than your plan allowsSplit into smaller batches (10 per call; 50 on larger plans)
INSUFFICIENT_CREDITS402The credit balance can't cover the search's Start price. Nothing was chargedTop up credits in Settings → Billing or ask for a smaller count
DEEP_DIVE_UNAVAILABLE409The candidate has no search criteria to be read against (not found by a search, not added to a started role)Deep-dive people a search found, or add the person with POST /projects/:id/candidates
RESEARCH_IN_PROGRESS409Other research is already running for this candidatePoll details.researchId until it finishes, then queue the Deep-dive again
ICP_NOT_APPROVED409The ideal profile is not ready to search (see blockers)PATCH the ideal profile, then approve it
SEARCH_NOT_STARTED409The start could not proceed; details.reason says why. Nothing was chargedIf details.retryable, send it again shortly; otherwise fix the reason (e.g. set the location), then start again
API_ROLE_OUTREACH_OFF409This key or app may not contact peopleUse goal scout or shortlist, or turn it on in Settings → API
PERSON_EXCLUDED409The person you are adding is on your exclusion listFind the entry with GET /exclusions?linkedinUrl=…, then DELETE /exclusions/:id
ROLE_NOT_STARTED409People can only be added to a role that has been started onceStart the role, then add people
PERSON_NOT_FOUND404No LinkedIn profile was found for that name at that companySend their LinkedIn URL instead
PROFILE_READ_PENDING503The person's profile is still being read; nothing was addedSend the same request again after Retry-After (the same Idempotency-Key works)
SEQUENCE_NOT_ACTIVE400Only an active sequence can be pausedRead the sequence status first
SEQUENCE_NOT_PAUSED400Only a paused sequence can be resumedRead the sequence status first
INVALID_IDEMPOTENCY_KEY400Idempotency-Key is longer than 255 charactersUse a UUID
IDEMPOTENCY_KEY_CONFLICT409The Idempotency-Key was already used for a different endpoint or bodyUse a new key per distinct request
IDEMPOTENT_REQUEST_IN_FLIGHT409The first request with this Idempotency-Key is still runningRetry after the Retry-After period
IDEMPOTENCY_UNAVAILABLE503Tapflow couldn't confirm whether the request was acceptedRetry with the same Idempotency-Key
RATE_LIMIT_EXCEEDED429More requests per minute than your plan allowsWait for Retry-After seconds, then back off exponentially
SANDBOX_UNSUPPORTED501A tap_test_ key called an endpoint with no sandbox answerUse a tap_live_ key for this endpoint
INTERNAL_ERROR500Unexpected server errorRetry with backoff; if it persists, open a support ticket with the requestId

Rate limits

Limits are per API key, per minute. Every response includes rate limit headers.

PlanAPI KeysRate limitWebhooksMax batch
Free1100 req/min110
$100 bundle1100 req/min110
$500 bundle5500 req/min550

Response headers on every call

HeaderExampleMeaning
X-RateLimit-Limit500Max requests per minute for your plan
X-RateLimit-Remaining483Requests remaining in the current window
X-RateLimit-Reset1746446460Unix timestamp when the window resets
Retry-After12Seconds to wait before retrying (only on 429)

Retry with exponential backoff

retry-backoff.js
async function fetchWithBackoff(url, options, maxRetries = 5) {
  for (let attempt = 0; attempt < maxRetries; attempt++) {
    const res = await fetch(url, options);

    if (res.status !== 429) return res; // not rate-limited — done

    // Read Retry-After (seconds) or fall back to exponential backoff.
    const retryAfter = parseInt(res.headers.get("Retry-After") || "0", 10);
    const backoff = retryAfter
      ? retryAfter * 1000
      : Math.min(1000 * 2 ** attempt + Math.random() * 500, 30000);

    console.log(`Rate limited. Waiting ${backoff}ms before retry ${attempt + 1}...`);
    await new Promise((r) => setTimeout(r, backoff));
  }
  throw new Error("Max retries exceeded");
}

Framework examples

Full multi-step workflows for LangChain, CrewAI, OpenAI Functions, and AutoGen — not stubs.

LangChain's tool-calling interface maps naturally onto Tapflow's REST endpoints. Use ReAct agent for autonomous multi-step sourcing.

langchain_tapflow.py
# LangChain + Tapflow: full sourcing workflow
# Pairs well with LangChain's ReAct agent — each tool wraps one Tapflow endpoint.

from langchain.tools import tool
from langchain_openai import ChatOpenAI
from langchain.agents import create_react_agent, AgentExecutor
import requests, os

BASE = "https://www.tapflowai.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['TAPFLOW_KEY']}"}

@tool
def list_projects() -> dict:
    """List all open recruiting projects. Call first to pick the right project."""
    return requests.get(f"{BASE}/projects", headers=HEADERS).json()

@tool
def start_search(project_id: str, goal: str = "shortlist", count: int = 10) -> dict:
    """Start the role's search toward a goal (scout, shortlist, reach_out...). The role's ideal profile is the query."""
    return requests.post(
        f"{BASE}/projects/{project_id}/search",
        json={"goal": goal, "count": count},
        headers=HEADERS,
    ).json()

@tool
def search_status(project_id: str) -> dict:
    """Where the role's search stands: state, progress toward the goal, what it needs from you."""
    return requests.get(f"{BASE}/projects/{project_id}/search", headers=HEADERS).json()

@tool
def list_candidates(project_id: str, min_score: int = 70) -> dict:
    """Fetch high-fit candidates (min_score=70 filters out weak matches)."""
    return requests.get(
        f"{BASE}/projects/{project_id}/candidates",
        params={"min_score": min_score, "limit": 20},
        headers=HEADERS,
    ).json()

@tool
def analyze_candidate(project_id: str, candidate_id: str) -> dict:
    """Queue a Deep-dive (free through the API). Returns a researchId to poll."""
    return requests.post(
        f"{BASE}/projects/{project_id}/analyze",
        json={"candidateId": candidate_id},
        headers=HEADERS,
    ).json()

@tool
def check_balance() -> dict:
    """Check the credit balance before starting a search (searches are the only paid call)."""
    return requests.get(f"{BASE}/billing/balance", headers=HEADERS).json()

llm = ChatOpenAI(model="gpt-5-mini")
tools = [list_projects, start_search, search_status, list_candidates, analyze_candidate, check_balance]
agent = create_react_agent(llm, tools)
executor = AgentExecutor(agent=agent, tools=tools)

result = executor.invoke({
    "input": "Shortlist 5 people for our open ML engineer role and Deep-dive the best one"
})

Agent recipes

Copy-paste workflows that combine multiple endpoints into complete agent pipelines.

ATS sync agent

Push enriched profiles into Greenhouse, Lever, or Ashby the moment Tapflow discovers them — no polling, no drift.

  1. 1.Subscribe to candidate.scouted and candidate.analyzed with POST /webhooks (or in Settings → API → Webhooks)
  2. 2.On each event, call GET /api/v1/projects/:id/candidates/:candidateId to fetch the full profile
  3. 3.Map fields and POST to your ATS API with the enriched data
  4. 4.Optionally call PATCH /api/v1/projects/:id/candidates/:candidateId/stage to keep Tapflow in sync
Start building

Job-opening sourcing loop

Every new opening in your ATS becomes a Tapflow search that fills its shortlist by itself and streams people back to you.

  1. 1.When a job opens, POST /api/v1/projects with its description in start (goal shortlist, a count)
  2. 2.Follow GET /api/v1/projects/:id/search, or subscribe to the search.* webhooks
  3. 3.Take each candidate.shortlisted event (or GET /api/v1/projects/:id/shortlist) into your ATS
  4. 4.To go further on the same role, POST /api/v1/projects/:id/search with a new goal and count
Start building

Outreach qualification agent

Batch-enrich shortlisted candidates, send first-touch outreach, and surface replies back to your hiring manager only when there's a response.

  1. 1.Fetch shortlisted candidates with GET /api/v1/projects/:id/candidates?status=shortlisted
  2. 2.Discover verified emails for the batch via POST /api/v1/projects/:id/candidates/batch-enrich
  3. 3.Send outreach through your email tool using the verified addresses
  4. 4.Subscribe to outreach.replied webhook so the agent hands off the conversation automatically
Start building

Batch Deep-dive processor

Deep-dive a large candidate pool for free — the agent slices it into plan-safe batches and keeps the balance ready for the next search.

  1. 1.Fetch candidate IDs with GET /api/v1/projects/:id/candidates?status=scouted
  2. 2.Submit batches of ≤50 (your plan's max batch) via POST /api/v1/projects/:id/candidates/batch-analyze
  3. 3.Poll each researchId, or listen for candidate.analyzed, and back off on 429 using Retry-After
  4. 4.Subscribe to credits.low so the team tops up before the next search needs the balance
Start building

Start building in minutes

Sign up, generate an API key from Settings, and make your first call. Reads, Deep-dives and email lookups are free; searches cost half the app's Start price, paid from credits — top up from $5.